Skip to main content
summaryrefslogtreecommitdiffstats
blob: 6f9e6c90ac184876d35d43b97cab234e253e5e5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>

<HEAD>
<TITLE>Understanding the Architecture of a Repository (CDO Model Repository Documentation)</TITLE>

<LINK REL="STYLESHEET" HREF="../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Understanding the Architecture of a Repository (CDO Model Repository Documentation)";
    }
}
</SCRIPT>
<NOSCRIPT></NOSCRIPT>
</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<!-- <div class="help_breadcrumbs"><a href="../../Overview.html" title="CDO Model Repository Documentation">CDO Model Repository Documentation</a> > <a href="../index.html" title="Category in CDO Model Repository Documentation">Programmer's Guide</a> > <a href="index.html" title="Category in CDO Model Repository Documentation">Dealing with Servers</a></div> -->

<table border="0">
	<tr>
		<td width="100%"><h1>Understanding the Architecture of a Repository</h1></td>
		<td align="right" valign="middle" nowrap><a href="index.html" title="Backward to Dealing with Servers"><img src="../../../images/backward.png" border="0"></a>&nbsp;<a href="../../reference/index.html" title="Forward to Reference"><img src="../../../images/forward.png" border="0"></a></td>
	</tr>
</table>
<p class="author">Author: Eike Stepper</p>
<p>
 The main building block of a CDO repository is split into two layers, the generic repository layer that client
 applications interact with and the database integration layer that providers can hook into to integrate their data
 storage solutions with CDO. A number of such integrations already ship with CDO, making it possible to connect a
 repository to all sorts of JDBC databases, Hibernate, Objectivity/DB, MongoDB or DB4O.
 <p>
 While technically a CDO repository depends on EMF this dependency is not of equal importance as it is in a CDO
 application. In particular the generated application models are not required to be deployed to the server because a
 CDO repository accesses models reflectively and the model objects are not implemented as <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.7.0/org/eclipse/emf/ecore/EObject.html" title="Interface in org.eclipse.emf.ecore"><code>EObjects</code></a> on
 the server.
 <p>
 The following diagram illustrates the major building blocks of a CDO repository: <p align="center"><img src="repository-architecture.png"></p>


<h2><a name="OSGi"></a>1&nbsp;&nbsp;OSGi</h2>
<p>
 All components of CDO are implemented as <a href="http://www.osgi.org">OSGi</a> bundles. The core components of
 both clients and servers do not require OSGi to actually run to be functional, they can perfectly be operated
 stand-alone. If OSGi is running the setup and configuration of some CDO facilities is a little simpler than in
 stand-alone mode because the needed <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/factory/IFactory.html" title="Interface in org.eclipse.net4j.util.factory"><code>factories</code></a> get automatically registered with the central
 <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/container/IPluginContainer.html" title="Interface in org.eclipse.net4j.util.container"><code>wiring container</code></a>.
 <p>
 CDO utilizes an <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/om/OMPlatform.html" title="Interface in org.eclipse.net4j.util.om"><code>operations and maintenance</code></a> framework to abstract common platform services such
 as <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/om/log/OMLogger.html" title="Interface in org.eclipse.net4j.util.om.log"><code>logging</code></a>, <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/om/trace/OMTracer.html" title="Interface in org.eclipse.net4j.util.om.trace"><code>tracing</code></a>, <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/om/monitor/OMMonitor.html" title="Interface in org.eclipse.net4j.util.om.monitor"><code>monitoring</code></a> and <a href="../../../../org.eclipse.net4j.util.doc/javadoc/org/eclipse/net4j/util/om/pref/OMPreference.html" title="Interface in org.eclipse.net4j.util.om.pref"><code>configuration</code></a>. Without the need to depend on additional external libraries these services integrate seamlessly
 with OSGi, if available at runtime, or emulate similar functionality if running stand-alone.

