1 Naming Service. 2 Naming service The CORBA COS (Common Object Services) Naming Service provides a tree- like directory for object references –It is.

Slides:



Advertisements
Similar presentations
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Advertisements

COM vs. CORBA.
Slides for Chapter 20: CORBA Case Study From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Addison-Wesley 2005.
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
CORBA Architecture Nitin Prabhu. Outline CORBA Object Model CORBA Architecture Static Invocation Dynamic Invocation CORBA Communication Model.
1 Distributed Systems Distributed Objects & Remote Invocation CORBA Dr. Sunny Jeong. Mr. Colin Zhang With Thanks.
DISTRIBUTED FILE SYSTEM USING RMI
1 HANDOUT 14 Remote Method Invocation (RMI) BY GEORGE KOUTSOGIANNAKIS THIS DOCUMENT CAN NOT BE REPRODUCED OR DISTRIBUTED WITHOUT TH E WRITTEN PERMISSION.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 11: CORBA.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
A First Java ORB Application 1  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces  Interface Definition.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 13: CORBA.
Hands-On Microsoft Windows Server 2003 Networking Chapter 7 Windows Internet Naming Service.
II. Middleware for Distributed Systems
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
By Dr. Jiang B. Liu 11. Java IDL and CORBA  Generic ORB Core  idltojava development tool  CORBA Object Service (COS) name service - nameserv  Java.
Naming Names in computer systems are used to share resources, to uniquely identify entities, to refer to locations and so on. An important issue with naming.
CORBA Chapter 17 Coulouris text. Today’s Topics CORBA History and goals CORBA RMI CORBA services The Distributed Whiteboard Revisited.
Naming And Directory Services Geetika Sharma 09/22/200 8 CSC8320.
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
CORBA Programming Using ACE/TAO
Presented by Robert Zaremba.  Remote messages must be sent to a message queue so that components are decoupled  Both sides of a communication must be.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
CORBA Celsina Bignoli Enterprise Computing Corporation have similar computing environments: –mixed set of HW platforms –a mixed set.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
1 G52IWS: Distributed Computing Chris Greenhalgh.
Lecture 15 Introduction to Web Services Web Service Applications.
Information Management NTU Interprocess Communication and Middleware.
Copyright (c) Qusay H. Mahmoud 1 The Naming Service (Client’s View) A tree-like directory for object references Much like a file system: provides directory.
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
Abhishek Bachchan Vishal Patangia
CORBA/IDL Common Object Resource Broker Architecture (CORBA) Interface Definition Language (IDL) Object Management Group (OMG) ( Specification.
CORBA – Command Line CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
1 Lecture 11 George Koutsogiannakis / Summer 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
CORBA Details Three Tier Architecture CORBA API Holders and Helpers COS Naming and Naming Contexts Transient and Persistent Objects Properties Callbacks.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
Getting Started with OPC.NET OPC.NET Software Client Interface Client Base Server Base OPC Wrapper OPC COM Server Server Interface WCF Alternate.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
Java Programming: Advanced Topics 1 Networking Programming Chapter 11.
CORBA – Eclipse CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
CORBA_1/001 Department of Computer Science Southern Illinois University Edwardsville Spring, 2010 Dr. Hiroshi Fujinoki CORBA:
 Common Object Request Broker Architecture  An industry standard developed by OMG to help in distributed programming.
1 CORBA. 2 What options do I have for distributed application development using java? 1.RMI-IIOP is for developers who program in the Java programming.
Remote Method Invocation with Java-RMI
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
(C) 2003 University of ManchesterCS31010 Lecture 14: CORBA.
IDL Models The Inheritance Model: Using the Inheritance Model, you implement the IDL interface using an implementation class that also extends the compiler-generated.
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.
KMIP Compliance Redefining Server and Client requirements to claim compliance Presented by: Bob Lockhart.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Remote Method Invocation Internet Computing Workshop Lecture 17.
Common Object Request Broker Architecture (CORBA)
Troubleshooting Network Communications
Chapter 2: System Structures
CORBA Alegria Baquero.
What is RMI? Remote Method Invocation
Ch > 28.4.
Knowledge Byte In this section, you will learn about:
CORBA Alegria Baquero.
Chapter 40 Remote Method Invocation
The Common Object Request Broker Architecture (CORBA)
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
Network Diagnostics Framework
Presentation transcript:

1 Naming Service

2 Naming service The CORBA COS (Common Object Services) Naming Service provides a tree- like directory for object references –It is like a filesystem provides a directory structure for files. The Naming Service provided with Java IDL is an implementation of the COS Naming Service specification.COS Naming Service specification

3 Naming service (cont.) A name-to-object association is called a name binding. A name binding is always defined relative to a naming context. A naming context is an object that contains a set of name bindings in which each name is unique. Different names can be bound to an object in the same or different contexts at the same time.

4 Naming service (cont.) To resolve a name is to determine the object associated with the name in a given context.resolve a name To bind a name is to create a name binding in a given context.bind a name A name is always resolved relative to a context - there are no absolute names.

5 Naming service (cont.) Because a context is like any other object, it can also be bound to a name in a naming context. Binding contexts in other contexts creates a naming graph – –a directed graph with nodes and labeled edges where the nodes are contexts.

6 Naming service (cont.) A naming graph allows more complex names to reference an object. Given a context in a naming graph, a sequence of names can reference an object. This sequence of names (called a compound name) –defines a path in the naming graph to navigate the resolution process.

7 Naming service (cont.) For an application to use the COS Naming Service, its ORB must know –the port of a host running a naming service or –have access to a stringified initial naming context for that naming service. The naming service can either be the Java IDL naming service or another COS-compliant naming service.

8 Naming service (cont.) Prior to running a client or a server, you will start ORBD. ORBD includes –a persistent Naming Service and –a transient Naming Service, both of which are an implementation of the COS Naming Service.

9 Persistent Naming Service The Persistent Naming Service provides persistence for naming contexts. –information is persistent across service shutdowns and startups, and –is recoverable in the event of a service failure. –If ORBD is restarted, the Persistent Naming Service will restore the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).

