Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed OmniORB II Michael E. Kounavis Dept. of Electrical Engineering.

Similar presentations


Presentation on theme: "1 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed OmniORB II Michael E. Kounavis Dept. of Electrical Engineering."— Presentation transcript:

1 1 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed OmniORB II Michael E. Kounavis Dept. of Electrical Engineering Columbia University http://comet.columbia.edu/~mk mk@comet.columbia.edu Tutorial 3 12 November, 1998 Implementing a Session Controller

2 2 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed The Problem Consider three Internet hosts H1, H2 and H3. H1 transmits video packets to H3 via H2 and the session is controlled by a CORBA-based distributed system. This system comprises a ReceiverServer object running on H3, a NodeServer object running on H2 and a SessionController object running at a location different from H1, H2 or H3. A CORBA client runs on H1. The ReceiverServer object interface supports the opening of a UDP socket and the allocation of a free port for receiving packets. The NodeServer object interface supports the opening of a UDP socket, the allocation of a free port, and the forwarding of packets from the allocated port to a specified IP address and destination port. The creation of a datapath link between H1, H2 and H3 is hidden from H1 which interacts only with the SessionController object to establish the datapath.

3 3 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed NodeServer ReceiverServer SessionController CORBA client createSession(H3) returns H2, port2 receiverSetup() returns port flowSetup(H3, port) returns port2 1 1 2 3 4 5 6 H1 H2 H3 The Solution I

4 4 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed The Solution II interface NodeServer { void flowSetup( in string destHost, in short destPort, out short allocPort); } interface ReceiverServer { void receiverSetup ( out short allocPort); } interface SessionController { void createSession ( in string destHost, out string nextHop, out short nextPort ); }

5 5 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed The assignment –Assume that the NodeServer and ReceiverServer objects are implemented and running - Build the Session Controller - Build the CORBA client - Setup a datapath link using the services of the ReceiverServer and NodeServer objects and - Transmit your e-mail address so that it successfully received by the ReceiverServer object.

6 6 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Then... The ReceiverServer sends you an e-mail notifying of you of the successful reception of your message

7 7 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Hints I SessionController is both a client and a server It is a client to the NodeServer and ReceiverServer objects It is a server to your CORBA client Naming Service common to all students: Register your servers under your own path with your own context and object name NodeServer is bound to the path “midterm/NodeServer” with kind attributes set to “midterm_context” and “Object” respectively

8 8 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Hints II ReceiverServer is bound to the path “midterm/ReceiverServer” with kind attributes set to “midterm_context” and “Object” respectively Look at the solution to assignment II for the details of writing a server Your sender uses a UDP socket to transmit data to the receiver. You don’t need to use connect() this time. Destination IP address and port are returned by the createSession() method;

9 9 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Hints III You asume that the SessionController knows a-priori the location of H2, H3 NodeServer and ReceiverServer run on the hosts: harpsichord.comet.columbia.edu (MNL lab) wormwhole.ee.columbia.edu (Intel Lab)

10 10 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Writing a server (revision) First get a reference to ORB and BOA CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv, “omniORB2”); CORBA::ORB_ptr boa = orb->BOA_init(argc, argv, “omniORB2_BOA”); Instantiate the implementation object Echo_i *my_obj = new Echo_i(); myobj->_obj_is_ready(boa); Get an object reference (in order to bind to a name) Echo_var myobjRef = my_obj->_this(); Call impl_is_ready() boa->impl_is_ready();

11 11 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Using the naming service The first time you register your server you invoke bind_new_context(CosNaming::Name contextName) and bind(CosNaming::Name objectName) methods If the server has allready been registered invoke resolve (CosNaming::Name contextName) and rebind(CosNaming::Name objectName) methods

12 12 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed Implementing the client-server Invoke methods supported by the NodeServer and ReceiverServer objects at the body of the creareSession() method of the SessionController_i class Use the orb and boa variables to get object references to these servers It is preferable to declare orb and boa as external variables GOOD LUCK!


Download ppt "1 Distributed Telecommunications Systems Columbia University comet.columbia.edu/distributed OmniORB II Michael E. Kounavis Dept. of Electrical Engineering."

Similar presentations


Ads by Google