A Quick CCM Example. Tutorial on CCM Introduction A Simple Sender&Receiver Scenario Sender sends out the click-out event to inform the Receiver. Receiver.

Slides:



Advertisements
Similar presentations
Three types of remote process invocation
Advertisements

Apache Struts Technology
15 May, 2015 CORBA Object-by-Value An overview of the value type and its IDL-to-C++ mapping. George Edwards Institute for Software-Integrated Systems Vanderbilt.
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
Seminarium on Component-based Software Engineering Jan Willem Klinkenberg CORBA.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Persistent State Service 1 CORBA Component  Component model  Container programming model  Component implementation framework  Component packaging and.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Introduction to Remote Method Invocation (RMI)
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
II. Middleware for Distributed Systems
1 Web Services Visual C# 2008 Step by Step Chapter 30.
1 Aniruddha Gokhale Vanderbilt University, Spring 2003 Intro to TAO Programming Study the Hello example in ACE_wrappers/TAO/tests –Show IDL definition,
UNIT-V The MVC architecture and Struts Framework.
JAVA Implementation of CCM Configuration Shufeng Li MSE final Project Presentation I.
Nanbor WangQoS-Enabled CCM Overview and CIAO Status Washington University, St. Louis QoS-Enabled CCM Meeting Overview Motivations of CORBA Component Model.
1 Lecture 22 George Koutsogiannakis Summer 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
Configuration Management and Server Administration Mohan Bang Endeca Server.
EJB. Component Characteristics An enterprise Bean typically contains business logic that operates on the enterprise’s data. An enterprise Bean’s instances.
An Object-Oriented Approach to Programming Logic and Design
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
Getting started with OpenCCM1 Getting started with OpenCCM Tutorial An OpenCCM application : The demo3 “Client / Server-Producer / Consumer” Areski Flissi.
Container-Managed Persistence (CMP) Entity Beans Lesson 3A / Slide 1 of 42J2EE Server Components Objectives In this lesson, you will learn to: Identify.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
Tutorial on the Lightweight CORBA Component Model (CCM) Industrializing the Development Distributed Real-time & Embedded Systems Other contributors include.
October 6, 2015 Tutorial on CORBA Component Model (CCM) Nanbor Wang Craig Rodrigues Washington University BBN Technologies St. Louis.
J2EE Structure & Definitions Catie Welsh CSE 432
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Tutorial on the Lightweight CORBA Component Model (CCM) Industrializing the Development of Distributed Real- time & Embedded Applications Other contributors.
Information Management NTU Interprocess Communication and Middleware.
Tutorial on the Lightweight CORBA Component Model (CCM) Industrializing the Development of Distributed Real- time & Embedded Applications Other contributors.
Interoperability between Scientific Workflows Ahmed Alqaoud, Ian Taylor, and Andrew Jones Cardiff University 10/09/2008.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
CORBA/IDL Common Object Resource Broker Architecture (CORBA) Interface Definition Language (IDL) Object Management Group (OMG) ( Specification.
Netprog: Corba Object Services1 CORBA 2.0 Object Services Ref: The Essential Distributed Objects Survival Guide: Orfali, Harky & Edwards.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
03 October 2006Kaiser: COMS W4156 Fall COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
Module 8: Delegates and Events. Overview Delegates Multicast Delegates Events When to Use Delegates, Events, and Interfaces.
Tutorial on the Lightweight CORBA Component Model (CCM) Industrializing the Development of Distributed Real-time & Embedded Applications Douglas C. Schmidt.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Testing Spring Applications Unit Testing.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
August 20, 2002 Applying RT-Policies in CORBA Component Model Nanbor Wang Department of Computer Science Washington University in St. Louis
.NET Mobile Application Development XML Web Services.
Chapter 4 Request and Response. Servlets are controlled by the container.
09 October 2007Kaiser: COMS W4156 Fall COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
IDL Models The Inheritance Model: Using the Inheritance Model, you implement the IDL interface using an implementation class that also extends the compiler-generated.
SPEAKER: MUHAMMAD REZA ZULMAN DATE: NOVEMBER 17, 2014 OPENFLOW SPECIFICATION.
1 Data Structures CSCI 132, Spring 2014 Lecture 2 Classes and Abstract Data Types Read Ch Read Style Guide (see course webpage)
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
Data Sharing Service Kiran Devaram Samatha Gangapuram Harish Maringanti Prashant Shanti Kumar Pradeep Tallogu.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Krishnakumar Balasubramanian
Programming Models for Distributed Application
J2EE Application Development
CORBA Object-by-Value
Building a CORBA Server
Remote method invocation (RMI)
Remote invocation (call)
The Grid Component Model and its Implementation in ProActive
Presentation transcript:

A Quick CCM Example

Tutorial on CCM Introduction A Simple Sender&Receiver Scenario Sender sends out the click-out event to inform the Receiver. Receiver reads the message from Sender. Multiple instances of the Receiver could be deployed. $CIAO_ROOT/examples/Hello $CIAO_ROOT/examples/Hello/ste p-by-step.html

Tutorial on CCM Steps To Develop A CIAO Based Application 1.Define your IDL types. 2.Define your Component types. 3.Implement your components. 4.Assemble your components. 5.Deploy and run your application.

A Quick CCM Example Define IDL/Component Types

Tutorial on CCM Common IDL module Hello { interface message { string get_message(); }; eventtype timeout { }; }; Common IDL definition. Used by both Sender and Receiver. $CIAO_ROO/examples/Hello/Hello_Base/Hello_Base.idl This file could be skipped if not necessary.

Tutorial on CCM Component Definition (IDL) – Receiver 1/3 //Receiver.idl component Receiver { uses message read_message; consumes timeout click_in; }; home ReceiverHome manages Receiver{}; Define the event receptacle.

Tutorial on CCM Component Definition (IDL) – Receiver 2/3 //Receiver.idl component Receiver { uses message read_message; consumes timeout click_in; }; home ReceiverHome manages Receiver{}; Define the interface receptacle.

Tutorial on CCM Component Definition (IDL) – Receiver 3/3 //Receiver.idl component Receiver { uses message read_message; consumes timeout click_in; }; home ReceiverHome manages Receiver{}; Define the component home

Tutorial on CCM Component Definition (IDL) – Sender 1/5 //Sender.idl interface trigger { void start (); }; component Sender supports trigger { provides message push_message; publishes timeout click_out; attribute string local_message;}; home SenderHome manages Sender {}; Define the event source.

Tutorial on CCM Define the interface facet. The interface facet is plugged into the component in the way of composition. //Sender.idl interface trigger { void start (); }; component Sender supports trigger { provides message push_message; publishes timeout click_out; attribute string local_message;}; home SenderHome manages Sender {}; Component Definition (IDL) – Sender 2/5

Tutorial on CCM Define the attribute. //Sender.idl interface trigger { void start (); }; component Sender supports trigger { provides message push_message; publishes timeout click_out; attribute string local_message;}; home SenderHome manages Sender {}; Component Definition (IDL) – Sender 3/5

Tutorial on CCM Sender specific interface. //Sender.idl interface trigger { void start (); }; component Sender supports trigger { provides message push_message; publishes timeout click_out; attribute string local_message;}; home SenderHome manages Sender {}; Component Definition (IDL) – Sender 4/5 Supported interface which is part of the component (inheritance).

Tutorial on CCM Define the component home. //Sender.idl interface trigger { void start (); }; component Sender supports trigger { provides message push_message; publishes timeout click_out; attribute string local_message;}; home SenderHome manages Sender {}; Component Definition (IDL) – Sender 5/5

A Quick CCM Example Component Implementations

Tutorial on CCM What does CIDL do? 1/2 CIDL is part of CCM strategy for managing complex applications Helps separation of concerns Helps coordination of tools Increases the ratio of generated to hand-written code Server code is now generated, startup automated by other CCM tools uses

Tutorial on CCM A CIDL file is Passed to CIDL compiler Triggers code generation for –Component Home ( SenderHome ) –managed component ( Senderer ) CIDL compiler generates –SenderHome servant –Senderer servant attribute operations port operations supported interface operations container callback operations navigation operation overrides –IDL executor mapping –XML descriptor with meta-data What does CIDL do? 2/2

Tutorial on CCM Sender.cidl SenderHome servant Sender servant SenderHome_Exec Sender_Exec Manages // Sender.cidl composition session Sender_Impl { home executor SenderHome_Exec { implements SenderHome; manages Sender_Exec; } }; An executor is where a component/home is implemented –The component/home’s servant will forward a client’s business logic request on the component to its corresponding executor User should write the implementations (specified in the exacutor mapping IDL file) of: –SenderHome_Exec –Sender_Exec Which are (In the example): –class SenderHome_exec_i –class Sender_exec_i

Tutorial on CCM Executor Mapping 1/2 CIDL compiler generates the Executor Mapping An IDL file consists of local interface definitions. IDL compiler will generate the stubs for these local interfaces. uses Home servant Component servant Home_Exec Component_Exec Manages Defines

Tutorial on CCM Executor Mapping 2/2 //Sender.cidl –snipped-- composition session Sender_Impl { home executor SenderHome_Exec { implements Hello::SenderHome; manages Sender_Exec; }; }; //SenderE.idl --snipped— Module Sender_Impl { local interface Sender_Exec: … Local interface SenderHome_Exec: … }; CIDL Compiler //SenderEC.h --snipped— namespace Sender_Impl { class Sender_Exec: … class SenderHome_Exec: … }; IDL Compiler Inheritance //Sender_exec.h --snipped— namespace Sender_Impl { class Sender_Exec_i: public virtual Sender_Exec … class SenderHome_Exec_i: public virtual SenderHome_Exec … }; User writes Auto- generated

A Quick CCM Example Implementation in Detail

Tutorial on CCM Implementation in Detail - Overview Component Specific context Interface connection –Facet –Receptacle Event connection –Event source –Event receptacle Attribute Component Entry point Handles all connections/subscriptions

Tutorial on CCM Initializing Component-specific Context Component-specific context manages connections & subscriptions Container passes component its context via either –set_session_context() –set_entity_context() class Sender_exec_i : public virtual Sender_Exec, public virtual CORBA::LocalObject { protected: Sender_Exec_Context_var context_; public: … void set_session_context (Components::SessionContext_ptr c) { this->context_ = Sender_Exec_Context::narrow (c); } … }; //SenderE.idl –snipped-- local interface Sender_Exec : Hello::CCM_Sender, Components::SessionComponent { };

Tutorial on CCM Implement the Provided Interface Facet 1/2 //Sender.idl –snipped-- component Sender supports trigger { provides message push_message; …}; //SenderE.idl --snipped— Module Hello { local interface CCM_message:message … local interface CCM_Sender : … { Hello::CCM_message get_push_message(); } }; //Hello_Base.idl –snipped-- Module Hello { interface message { …}; … } //Sender_exec.h --snipped— namespace Sender_Impl { class Sender_Exec_i: public virtual Sender_Exec … { public : … get_push_message () {return (new Message_Impl(…)); } }; class Message_Impl : public virtual CCM_message … { //All operations in interface //message }; We use Message_Impl to implement interface message. In this example, we intend to plug the facet into the component. In C++ terminology, we use composition but not inheritance.

Tutorial on CCM Implement the Provided Interface Facet 2/2 //Sender.idl –snipped-- component Sender supports trigger push_message { provides message push_message; …}; //SenderE.idl --snipped— Module Hello { local interface CCM_message:message … local interface CCM_Sender : … { push_message Hello::CCM_message get_push_message(); } }; //Hello_Base.idl –snipped-- Module Hello { interface message { …}; … } //Sender_exec.h --snipped— namespace Sender_Impl { class Sender_Exec_i: public virtual Sender_Exec … { public : push_message … get_push_message () {return (new Message_Impl(…)); } }; class Message_Impl : public virtual CCM_message … { //All operations in interface //message }; }; We plug the interface facet into the component and implement the get_ method, which will be called by D&C tools or client to get the object reference of the interface servant implementation. User is responsible for managing the lifecycle of the facet object.

Tutorial on CCM Invocation on Interface Receptacle //Receiver.idl –snipped-- component Receiver { read_message uses message read_message; … }; //Hello_Base.idl –snipped-- Module Hello { interface message { String get_message (); }; … }; //Receiver_exec.h/cpp --snipped— namespace Receiver_Impl { class Receiver_Exec_i: public virtual Receiver_Exec … { public : void push_click_in () { read_message Hello::message_var rev = this->context_- >get_connection_read_message(); CORBA::String_var str = rev->get_message(); } };}; Component specific context manages the receptacle connections. Component executor implementation acquires the connected reference by calling: get_connection_. Then you can invoke opertaions supported by the interface on the OBJ reference. Get the Obj-Ref Operation invocation

Tutorial on CCM Send out an Event //Sender.idl –snipped-- Component Sender.idl click_out { publishes timeout click_out; … }; //Hello_Base.idl –snipped-- Module Hello { eventtype timeout { …}; … } //Sender_exec.h/cpp --snipped— namespace Sender_Impl { class Sender_Exec_i: public virtual Sender_Exec … { public : void start () { this->context_-> click_out push_click_out(); } };}; Component specific context manages the event source. push_ sends out a event. //SenderE.idl --snipped— module Hello { local interface CCM_Sender_Contex : …{ click_out void push_click_out(); } }; module Sender_Impl { typedef Hello::CCM_Sender_Contex Sender_Exec_Contex; };

Tutorial on CCM Upon Receiving an Event //Receiver.idl –snipped-- component Receiver { click_in consuems timeout click_in; … }; //Hello_Base.idl –snipped-- Module Hello { eventtype timeout {}; … }; //Receiver_exec.h --snipped— namespace Receiver_Impl { class Receiver_Exec_i: public virtual Receiver_Exec … { public : void push_click_in (); }; CIDL generates event consumer servants Executor mapping defines push operations directly push_ will be called upon receiving an event. //ReceiverE.idl --snipped— module Hello { local interface CCM_Receiver : …{ click_in void push_click_in(); } }; module Sender_Impl { Hello::CCM_Receiver_Exec : CCM_Receiver {}; };

Tutorial on CCM Attribute Implementation //Sender.idl –snipped-- component Sender { local_message attribute string local_message; … }; //Sender_exec.h --snipped— namespace Sender_Impl { class Sender_Exec_i: public virtual Sender_Exec … { public : void local_message (const char* ); char * local_message (); }; }; Intended for component configuration User need to implement the Accessor and Mutator methods. //SenderE.idl --snipped— module Hello { local interface CCM_Sender : …{ attribute string local_message; } }; module Sender_Impl { Hello::CCM_Receiver_Exec : CCM_Receiver {}; };

Tutorial on CCM Component Entry Point extern "C" { Components::HomeExecutorBase_ptr creatSenderHome_Impl (void) { return new Sender_Impl::SenderHome_exec_i(); } } The signature is defined by the CCM spec Container calls this method to create a home executor extern “C” required to prevent C++ name mangling, so function name can be resolved in DLL XML tag reserved for entry point name Assembly ServerActivator ComponentServer Container CCMHome «instantiates»... createSenderHome_Impl ()