10 Transient Naming Service For backward compatibility, tnameserv, a Transient Naming Service shipped with older versions of the JDK, is also included in J2SE v.1.4. –A transient naming service retains naming contexts as long as it is running. –If there is a service interruption, the naming context graph is lost.

11 How to get the naming service? Both client and server should agree on which root naming context to use. The orb.resolve_initial_references(String name_of_service) method is used to obtain the root naming context. If you get a handle on a Naming Service by providing "NameService" as the name_of_service, you will get a persistent naming service, meaning that the naming context graph will be restored after a service failure. If you get the handle using "TNameService", you will get a transient naming service, meaning that you will need to re- obtain the root naming context using orb.resolve_initial_references(String name_of_service) if there is a service interruption.

12 Code to get the naming service? For example, // get the root naming context org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

13 Getting naming service The string "NameService" is defined for all CORBA ORBs. When you pass in this string, the ORB returns a naming context object that is an object reference for: –The persistent name service if you are using the Naming Service that is part of ORBD. –The transient name service if you are using tnameserv.

14 Getting TNameService naming service in ORBD (cont.) To specify that you want to use the transient naming service with ORBD, pass in the string "TNameService". The string "TNameService" is a proprietary name. When you pass in this string, the ORB returns a naming context object that is an object reference for ORBD's transient name service.

15 NamingContextExt As with all CORBA object references, objRef is a generic CORBA object. To use it as a NamingContextExt object, you must narrow it to its proper type.narrow NamingContextExtHelper is an idlj -generated helper class, similar in function to HelloHelper. The ncRef object is now an org.omg.CosNaming.NamingContextExt and you can use it to access the naming service and register the server. NamingContextExt and NamingContextExtHelper are new to this release of J2SE.

16 NamingContextExt (cont) NamingContextExt is the extension of NamingContext.NamingContextExt It contains a set of name bindings in which each name is unique and It is part of the Interoperable Naming Service. Interoperable Naming Service Different names can be bound to an object in the same or different contexts at the same time. Using NamingContextExt, you can use URL- based names to bind and resolve. NamingContextExtHelper provides additional helper methods like narrow() that are type- specific but don't deal with business logic.

17 Interoperable Naming Service (INS) INS is a URL-based naming system on top of the CORBA Naming Service, as well as –a common bootstrap mechanism that lets applications share a common initial naming context. The INS provides the following features: –Capability to resolve using stringified names (e.g., a/b.c/d)stringified names –URLs for CORBA object references (corbaloc: and corbaname: formats)corbaloc: corbaname: –Standard APIs in NamingContextExt for converting between CosNames, URLs, and Strings –ORB arguments for bootstrapping (ORBInitRef and ORBDefaultInitRef)bootstrapping

18 Interoperable Naming Service

19 Interoperable Naming Service (INS) An object reference contains at least three pieces of information: –an address, – the name of the POA that created an object reference, and –an Object ID. Using INS, you can provide a URL to access the CORBA object, –which is more readable than a stringified IOR.

