Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting started with OpenCCM1 Getting started with OpenCCM Tutorial An OpenCCM application : The demo3 “Client / Server-Producer / Consumer” Areski Flissi.

Similar presentations


Presentation on theme: "Getting started with OpenCCM1 Getting started with OpenCCM Tutorial An OpenCCM application : The demo3 “Client / Server-Producer / Consumer” Areski Flissi."— Presentation transcript:

1 Getting started with OpenCCM1 Getting started with OpenCCM Tutorial An OpenCCM application : The demo3 “Client / Server-Producer / Consumer” Areski Flissi (IR CNRS / LIFL) flissi@lifl.fr

2 Getting started with OpenCCM2 Tutorial Objectives An OpenCCM application How to design, build, implement, compile, deploy and execute an application according to the OMG CORBA Component Model with the OpenCCM platform Illustrated with a concrete example : demo3 A simple Client / Server-Producer / Consumer application Build with OpenCCM 0.4 and ORBacus 4.1 and Java programming language

3 Getting started with OpenCCM3 Agenda 1. OMG IDL3 : design the application by defining components and assembling component instances 2. OpenCCM compilation and generation chain for the demo3 example 3. OpenCCM execution chain for the demo3 example 4. Package, assembly and deploy the CCM application with XML descriptors (edited using simple GUI)

4 Getting started with OpenCCM4 Building a CCM application with OpenCCM is very easy... IDL3 IR3 OMG IDL 2.x Java OpenCCM Skeletons Java Corba 2 stubs Java implementation patterns User’s Java implementation file ir3_feed ir3_idl2 ir3_java jidl ir3_jimpl Compile and Build archive demo3.idl3 demo3.jar demo3.idl Packaging, Assembling and Deployment done by XML descriptors User written files Compiler Generated files GUI XML descriptors

5 Getting started with OpenCCM5 Agenda 1. OMG IDL3 : design the application by defining components and assembling component instances 2. OpenCCM compilation and generation chain for the demo3 example 3. OpenCCM execution chain for the demo3 example 4. Package, assembly and deploy the CCM application with XML descriptors (edited using simple GUI)

6 Getting started with OpenCCM6 1. OMG IDL3 : design the application by defining components and assembling component instances OMG IDL3 : defining demo3 module Interfaces Eventtypes Components and interconnections between components (facets, receptacles, event sources, event sinks) Component homes for instantiating and managing components

7 Getting started with OpenCCM7 The Client/Server-Producer/Consumer Example Client components synchronously invoke a Server component which asynchronously publishes Events to the set of connected Consumer components. Components are created by simple component homes or managers with primary keys

8 Getting started with OpenCCM8 Building the application : Assembling CORBA Component instances Component Base ref. Facet Receptacle Event Source Event Sink Server Component Client Component Consumer Component

9 Getting started with OpenCCM9 OMG IDL 3.0 for demo3 example // Importation of the Components module // when access to OMG IDL definitions contained // into the CCM's Components module is required. import Components; module demo3 { // Sets the prefix of all these OMG IDL definitions. // Prefix generated Java mapping classes. typeprefix demo3 "ccm.objectweb.org";... };

10 Getting started with OpenCCM10 Defining a base component type // A base type for named component. component NamedComponent { /** The identifier name property. */ attribute string name; }; // The primary key to identify components valuetype NamePrimaryKey : ::Components::PrimaryKeyBase { /** Just a string name. */ public /*string*/ long name; };

11 Getting started with OpenCCM11 The Service Interface and Event valuetype interface Service { void display(in string text); }; // The Event valuetype published by the Server // component and consumed by its Consumer components eventtype TextEvent { /** Just contains a string. */ public string text; };

12 Getting started with OpenCCM12 The Server Component // The Server component type component Server : NamedComponent { // Provides a Service to its Client components provides Service the_service; // Publishes Events to its Consumer components publishes TextEvent to_consumers; }; // Simple home for instantiating Server component home ServerHome manages Server {}; Server Compone nt

