| <!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="UTF-8" type="text/css"> |
| |
| <noscript></noscript> |
| <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> |
| </head> |
| |
| <body bgcolor="white" onload="windowTitle();"> |
| <!-- <div class="help_breadcrumbs breadcrumbs_top"><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> <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.11/org/eclipse/emf/ecore/EObject.html" target="_blank" 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"> |
| |
| |
| <h2><a name="OSGi"></a>1 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 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.11/org/eclipse/emf/ecore/EPackage.html" target="_blank" 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) <a href="../../../javadoc/org/eclipse/emf/cdo/spi/server/ISessionProtocol.html" title="Interface in org.eclipse.emf.cdo.spi.server"><code>ISessionProtocol</code></a>. 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 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 that 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 Protocol</h2> |
| <p> |
| A concrete communications adapter, an <a href="../../../javadoc/org/eclipse/emf/cdo/spi/server/ISessionProtocol.html" title="Interface in org.eclipse.emf.cdo.spi.server"><code>ISessionProtocol</code></a> implementation that 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 OCL</h2> |
| <p> |
| An <a href="../../../javadoc/org/eclipse/emf/cdo/server/IQueryHandler.html" title="Interface in org.eclipse.emf.cdo.server"><code>IQueryHandler</code></a> implementation that provides support for OCL queries by executing them at the generic repository level, |
| i.e., independent of the concrete <a href="Architecture.html#Store" title="Chapter in CDO Model Repository Documentation">CDO Store</a> being used. |
| <p> |
| The OCL component is optional. |
| |
| <h2><a name="Net4j"></a>6 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 Transport</h2> |
| <p> |
| A concrete transport adapter, an <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/acceptor/IAcceptor.html" title="Interface in org.eclipse.net4j.acceptor"><code>IAcceptor</code></a> implementation that operates on top of the |
| <a href="Architecture.html#Net4j" title="Chapter in CDO Model Repository Documentation">Net4j core</a>. Net4j currently ships with <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/jvm/IJVMAcceptor.html" title="Interface in org.eclipse.net4j.jvm"><code>IJVMAcceptor</code></a>, <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/tcp/ITCPAcceptor.html" title="Interface in org.eclipse.net4j.tcp"><code>ITCPAcceptor</code></a> |
| (optionally with SSL support) and <a href="../../../../org.eclipse.net4j.doc/javadoc/org/eclipse/net4j/http/server/IHTTPAcceptor.html" title="Interface in org.eclipse.net4j.http.server"><code>IHTTPAcceptor</code></a>. |
| |
| <p align="right"> |
| <a href="index.html" title="Backward to Dealing with Servers"><img src="../../../images/backward.png" border="0"></a> <a href="../../reference/index.html" title="Forward to Reference"><img src="../../../images/forward.png" border="0"></a></p> |
| <!-- <div class="help_breadcrumbs breadcrumbs_bottom"><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> --> |
| |
| <div class="copyright">Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.<br>All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html</div> |
| </body> |
| </html> |