20 stringified object reference The following stringified object reference formats are allowed: 1.Interoperable Object References (IOR) –An IOR is an object reference that is understood by ORBs that can interoperate using the OMG-defined protocols GIOP and IIOP. –A client can obtain an object reference using orb.object_to_string(objRef), as shown in the Browsing the Namespace example, or as a result of an invocation on another object reference. Browsing the Namespace Note: If an IOR contains multiple profiles, the J2SE v.1.4 ORB always uses the first one.

21 stringified object reference (cont) 2.Human-Readable URL Formats for CORBA Object References corbaloc: The corbaloc: format is useful for CORBA client programs, and is typically used to resolve the reference using the GIOP LocateRequest or Request message.

22 stringified object reference (cont) corbaloc:(cont.) For example, a corbaloc: object reference might look like this: derService This example show how to get an object reference for TraderService from host myBank.com on port 2050.

23 stringified object reference (cont) corbaname: The corbaname: format provides a mechanism for a client to bootstrap directly, and is typically used to resolve the stringified name from the root naming context. For example, a corbaname: object reference might look like this: corbaname::myBank.com:2050#Personal/schedule where myBank.com is the host, 2050 is the port.

24 stringified object reference (cont) corbaname: (cont.) The portion of the reference up to the hash mark (corbaname::myBank.com:2050 ) is the URL that returns the root naming context. This example provides the URL to use to: a) locate the Naming Service, and, b) resolve the name Personal/schedule from the Naming Service.

25 Bootstrap Options for the ORB INS provides ORB options for bootstrapping. To bootstrap a CORBA system, you must give it an object reference. The ORB can be configured to return the handle of a customized CORBA service from resolve_initial_references() using either ORBInitRef and/or ORBDefaultInitRef. For example, -ORBInitRef TraderService = corbaloc::myBank.com:2050/TraderService -ORBDefaultInitRef corbaloc:iiop:1.2:myBank.com:2050

26 Bootstrap Options for the ORB The order of resolution when these options are used is as follows: 1.Objects registered with register_initial_references 2.-ORBInitRef 3.-ORBDefaultInitRef 4.Proprietary Bootstrap (Sun ORBs only)

27 Using the Naming Service To use the Naming Service, you must first write the server and client code that finds and/or creates the namespace and/or the objects in the namespace. Before running the client and server, you must start the Naming Service and tell the client and server where to find it.start the Naming Service

28 Using the Naming Service The following steps loosely suggest what happens when the client and server attempt to access the Naming Service: 1.The server invokes the bind or rebind method to associate a logical name with an object reference. 2.The Naming Service adds this object reference/name binding to its namespace database. 3.A client application invokes the resolve method to obtain an object reference with this name. 4.The client uses an object reference to invoke methods on the target object.

29 Starting the Naming Service we use the Object Request Broker Daemon, orbd, which includes both a Persistent and a Transient Naming Service, and is available with every download of J2SE 1.4 and higher. For a caller (client, peer, or client application) to be able to invoke a method on a remote object, that caller must first obtain a reference to the remote object. Once a remote object is registered on the server, callers can look up the object by name, obtain a remote object reference, and then remotely invoke methods on the object.

30 Stopping the Naming Service To stop the naming service, use the relevant operating system command, such as kill on Solaris, or Ctrl+C in the DOS window in which orbd is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped.

31 How do I connect to a 3rd-party Naming Service from Sun's ORB? The recommended way is to use the Inter- Operable Naming Service (INS), if this option is supported by the 3rd-party Naming Service.Inter- Operable Naming Service (INS) To use the Sun ORB with another vendor's Naming Service, 1.Start the 3rd-party name server on Host and Port. 2.Pass the following argument to ORB.init(): - ORBInitRef e

32 How do I connect to a 3rd-party Naming Service from Sun's ORB? When you do orb.resolve_initial_references( "NameService" ), you should be able to connect to 3rd- party Name Service. If you are still not able to connect, try these troubleshooting hints: –Verify that the 3rd-party Name Service supports INS. –Verify that the host and port information is accurate. –Verify that the 3rd-party Name Service has been started successfully. –Verify that the 3rd-party Name Service supports GIOP 1.2. If not, refer to the Name Server's documentation for the correct the GIOP version, and modify the corbaloc: URL accordingly. –Determine if the 3rd-party Name Service has a different object key it uses to contact NameService. If so, refer to the Name Server's documentation.

33 References Naming service: URL: g.html Java IDL: Interoperable Naming Service (INS): URL: orial.html