13 Getting started with OpenCCM13 The Server Component // The Server component type component Server : NamedComponent { // Provides a Service to its Client components provides Service the_service; // Publishes Events to its Consumer components publishes TextEvent to_consumers; }; // Simple home for instantiating Server component home ServerHome manages Server {}; ServerHome Server Component

14 Getting started with OpenCCM14 The Server Component // The home for managing Server components home ServerManager manages Server primarykey NamePrimaryKey { // To create a new Server identified by the name factory create_server(in string name); // To find a Server identified by the name finder find_server(in string name); }; ServerManager Server Component

15 Getting started with OpenCCM15 The Client Component // The Client component type component Client : NamedComponent { // Uses the service provided by the Server component uses Service the_service; }; // Simple home for instanciating Client components home ClientHome manages Client { }; // The home for managing Client components home ClientManager manages Client primarykey NamePrimaryKey { /** To create a new Client identified by the name. */ factory create_client(in string name); /** To find a Client identified by the name. */ finder find_client(in string name); }; Client Component

16 Getting started with OpenCCM16 The Client Component // The Client component type component Client : NamedComponent { // Uses the service provided by the Server component uses Service the_service; }; // Simple home for instanciating Client components home ClientHome manages Client { }; // The home for managing Client components home ClientManager manages Client primarykey NamePrimaryKey { /** To create a new Client identified by the name. */ factory create_client(in string name); /** To find a Client identified by the name. */ finder find_client(in string name); }; ClientHome Client

17 Getting started with OpenCCM17 The Consumer Component // The Consumer component type component Consumer : NamedComponent { // Consumes Events published by Server components consumes TextEvent from_servers; }; // Simple home for instanciating Client components home ConsumerHome manages Consumer { }; // The home for managing Client components home ConsumerManager manages Consumer primarykey NamePrimaryKey { /** To create a new Consumer identified by the name. */ factory create_consumer(in string name); /** To find a Consumer identified by the name. */ finder find_consumer(in string name); }; Consumer

18 Getting started with OpenCCM18 The Consumer Component // The Consumer component type component Consumer : NamedComponent { // Consumes Events published by Server components consumes TextEvent from_servers; }; // Simple home for instanciating Client components home ConsumerHome manages Consumer { }; // The home for managing Client components home ConsumerManager manages Consumer primarykey NamePrimaryKey { /** To create a new Consumer identified by the name. */ factory create_consumer(in string name); /** To find a Consumer identified by the name. */ finder find_consumer(in string name); }; ConsumerHome Consumer

19 Getting started with OpenCCM19 Interconnections between CORBA component instances ServerHome Server Componen t ConsumerHome ClientHome Consume r Client

20 Getting started with OpenCCM20 Agenda 1. OMG IDL3 : design the application by defining components and assembling component instances 2. OpenCCM compilation and generation chain for the demo3 example 3. OpenCCM execution chain for the demo3 example 4. Package, assembly and deploy the CCM application with XML descriptors (edited using simple GUI)

21 Getting started with OpenCCM21 2. OpenCCM compilation and generation chain for the demo3 example Loading the OpenCCM environment Start the OpenCCM's OMG IDL3 Repository (named IR3) Checking the demo3.idl3 file Feeding the demo3.idl3 file into the OpenCCM's IR3 Generating equivalent OMG IDL 2.4 mapping for demo3 Generating the Java OpenCCM skeletons for demo3 Implementing the Client/Server–Producer/Consumer example Compiling generated Java CORBA 2 stubs, generated Java OpenCCM skeletons, all Java implementation sources and building archive demo3.jar

22 Getting started with OpenCCM22 Loading the OpenCCM environment Assuming OpenCCM is compiled and installed in C:\OpenCCM with ORBacus-4.1 under Windows NT : C:\OpenCCM>ORBacus-4.1\bin\envi_OpenCCM.bat  To have access to all OpenCCM’s tools

