| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <html> |
| <head> |
| <link rel="shortcut icon" href="http://aries.apache.org/images/favicon.ico"></link> |
| <link type="text/css" rel="stylesheet" href="http://aries.apache.org/resources/site.css"></link> |
| </script><script src="http://aries.apache.org/resources/menus.js" language="javascript" type="text/javascript"></script> |
| <meta name="keywords" content="..."/> |
| <meta name="description" content="..." /> |
| <title> |
| Apache Aries - Remote Service Admin |
| </title> |
| </head> |
| <body onload="SetMenu()"> |
| |
| <table width="100%" cellpadding="0" cellspacing="0"> |
| <tr width="100%"> |
| <td id="cell-0-0" colspan="2"> </td> |
| <td id="cell-0-1"> </td> |
| <td id="cell-0-2" colspan="2"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-1-0"> </td> |
| <td id="cell-1-1"> </td> |
| <td id="cell-1-2"> |
| <div style="padding: 5px;"> |
| <div id="banner"> |
| <!-- Banner --> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr> |
| <td align="left" class="topbardiv" nowrap=""> |
| <a href="http://aries.apache.org/" title="Apache Aries"> <img border="0" src="http://aries.apache.org/images/Arieslogo_Horizontal.gif"> </a> |
| </td> |
| <td align="right" nowrap=""> |
| <a href="http://www.apache.org/" title="The Apache Software Foundation"> <img border="0" src="http://aries.apache.org/images/apache_feather.png"> </a> |
| </td> |
| </tr> |
| </table> |
| <!-- Banner --> |
| </div> |
| </div> |
| <div id="top-menu"> |
| <table border="0" cellpadding="1" cellspacing="0" width="100%"> |
| <tr> |
| <td> |
| <div align="left"> |
| <!-- Breadcrumbs --> |
| <!-- Breadcrumbs --> |
| </div> |
| </td> |
| <td> |
| <div align="right"> |
| <!-- Quicklinks --> |
| <DIV style="padding: 5px 5px 0px 25px;"> |
| <FORM action="http://www.google.com/search" method="get" style="font-size: 10px;"> |
| <A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A> |
| <INPUT name="ie" type="hidden" value="UTF-8"></INPUT> |
| <INPUT name="oe" type="hidden" value="UTF-8"></INPUT> |
| <INPUT maxlength="255" name="q" size="15" type="text" value></INPUT> |
| <INPUT name="btnG" type="submit" value="Search"></INPUT> |
| <INPUT name="domains" type="hidden" value="aries.apache.org"></INPUT> |
| <INPUT name="sitesearch" type="hidden" value="aries.apache.org"></INPUT> |
| </FORM> |
| </DIV> |
| <!-- Quicklinks --> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </td> |
| <td id="cell-1-3"> </td> |
| <td id="cell-1-4"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-2-0" colspan="2"> </td> |
| <td id="cell-2-1"> |
| <table> |
| <tr height="100%" valign="top"> |
| <td height="100%"> |
| <div id="wrapper-menu-page-right"> |
| <div id="wrapper-menu-page-top"> |
| <div id="wrapper-menu-page-bottom"> |
| <div id="menu-page"> |
| <!-- NavigationBar --> |
| <style type="text/css"> |
| /* The following code is added by mdx_elementid.py |
| It was originally lifted from http://subversion.apache.org/style/site.css */ |
| /* |
| * Hide class="elementid-permalink", except when an enclosing heading |
| * has the :hover property. |
| */ |
| .headerlink, .elementid-permalink { |
| visibility: hidden; |
| } |
| h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> |
| <div onclick="SwitchMenu('documentation')" id="documentationTitle" class="menutitle">Documentation</div> |
| |
| <div id="documentation" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/documentation/integrators-guide.html">Integrators Guide</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/documentation/articles.html">Articles</a> |
| </div> |
| <div class="menuitem"> |
| <a href="https://svn.apache.org/repos/asf/aries/slides/">Slides</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/documentation/tutorials.html">Tutorials</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/documentation/tools.html">Tools</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('modules')" id="modulesTitle" class="menutitle">Modules</div> |
| |
| <div id="modules" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/modules/samples.html">Samples</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/async-svcs.html">Asynchronous Services</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprint.html">Blueprint</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprint-maven-plugin.html">Blueprint-maven-plugin</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprintannotation.html">Blueprint Annotations</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprintnoosgi.html">Blueprint No-OSGi</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/blueprintweb.html">Blueprint Web</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/containers.html">Containers</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/esaanttask.html">ESA Ant Task </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/ebamavenpluginproject.html">EBA Maven Plugin </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/esamavenpluginproject.html">ESA Maven Plugin </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/jmx.html">JMX</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/jndiproject.html">JNDI</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/jpaproject.html">JPA</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/transactioncontrol.html">Transaction Control Service</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/transactionsproject.html">Transactions</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/rsa.html">Remote Service Admin (RSA)</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/spi-fly.html">SPI Fly</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/subsystems.html">Subsystems</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/modules/applications.html">Applications (obsolete)</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('downloads')" id="downloadsTitle" class="menutitle">Downloads</div> |
| |
| <div id="downloads" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/downloads/currentreleases.html">Current Releases</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/downloads/testresults.html">Compliance Tests</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/downloads/archived-releases.html">Archived Releases</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('community')" id="communityTitle" class="menutitle">Community</div> |
| |
| <div id="community" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/community/resources.html">Community Resources</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/gettinginvolved.html">Getting Involved</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/people.html">Who we are</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/boardreports.html">Board Reports</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/community/logos.html">Logos for Users</a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('development')" id="developmentTitle" class="menutitle">Development</div> |
| |
| <div id="development" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="/development/buildingaries.html">Building Aries </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/guidelines.html">Cording Guidelines</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/architecture.html">Architecture</a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/releasingaries.html">Releasing Aries </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/compliancetesting.html">OSGi Compliance Tests </a> |
| </div> |
| <div class="menuitem"> |
| <a href="/development/maintainingthewebpages.html">Web Site Maintenance </a> |
| </div> |
| </div> |
| |
| <div onclick="SwitchMenu('sponsorship')" id="sponsorshipTitle" class="menutitle">Sponsorship</div> |
| |
| <div id="sponsorship" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="http://www.apache.org/foundation/thanks.html">Thanks</a> |
| </div> |
| <div class="menuitem"> |
| <a href="http://www.apache.org/foundation/sponsorship.html">Sponsoring Apache</a> |
| </div> |
| </div> |
| |
| <div class="promotion"> |
| <a href="http://www.apache.org/events/current-event.html"> |
| <img src="http://www.apache.org/events/current-event-125x125.png" width="125" height="125"/> |
| </a> |
| </div> |
| <!-- NavigationBar --> |
| </div> |
| </div> |
| </div> |
| </div> |
| </td> |
| <td height="100%" width="100%"> |
| <!-- Content --> |
| <div class="wiki-content"><style type="text/css"> |
| /* The following code is added by mdx_elementid.py |
| It was originally lifted from http://subversion.apache.org/style/site.css */ |
| /* |
| * Hide class="elementid-permalink", except when an enclosing heading |
| * has the :hover property. |
| */ |
| .headerlink, .elementid-permalink { |
| visibility: hidden; |
| } |
| h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> |
| <h1 id="rsa-remote-service-admin">RSA (Remote Service Admin)<a class="headerlink" href="#rsa-remote-service-admin" title="Permanent link">¶</a></h1> |
| <p>The Aries Remote Service Admin (RSA) project allows to transparently use OSGi services for remote communication. |
| OSGi services can be marked for export by adding a service property <code>service.exported.interfaces=*</code>. Various other properties |
| can be used to customize how the service is to be exposed.</p> |
| <p>For more information, check out section "122 JPA Service Specification |
| Version 1.0" in the "OSGi Service Platform Enterprise Specification, |
| Release 4, Version 4.2" available for public download from the <a href="http://www.osgi.org/Download/Release4V43">OSGi Alliance</a>.</p> |
| <h2 id="source">Source<a class="headerlink" href="#source" title="Permanent link">¶</a></h2> |
| <p>The Aries RSA source is in a separate <a href="https://git-wip-us.apache.org/repos/asf/aries-rsa.git">git repository aries-rsa</a> there is also a <a href="https://github.com/apache/aries-rsa">mirror on github</a>.</p> |
| <h2 id="build">Build<a class="headerlink" href="#build" title="Permanent link">¶</a></h2> |
| <div class="codehilite"><pre><span class="n">mvn</span> <span class="n">clean</span> <span class="n">install</span> |
| </pre></div> |
| |
| |
| <h2 id="architecture">Architecture<a class="headerlink" href="#architecture" title="Permanent link">¶</a></h2> |
| <p><img alt="Remote Service Admin Architecture overview" src="https://cwiki.apache.org/confluence/download/attachments/30739778/remote-service-admin-spec.png?version=2&modificationDate=1362365400000&api=v2" /></p> |
| <h3 id="some-definitions">Some definitions<a class="headerlink" href="#some-definitions" title="Permanent link">¶</a></h3> |
| <ul> |
| <li>EndpointDescription Describes a remote service using service interfaces, remote url and all other properties to import the remote service.</li> |
| <li>EndpointListener a service that is to be notified when remote Endpoints described by OSGi filters appear or disappear.</li> |
| </ul> |
| <h3 id="topology-manager"><a href="https://github.com/apache/aries-rsa/tree/master/topology-manager">Topology Manager</a><a class="headerlink" href="#topology-manager" title="Permanent link">¶</a></h3> |
| <ul> |
| <li>Listens to local services and decides which to expose. It can also add properties to change the way services are exposed. |
| For the services to be exported it calls RemoteServiceAdmin.exportService to do the actual export. Then notifies EndpointListeners |
| about the new Endpoint.</li> |
| <li>Listens for service requests from consumers and creates EndpointListeners for these interests.</li> |
| </ul> |
| <p>The TopologyManager by default exposes all suitably marked local services for export and imports all service interests with matching |
| remote Endpoints.</p> |
| <p>It is the best place to implement system wide governance rules. Some examples what can be done:</p> |
| <ul> |
| <li>Enhancing all exposed remote endpoints with SSL, basic auth, logging</li> |
| <li>Exporting OSGi services with annotations for JAX-WS or JAX-RS even when not specially marked for export</li> |
| </ul> |
| <p>According to its role the TopologyManager of course does not directly implement the enhancements above. It simply creates the necessary |
| calls to a suitable RemoteServiceAdmin.</p> |
| <h3 id="remote-service-admin"><a href="https://github.com/apache/aries-rsa/tree/master/rsa">Remote Service Admin</a><a class="headerlink" href="#remote-service-admin" title="Permanent link">¶</a></h3> |
| <p>Is called by the Topology Manager to expose local services as remote endpoints and create local proxy services as clients for |
| remote endpoints.</p> |
| <p>Aries RSA has a custom SPI <a href="https://github.com/apache/aries-rsa/blob/master/spi/src/main/java/org/apache/aries/rsa/spi/DistributionProvider.java">DistributionProvider</a> that allows to easily create new transports and serializations. |
| Existing providers are:</p> |
| <ul> |
| <li><a href="http://cxf.apache.org/distributed-osgi.html">CXF-DOSGi</a><ul> |
| <li>uses Apache CXF for transport</li> |
| <li>service endpoints consumable with non-java software (XML/JSON) </li> |
| </ul> |
| </li> |
| <li><a href="https://github.com/apache/aries-rsa/tree/master/provider/tcp">TCP</a><ul> |
| <li>Java serialization over TCP (one port per service)</li> |
| <li>very few dependencies</li> |
| <li>easy to comprehend blueprint for own transport implementations</li> |
| </ul> |
| </li> |
| <li><a href="https://github.com/apache/aries-rsa/tree/master/provider/fastbin">Fastbin</a> <ul> |
| <li>tuned Java serialization (or Protobuf) over TCP using NIO</li> |
| <li>multiplexing over a single port</li> |
| <li>transparently handles InputSteams and OutputStreams in remote services</li> |
| <li>synchronous and asnychronous calls supported</li> |
| </ul> |
| </li> |
| </ul> |
| <h3 id="discovery">Discovery<a class="headerlink" href="#discovery" title="Permanent link">¶</a></h3> |
| <p>A discovery implementation uses EndpointListeners to listen for local Endpoints and publishs them for other containers. |
| It also listens to remote Endpoints and notifies EndpointListeners about their presence.</p> |
| <p>Existing implementations:</p> |
| <ul> |
| <li><a href="https://github.com/apache/aries-rsa/tree/master/discovery/local">Local discovery</a> using xml descriptors</li> |
| <li><a href="https://github.com/apache/aries-rsa/tree/master/discovery/zookeeper">Zookeeper based discovery</a></li> |
| </ul> |
| <h2 id="a-simple-example-using-apache-karaf">A simple example using Apache Karaf<a class="headerlink" href="#a-simple-example-using-apache-karaf" title="Permanent link">¶</a></h2> |
| <p>See <a href="https://github.com/apache/aries-rsa/tree/master/examples/echotcp">EchoTCP example</a>. Follow the Readme to install the example in Apache Karaf.</p> |
| <p>The EchoTCP example implements a simple echo service that can be called remotely. |
| The example uses declarative services to publish and bind services.</p> |
| <h3 id="modules">Modules<a class="headerlink" href="#modules" title="Permanent link">¶</a></h3> |
| <ul> |
| <li>api : EchoService interface</li> |
| <li>service : EchoService implementation</li> |
| <li>consumer : Small consumer that uses the EchoService</li> |
| </ul> |
| <p>The example installation uses the tcp transport to do the remoting but the example code is not tied to any transport.</p> |
| <h2 id="example-using-fastbin-transport">Example using fastbin transport<a class="headerlink" href="#example-using-fastbin-transport" title="Permanent link">¶</a></h2> |
| <p>A similar <a href="https://github.com/apache/aries-rsa/tree/master/examples/echofastbin">example</a> exists for the fastbin transport . Follow the Readme to install the example in Apache Karaf.</p> |
| <p>The example implements an echo service that showcases synchronous calls, asnychronous calls and InputStream as parameter and return value.</p></div> |
| <!-- Content --> |
| </td> |
| </tr> |
| </table> |
| </td> |
| <td id="cell-2-2" colspan="2"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-3-0"> </td> |
| <td id="cell-3-1"> </td> |
| <td id="cell-3-2"> |
| <div id="footer"> |
| <!-- Footer --> |
| <div id="site-footer"> |
| <a href="http://aries.apache.org/privacy-policy.html";>Privacy |
| Policy</a> |
| </div> |
| <!-- Footer --> |
| </div> |
| </td> |
| <td id="cell-3-3"> </td> |
| <td id="cell-3-4"> </td> |
| </tr> |
| <tr width="100%"> |
| <td id="cell-4-0" colspan="2"> </td> |
| <td id="cell-4-1"> </td> |
| <td id="cell-4-2" colspan="2"> </td> |
| </tr> |
| </table> |
| </body> |
| </html> |