<h2><a name="Core"></a>2&nbsp;&nbsp;CDO Server Core</h2>
<p>
 The core of a CDO server consists of one or more <a href="../../../javadoc/org/eclipse/emf/cdo/server/IRepository.html" title="Interface in org.eclipse.emf.cdo.server"><code>repositories</code></a> each of which, in turn, consists
 of several generic (network and storage independent) <b>components</b>, such as:
 <p>
 <ul>
 <li>a <a href="../../../javadoc/org/eclipse/emf/cdo/common/revision/CDORevision.html" title="Interface in org.eclipse.emf.cdo.common.revision"><code>revision</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/common/revision/CDORevisionManager.html" title="Interface in org.eclipse.emf.cdo.common.revision"><code>manager</code></a> and <a href="../../../javadoc/org/eclipse/emf/cdo/common/revision/CDORevisionCache.html" title="Interface in org.eclipse.emf.cdo.common.revision"><code>cache</code></a>,
 <li>a <a href="../../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranch.html" title="Interface in org.eclipse.emf.cdo.common.branch"><code>branch</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/common/branch/CDOBranchManager.html" title="Interface in org.eclipse.emf.cdo.common.branch"><code>manager</code></a>,
 <li>a <a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.7.0/org/eclipse/emf/ecore/EPackage.html" title="Interface in org.eclipse.emf.ecore"><code>package</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/common/model/CDOPackageRegistry.html" title="Interface in org.eclipse.emf.cdo.common.model"><code>registry</code></a>,
 <li>a <a href="../../../javadoc/org/eclipse/emf/cdo/CDOLock.html" title="Interface in org.eclipse.emf.cdo"><code>lock</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/server/ILockingManager.html" title="Interface in org.eclipse.emf.cdo.server"><code>manager</code></a>,
 <li>a <a href="../../../javadoc/org/eclipse/emf/cdo/session/CDOSession.html" title="Interface in org.eclipse.emf.cdo.session"><code>session</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/server/ISessionManager.html" title="Interface in org.eclipse.emf.cdo.server"><code>manager</code></a>,
 <li>a <a href="../../../javadoc/org/eclipse/emf/cdo/common/commit/CDOCommitInfo.html" title="Interface in org.eclipse.emf.cdo.common.commit"><code>commit info</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/common/commit/CDOCommitInfoManager.html" title="Interface in org.eclipse.emf.cdo.common.commit"><code>manager</code></a>,
 <li>a <a href="../../../javadoc/org/eclipse/emf/cdo/server/IQueryHandler.html" title="Interface in org.eclipse.emf.cdo.server"><code>query handler</code></a> <a href="../../../javadoc/org/eclipse/emf/cdo/server/IQueryHandlerProvider.html" title="Interface in org.eclipse.emf.cdo.server"><code>provider</code></a>.
 </ul>
 <p>
 In addition the following types of <b>handlers</b> can be hooked up with a repository:
 <p>
 <ul>
 <li><a href="../../../javadoc/org/eclipse/emf/cdo/server/IRepository.ReadAccessHandler.html" title="Interface in org.eclipse.emf.cdo.server.IRepository"><code>Read access</code></a> handlers,
 <li><a href="../../../javadoc/org/eclipse/emf/cdo/server/IRepository.WriteAccessHandler.html" title="Interface in org.eclipse.emf.cdo.server.IRepository"><code>Write access</code></a> handlers,
 <li><a href="../../../javadoc/org/eclipse/emf/cdo/common/commit/CDOCommitInfoHandler.html" title="Interface in org.eclipse.emf.cdo.common.commit"><code>Commit info</code></a> handlers.
 </ul>
 <p>
 All <b>persistent aspects</b> (the storage/retrieval of data in/from a database system) are fully abstracted
 through the service provider interfaces (SPI) <a href="../../../javadoc/org/eclipse/emf/cdo/server/IStore.html" title="Interface in org.eclipse.emf.cdo.server"><code>IStore</code></a>, <a href="../../../javadoc/org/eclipse/emf/cdo/server/IStoreAccessor.html" title="Interface in org.eclipse.emf.cdo.server"><code>IStoreAccessor</code></a> and <a href="../../../javadoc/org/eclipse/emf/cdo/server/IStoreChunkReader.html" title="Interface in org.eclipse.emf.cdo.server"><code>IStoreChunkReader</code></a>.
 Concrete implementations are fully separated and can be plugged into the core as described in <a href="Architecture.html#Store" title="Chapter in CDO Model Repository Documentation">CDO Store</a>.
 <p>
 All <b>communication aspects</b> (the sending/receiving of signals to/from a network system) are fully abstracted
 through the service provider interface (SPI) ISessionProtocol. Concrete implementations are fully separated
 and can be plugged into the core as described in <a href="Architecture.html#Protocol" title="Chapter in CDO Model Repository Documentation">Protocol</a>.