23 Getting started with OpenCCM23 Start the OpenCCM's OMG IDL3 Repository C:\OpenCCM\demo\demo3>ir3_start  Start the OpenCCM’s IR3  Feed the OpenCCM's IR3 with the IFR_3_0.idl file  Feed the OpenCCM's IR3 with the Components.idl file  this script automatically creates the $OpenCCM_CONFIG_DIR directory

24 Getting started with OpenCCM24 Checking the demo3.idl3 file C:\OpenCCM\demo\demo3>idl3_check demo3.idl3 OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Reading from file demo3.idl3... OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Preprocessing file demo3.idl3... OpenCCM's OMG IDL 3.0 Compiler 0.5.0: File demo3.idl3 preprocessed OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Feeding the Interface Repository... OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Compilation completed: 0 warnings. This script checks if if the specified OMG IDL 3.0 file “demo3.idl3” is correct

25 Getting started with OpenCCM25 Feeding the demo3.idl3 file into the OpenCCM's IR3 C:\OpenCCM\demo\demo3>ir3_feed demo3.idl3 OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Reading from file demo3.idl3... OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Preprocessing file demo3.idl3... OpenCCM's OMG IDL 3.0 Compiler 0.5.0: File demo3.idl3 preprocessed OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Feeding the Interface Repository... OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Compilation completed: 0 warnings. The ir3_feed script allows to compile demo3.idl3 file and to feed the OpenCCM's IR3 (necessary to use any of the OpenCCM tools)

26 Getting started with OpenCCM26 Generating equivalent OMG IDL 2.4 mapping for the demo3 IR3 object The ir3_idl2 script generates the OMG IDL 2.4 CCM's mapping associated to an OpenCCM's IR3 object (demo3.idl) : C:\OpenCCM\demo\demo3>ir3_idl2 demo3 Add –o filename option to produce an output file and –i option to add the #include statement, ie : C:\OpenCCM\demo\demo3>ir3_idl2 -i Components.idl -o demo3.idl demo3 In this case, “-i Components.idl” produces the “#include Components.idl” statement in the demo3.idl file

27 Getting started with OpenCCM27 Client-side and Server-side OMG IDL Mappings User written Compiler Generated files Component Designer OMG IDL 3.0 Local server-side OMG IDL 2.x Client Stub Component Executor Component Skeleton OMG IDL 3.0 Compiler Client-side OMG IDL 2.x Component Client Component Implementer Client Application uses implemented by delegates to implemented by OR B

28 Getting started with OpenCCM28 Client-Side OMG IDL Mapping rules A component type is mapped to an interface inheriting from Components::CCMObject Facets and event sinks are mapped to an operation for obtaining the associated reference Receptacles are mapped to operations for connecting, disconnecting, and getting the associated reference(s) Event sources are mapped to operations for subscribing and unsubscribing to produced events

29 Getting started with OpenCCM29 Client-Side OMG IDL Mapping rules An event type is mapped to A value type inheriting from Components::EventBase A consumer interface inheriting from Components::EventConsumerBase A home type is mapped to three interfaces One for explicit operations user-defined inheriting from Components::CCMHome One for implicit operations generated One inheriting from both previous interfaces

30 Getting started with OpenCCM30 Client-Side OMG IDL Mapping rules TextEvent eventtype is mapped to : eventtype TextEvent { /** Just contains a string. */ public string text; }; valuetype TextEvent : ::Components::EventBase { public string text; }; interface TextEventConsumer : ::Components::EventConsumerBase { void push_TextEvent(in ::demo3::TextEvent the_textevent); }; Is mapped to

31 Getting started with OpenCCM31 Client-Side OMG IDL Mapping rules Server Component component Server : NamedComponent { provides Service the_service; publishes TextEvent to_consumers; }; interface Server : ::demo3::NamedComponent { ::demo3::Service provide_the_service(); ::Components::Cookie subscribe_to_consumers(in ::demo3::TextEventConsumer consumer); ::demo3::TextEventConsumer unsubscribe_to_consumers(in ::Components::Cookie ck); }; Is mapped to Server Compone nt

