DistributeMe In 7 Slides

DistributeMe In 7 Slides

A very brief introduction on DistributeMe

6ba92bd65b22e6c4b69bae9485124af4?s=128

Leon Rosenberg

October 05, 2010
Tweet

Transcript

  1. 1.

    DistributeMe in 7 Slides and a Sentence by Leon Rosenberg

    anotheria.net 2009-2010 Freitag, 12. April 13
  2. 2.

    What is DistributeMe ‣ DistributeMe is the compile- and run-time

    utility for distributing java programs via interfaces. Freitag, 12. April 13
  3. 3.

    In a Monolith Service Interface Service Implementation Client knows, uses

    implements Service Factory creates uses, directly or indirectly, via DI or MetaFactory calls Freitag, 12. April 13
  4. 4.

    Distributed Service Interface Service Implementation Client knows, uses implements Service

    Factory creates uses, directly or indirectly, via DI or MetaFactory Service Stub implements Service Skeleton knows, uses Stub Factory creates uses, directly or indirectly, via DI or MetaFactory calls calls calls Freitag, 12. April 13
  5. 5.

    ClientVM ServerVM Deployed Service Interface Service Implementation Client knows, uses

    implements Service Factory creates uses, directly or indirectly, via DI or MetaFactory Service Stub implements Service Skeleton knows, uses Stub Factory creates uses, directly or indirectly, via DI or MetaFactory calls via rmi calls calls Freitag, 12. April 13
  6. 6.

    Code Authoring Service Interface Service Implementation Client knows, uses implements

    Service Factory creates uses, directly or indirectly, via DI or MetaFactory Service Stub implements Service Skeleton knows, uses Stub Factory creates uses, directly or indirectly, via DI or MetaFactory calls calls calls code written by developer code written by developer generated code Freitag, 12. April 13
  7. 7.

    ClientVM ClientVM Complete Server alpha VM Service1 Impl Client A

    Service1 Factory creates uses Service1 Stub Service1 Skeleton Stub1 Factory creates uses calls via rmi calls calls Client B Service2 Stub Stub2 Factory creates uses calls Client C Service1 Stub Stub1 Factory creates uses calls Server beta VM Service2 Impl Service2 Factory creates uses Service2 Skeleton calls Registry VM RegistryWebApp calls via rmi calls via rmi uses lookup registry Freitag, 12. April 13
  8. 8.

    Server Arch ApplicationServer 001 ServiceVM A service 1 ServiceVM B

    service2 ServiceVM C service4 ... ApplicationServer n service3 ... ServiceVM Q service 11 ServiceVM R service3 service12 ... RegistryServer RegistryTomcat VM registry.war Client 001 ClientTomcat VM ClientA.war Client 025 ClientTomcat VM ClientB.war Client 076 Client VM ClientC.jar Client 123 Client VM ClientD.jar Client VM ClientE.jar ... ... ... C l i e n t S i d e S e r v e r S i d e Freitag, 12. April 13
  9. 9.

    InCode @DistributeMe() public interface EchoService{ long echo(long parameter) throws EchoServiceException;

    } Service Interface Service Implementation public class EchoServiceImpl implements EchoService{ @Override public long echo(long parameter) { return parameter; } } Client public static void main(String a[]) throws Exception{ EchoService service = ... omitted; long param = 123; long echo = service.echo(param); System.out.println(“Service replied: “+echo); } public class EchoServiceFactory { public EchoService create(){ return new EchoServiceImpl(); } } Service Factory package org.distributeme.test.echo; http://svn.anotheria.net/opensource/distributeme/trunk Freitag, 12. April 13