<h2><a name="Store"></a>3&nbsp;&nbsp;CDO Store</h2>
<p>
 A concrete storage adapter, an <a href="../../../javadoc/org/eclipse/emf/cdo/server/IStore.html" title="Interface in org.eclipse.emf.cdo.server"><code>IStore</code></a> implementation, operates on top of the generic <a href="Architecture.html#Core" title="Chapter in CDO Model Repository Documentation">server
 core</a>. A number of such stores already ship with CDO, making it possible to connect a repository to all sorts of
 JDBC databases, Hibernate, Objectivity/DB, MongoDB or DB4O.<p><b>See Also:</b></p>
<ul>
	<li><a href="../../reference/StoreFeatures.html" title="Article in CDO Model Repository Documentation">Store Feature Matrix</a></li>
</ul>


<h2><a name="Protocol"></a>4&nbsp;&nbsp;Protocol</h2>
<p>
 A concrete communications adapter, an ISessionProtocol implementation, operates on top of the generic
 <a href="Architecture.html#Core" title="Chapter in CDO Model Repository Documentation">server core</a>. The only session protocol implementation that currently ships with CDO is based on
 <a href="Architecture.html#Net4j" title="Chapter in CDO Model Repository Documentation">Net4j Core</a>.

<h2><a name="OCL"></a>5&nbsp;&nbsp;OCL</h2>


<h2><a name="Net4j"></a>6&nbsp;&nbsp;Net4j Core</h2>
<p>
 The <i>Net4j Signalling Platform</i> is an extensible client/server communications framework. Net4j eases the
 development of fast and maintainable application <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/signal/ISignalProtocol.html" title="Interface in org.eclipse.net4j.signal"><code>protocols</code></a> that are independent of the
 physical <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/connector/IConnector.html" title="Interface in org.eclipse.net4j.connector"><code>transport</code></a> medium. Transport protocols are pluggable and Net4j ships with support for
 <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/tcp/ITCPConnector.html" title="Interface in org.eclipse.net4j.tcp"><code>TCP</code></a>, <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/tcp/ssl/SSLUtil.html" title="Class in org.eclipse.net4j.tcp.ssl"><code>SSL</code></a>, <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/http/common/IHTTPConnector.html" title="Interface in org.eclipse.net4j.http.common"><code>HTTP</code></a> and <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/jvm/IJVMConnector.html" title="Interface in org.eclipse.net4j.jvm"><code>JVM</code></a>
 (in-process) transport. The core of Net4j is a fast, asynchronous and non-blocking <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/buffer/IBuffer.html" title="Interface in org.eclipse.net4j.buffer"><code>buffer</code></a>
 multiplexing kernel, based on <a href="Architecture.html#OSGi" title="Chapter in CDO Model Repository Documentation">OSGi</a> but also executable stand-alone.<p><b>See Also:</b></p>
<ul>
	<li><a href="Architecture.html#Transport" title="Chapter in CDO Model Repository Documentation">Transport</a></li>
	<li><a href="Architecture.html#Protocol" title="Chapter in CDO Model Repository Documentation">Protocol</a></li>
</ul>


<h2><a name="Transport"></a>7&nbsp;&nbsp;Transport</h2>


<p align="right">
<a href="index.html" title="Backward to Dealing with Servers"><img src="../../../images/backward.png" border="0"></a>&nbsp;<a href="../../reference/index.html" title="Forward to Reference"><img src="../../../images/forward.png" border="0"></a></p>
<HR>
<i>Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.</i>
</BODY>
</HTML>

Back to the top