32 Getting started with OpenCCM32 Client-Side OMG IDL Mapping rules home ServerHome home ServerHome manages Server {}; interface ServerHomeExplicit : ::Components::CCMHome { }; interface ServerHomeImplicit : ::Components::KeylessCCMHome { ::demo3::Server create(); }; interface ServerHome : ::demo3::ServerHomeExplicit, ::demo3::ServerHomeImplicit { }; Is mapped to ServerHome Server Component

33 Getting started with OpenCCM33 Client-Side OMG IDL Mapping rules home ServerManager home ServerManager manages Server primarykey NamePrimaryKey { factory create_server(in string name); finder find_server(in string name); }; Is mapped to ServerManager Server Component

34 Getting started with OpenCCM34 Client-Side OMG IDL Mapping rules home ServerManager interface ServerManagerExplicit : ::Components::CCMHome { ::demo3::Server create_server(in string name); ::demo3::Server find_server(in string name); }; interface ServerManagerImplicit { ::demo3::Server create(in ::demo3::NamePrimaryKey key); ::demo3::Server find_by_primary_key(in ::demo3::NamePrimaryKey key); void remove(in ::demo3::NamePrimaryKey key); ::demo3::NamePrimaryKey get_primary_key(in ::demo3::Server comp); }; interface ServerManager : ::demo3::ServerManagerExplicit, ::demo3::ServerManagerImplicit { }; Is mapped to

35 Getting started with OpenCCM35 Client-Side OMG IDL Mapping rules Client Component component Client : NamedComponent { uses Service the_service; }; interface Client : ::demo3::NamedComponent { void connect_the_service(in ::demo3::Service connexion); ::demo3::Service disconnect_the_service(); ::demo3::Service get_connection_the_service(); }; Is mapped to Client Component

36 Getting started with OpenCCM36 Client-Side OMG IDL Mapping rules Consumer Component component Consumer : NamedComponent { consumes TextEvent from_servers; }; interface Consumer : ::demo3::NamedComponent { ::demo3::TextEventConsumer get_consumer_from_servers(); }; Is mapped to Consumer

37 Getting started with OpenCCM37 Server-Side OMG IDL Mapping rules A component type is mapped to three local interfaces The main component executor interface Inheriting from Components::EnterpriseComponent The monolithic component executor interface Operations to obtain facet executors and receive events The component specific context interface Operations to access component receptacles and event sources A home type is mapped to three local interfaces One for explicit operations user-defined Inheriting from Components::HomeExecutorBase One for implicit operations generated One inheriting from both previous interfaces

38 Getting started with OpenCCM38 Server-Side OMG IDL Mapping rules : NamedComponent // Main component executor interface local interface CCM_NamedComponent_Executor : ::Components::EnterpriseComponent { attribute string name; }; // Monolithic component executor interface local interface CCM_NamedComponent : ::demo3::CCM_NamedComponent_Executor { // no operations to obtain facet executors and receive events }; // Component-specific context interface. local interface CCM_NamedComponent_Context : ::Components::CCMContext { // no operations to access component receptacles and event sources }; NamedCompone nt name = xxx

39 Getting started with OpenCCM39 Server-Side OMG IDL Mapping rules : Server Component // Main component executor interface local interface CCM_Server_Executor : ::demo3::CCM_NamedComponent_Executor { }; // Monolithic component executor interface local interface CCM_Server : ::demo3::CCM_Server_Executor { ::demo3::CCM_Service get_the_service(); }; // Component-specific context interface. local interface CCM_Server_Context : ::demo3::CCM_NamedComponent_Context { void push_to_consumers(in ::demo3::TextEvent event); }; Server Compone nt

40 Getting started with OpenCCM40 Server-Side OMG IDL Mapping rules : Server Component Server Compon ent Monolithic executor CCM_Server CCM_Service CCM_Server_Context Server Service SessionComponent SessionContext

41 Getting started with OpenCCM41 Server-Side OMG IDL Mapping rules : Client Component // Main component executor interface local interface CCM_Client_Executor : ::demo3::CCM_NamedComponent_Executor { }; // Monolithic component executor interface local interface CCM_Client : ::demo3::CCM_Client_Executor { }; // Component-specific context interface. local interface CCM_Client_Context : ::demo3::CCM_NamedComponent_Context { ::demo3::Service get_connection_the_service(); }; Client Component

42 Getting started with OpenCCM42 Server-Side OMG IDL Mapping rules : Client Component Client Component Monolithic executor CCM_Client CCM_Client_Context Client SessionComponent SessionContext

43 Getting started with OpenCCM43 Server-Side OMG IDL Mapping rules : Consumer Component local interface CCM_TextEventConsumer { void push(in ::demo3::TextEvent event); }; // Main component executor interface local interface CCM_Consumer_Executor : ::demo3::CCM_NamedComponent_Executor { }; // Monolithic component executor interface local interface CCM_Consumer : ::demo3::CCM_Consumer_Executor { void push_from_servers(in ::demo3::TextEvent event); };// Component-specific context interface. local interface CCM_Consumer_Context : ::demo3::CCM_NamedComponent_Context { }; Consumer

44 Getting started with OpenCCM44 Server-Side OMG IDL Mapping rules : Consumer Component Monolithic Executor CCM_Consumer CCM_TextEventConsumer CCM_Consumer_Context Consumer TextEventConsumer SessionComponent SessionContext Consume r

45 Getting started with OpenCCM45 Generating the Java OpenCCM skeletons associated to demo3 The script id3_java.bat allows to generate skeletons C:\OpenCCM\demo\d emo3>ir3_java ::demo3 Files generated : ClientCCM.java ClientHomeCCM.java ClientHomeSkeletonInterceptor.java ClientHomeStubInterceptor.java ClientManagerCCM.java ClientManagerSkeletonInterceptor.java ClientManagerStubInterceptor.java ClientMonolithicWrapper.java ClientSkeletonInterceptor.java ConsumerCCM.java ConsumerHomeCCM.java ConsumerHomeSkeletonInterceptor.java ConsumerHomeStubInterceptor.java ConsumerManagerCCM.java ConsumerManagerSkeletonInterceptor.java ConsumerManagerStubInterceptor.java ConsumerMonolithicWrapper.java ConsumerSkeletonInterceptor.java

46 Getting started with OpenCCM46 Generating the Java OpenCCM skeletons associated to demo3 NamedComponentCCM.java NamedComponentMonolithicWrapper.java NamedComponentSkeletonInterceptor.java NamePrimaryKeyFactoryHelper.java ServerCCM.java ServerHomeCCM.java ServerHomeSkeletonInterceptor.java ServerHomeStubInterceptor.java ServerManagerCCM.java ServerManagerSkeletonInterceptor.java ServerManagerStubInterceptor.java ServerMonolithicWrapper.java ServerSkeletonInterceptor.java ServiceSkeletonInterceptor.java ServiceStubInterceptor.java TextEventConsumerSkeletonInterceptor.java TextEventConsumerStubInterceptor.java TextEventConsumerWrapper.java TextEventFactoryHelper.java

47 Getting started with OpenCCM47 Generating Java CORBA 2 stubs Using jidl compiler for ORBacus-4.1, --tie option allows to generate tie classes, -I option to include idl files, this generate stubs for demo3 in demo3\generated\stubs directory. C:\OpenCCM\demo\demo3>jidl --auto-package --tie -I. -I../../ORBacus-4.1/idl --output-dir generated/stubs demo3.idl

48 Getting started with OpenCCM48 Implementing the Client/Server – Producer/Consumer OpenCCM example Now we have to implement this example by writing Java implementation files Only functional parts of the application have to be implemented Files to write : ClientHomeImpl.java ClientImpl.java ConsumerHomeImpl.java ConsumerImpl.java Demo3.java ServerHomeImpl.java ServerImpl.java TextEventDefaultFactory.java TextEventImpl.java

49 Getting started with OpenCCM49 Implementing the Client/Server – Producer/Consumer OpenCCM example Demo3.java is the bootstrap of the application, here we have to Initialise the ORB, obtain the Name Service Obtain component servers ComponentServer1 and ComponentServer2 Obtain the container homes Instantiate a container on each server Install homes for Client, Server and Consumer Create components with create() method of homes : here we have three clients, three consumers and one server-producer Configure components Connect each client and consumer to server Call the configuration_complete() method of components implementation

50 Getting started with OpenCCM50 Implementing the Client/Server – Producer/Consumer OpenCCM example Demo3.java  Connect each client and consumer to server.... Service the_service = s.provide_the_service(); c1.connect_the_service(the_service); c2.connect_the_service(the_service); c3.connect_the_service(the_service); s.subscribe_to_consumers(cs1.get_consumer_from_servers()); s.subscribe_to_consumers(cs2.get_consumer_from_servers()); s.subscribe_to_consumers(cs3.get_consumer_from_servers());.... Server Compone nt Client Compone nt Consumer Componen t

51 Getting started with OpenCCM51 Implementing the Client/Server – Producer/Consumer OpenCCM example ClientImpl.java : Instantiates, constructs and shows the GUI Perform the action when the button is clicked by calling the display service service.display(...) (Service interface operation).... // Obtain the object reference associated to the // 'the_service' receptacle. Service service = the_context_.get_connection_the_service(); // Calls the display service. service.display(name_ + ":" + text_.getText());....

52 Getting started with OpenCCM52 Implementing the Client/Server – Producer/Consumer OpenCCM example ServerImpl.java Instantiates, constructs and shows the GUI Implements the display method for the Service interface by displaying string text Push events to consumers push_to_consumers(... )... public void display(String text) { // Puts the text into the text area. textArea_.append(text + "\n"); // Pushes an event to all connected consumers. the_context_.push_to_consumers ( new TextEventImpl(text) ); }...

53 Getting started with OpenCCM53 Implementing the Client/Server – Producer/Consumer OpenCCM example ConsumerImpl.java : Instantiates, constructs and shows the GUI Implements reception of events published by server components push_from_server(...)... public void push_from_servers(TextEvent event) { push(event); } public void push(TextEvent event) { // Put the text into the text area. textArea_.append(event.text + "\n"); }...

54 Getting started with OpenCCM54 Implementing the Client/Server – Producer/Consumer OpenCCM example ClientHomeImpl.java This class inherits from the local CCM_ClientHome interface generated. It implements the create_home() method called by the OpenCCM Component Server to create a home instance ConsumerHomeImpl.java, ServerHomeImpl.java Implements the create_home() method to create a home instance Register the TextEvent valuetype factory to the ORB

55 Getting started with OpenCCM55 Compiling Java sources Building archive demo3.jar Now, we have to : Compile generated Java CORBA 2 stubs and Java OpenCCM skeletons, Compile all Java implementation sources, Build archive demo3.jar

56 Getting started with OpenCCM56 Agenda 1. OMG IDL3 : design the application by defining components and assembling component instances 2. OpenCCM compilation and generation chain for the demo3 example 3. OpenCCM execution chain for the demo3 example 4. Package, assembly and deploy the CCM application with XML descriptors (edited using simple GUI)

57 Getting started with OpenCCM57 3. OpenCCM execution chain for the demo3 example Installing the OpenCCM configuration Repository  ccm_install Starting the NameService  ns_start Starting Java Component Servers  jcs_start Getting the IOR of the started Name Service  ns_ior Starting JVM to run demo3

58 Getting started with OpenCCM58 Installing the OpenCCM configuration Repository, Starting the Name Service C:\OpenCCM\demo\demo3>ccm_install The OpenCCM Platform will be installed. Creating the C:\OpenCCM\ORBacus-4.1\OpenCCM_CONFIG_DIR directory. Creating the C:\OpenCCM\ORBacus- 4.1\OpenCCM_CONFIG_DIR\ComponentServers directory. The OpenCCM Platform is installed. C:\OpenCCM\demo\demo3>ns_start The Name Service will be started. Launching the ORBacus Name Service. The Name Service is started.

59 Getting started with OpenCCM59 Starting Java Component Servers for demo3 Named ComponentServer1 and ComponentServer2 C:\OpenCCM\demo\demo3>jcs_start ComponentServer1 The OpenCCM's Java Component Server ComponentServer1 will be started. Creating the C:\OpenCCM\ORBacus- 4.1\OpenCCM_CONFIG_DIR\ComponentServers\ComponentServer1.archive _cache directory. Launching an OpenCCM's Java Component Server. The OpenCCM's Java Component Server ComponentServer1 is started. C:\OpenCCM\demo\demo3>jcs_start ComponentServer2 The OpenCCM's Java Component Server ComponentServer2 will be started. Creating the C:\OpenCCM\ORBacus- 4.1\OpenCCM_CONFIG_DIR\ComponentServers\ComponentServer2.archive _cache directory. Launching an OpenCCM's Java Component Server. The OpenCCM's Java Component Server ComponentServer2 is started.

60 Getting started with OpenCCM60 Getting the IOR of the started Name Service and run demo3 C:\OpenCCM\demo\demo3>ns_ior IOR:000000000000002a49444c3a6f6f632e636f6d2f436f73........ Then we call the JVM with IOR args and demo3.jar archive in classpath Starting demonstration demo3... Initializing the ORB... Obtaining the Name Service... Obtaining Component Servers... Installing archives... Creating components... Configuring components... Interconnecting components... Configuration completion... Demonstration demo3 is ready to be used...

61 Getting started with OpenCCM61 The Client / Server-Producer / Consumer CCM application running...

62 Getting started with OpenCCM62 Agenda 1. OMG IDL3 : design the application by defining components and assembling component instances 2. OpenCCM compilation and generation chain for the demo3 example 3. OpenCCM execution chain for the demo3 example 4. Package, assembly and deploy the CCM application with XML descriptors (edited using simple GUI)

63 Getting started with OpenCCM63 4. Package, assembly and deploy the CCM application with XML descriptors edited using simple GUI Software Package Descriptor describe general elements (title, author, description, web page, license, link to IDL file...etc) and list implementations (information about implementations like OS, ORB, language, compiler, dependancies on other libraries...etc., entry point) Property File Descriptor used to set home and component properties. It contains pairs of name/value to configure home and component attributes

64 Getting started with OpenCCM64 Package, assembly and deploy the CCM application with XML descriptors edited using simple GUI Component Assembly Descriptor  References component software descriptors client.csd, server.csd and consumer.csd  Defines home instances and their collocation, component instances  Defines that homes, components or ports are to be registered in the ComponentHomeFinder or Naming Service  Defines connections to be made between Client, Server and Consumer component ports (receptacles to facets, event sinks to event sources)

65 Getting started with OpenCCM65 Package, assembly and deploy the CCM application using XML descriptors

66 Getting started with OpenCCM66 Edit XML descriptors using simple GUI  demo : Packaging, Assembling and Deploying the Client / Server – Producer / Consumer CCM application by defining : Component names properties Home instances and their collocation Component instances Connections between components...

67 Getting started with OpenCCM67 Conclusion OpenCCM : 1st open standard for Distributed Component Computing Multi-languages, multi-OSs, multi-ORBs...etc. An open compilation & generation tool chain An OMG IDL3 Compiler An OMG IDL3 Repository A generator for equivalent OMG IDL2 A generator for extended Java skeleton classes A flexible distributed deployment & execution middleware infrastructure

68 Getting started with OpenCCM68 More information ObjectWeb http://www.objectweb.org OpenCCM http://www.objectweb.org/openccm/ Mailing list = openccm@objectweb.org LIFL http://www.lifl.fr...


Download ppt "Getting started with OpenCCM1 Getting started with OpenCCM Tutorial An OpenCCM application : The demo3 “Client / Server-Producer / Consumer” Areski Flissi."

Similar presentations


Ads by Google