SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
ECE 566- Parallel and Distributed Technology
Distributed Objects: CORBA/Java
              RMI
          Manish Parashar
      parashar@ece.rutgers.edu
      Department of Electrical &
       Computer Engineering
         Rutgers University
Distributed Objects: Goals
• Let any object reside anywhere in the
  network, and allow an application to
  interact with these objects exactly in the
  same way as they do with a local objects
• Provide the ability to construct an object on
  one host and transmit it to another host
• Enable an agent on one host to create a new
  object on another host.
Lecture 14 & 15    ECE 566 - Parallel and Distributed   2
                              Computing
Distributed Objects: Operations
• Locate remote object
• Creating remote objects
• Invoke methods on remote objects
• Obtain results from a remote method
  invocation
• Delete remote object


Lecture 14 & 15   ECE 566 - Parallel and Distributed   3
                             Computing
Distributed Objects: Properties
• Object locator
• Communication
      – data type
      – data representation
      – synchronous/asynchronous
•    State Persistence
•    Security
•    Reliability/Availability
•    Load Balancing
Lecture 14 & 15     ECE 566 - Parallel and Distributed   4
                               Computing
Java RMI
• Components
      – Object Interfaces
             • extends the Remote interface
      – Server side implementation of the interface
             • extends the java.rmi.server.UnicastRemoteObject
      – RMI registry
      – rmic compiler for stub and skeleton generation
• Others Issues
      – Serialization
      – Exception handling
      – Constructors
Lecture 14 & 15                ECE 566 - Parallel and Distributed   5
                                          Computing
Java RMI: Object Interfaces

              import java.rmi.Remote;
              import java.rmi.RemoteException;

              public interface DataRetrieval extends Remote
              {
                String GetData()
                      throws RemoteException;
              }




Lecture 14 & 15              ECE 566 - Parallel and Distributed   6
                                        Computing
Java RMI: Server Implementation
import DataRetrieval;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.RMISecurityManager;
import java.rmi.server.UnicastRemoteObject;            public String GetData()
import java.net.InetAddress;                                        throws RemoteException
                                                        {
                                                          String client = null;
public class DataRetrievalImpl
     extends UnicastRemoteObject                             try
     implements DataRetrieval                                {
                                                               client = getClientHost();
{                                                            }
  private int call;                                          catch(Exception e)
                                                             {
                                                               System.out.println(quot;exception: quot; + e);
 public DataRetrievalImpl()                                    client = quot;unknownquot;;
     throws RemoteException                                  }
 {                                                           call++;
   super();                                                  System.out.println(client + quot;
   call = 0;                                                                   request, data is:quot; + call);
 }                                                           return quot;data is:quot; + call;
                                                         }

     Lecture 14 & 15                ECE 566 - Parallel and Distributed                                       7
                                               Computing
Java RMI: Server Implementation
     public static void main(String args[])
     {
       System.out.println(quot;Started server...quot;);
       try
       {
         InetAddress host = InetAddress.getLocalHost();
         String name = quot;//quot; + host.getHostName() + quot;/DataRetrievalquot;;
         System.out.println(quot;binding to quot; + name);
         System.setSecurityManager(new RMISecurityManager());
         DataRetrievalImpl data = new DataRetrievalImpl();
         Naming.rebind(name,data);
       }
       catch(Exception e)
       {
         System.out.println(quot;exception: quot; + e);
       }
     }
 }
Lecture 14 & 15                ECE 566 - Parallel and Distributed      8
                                          Computing
Java RMI: Client
   import DataRetrieval;
   import java.rmi.Naming;
   public class DataRetrievalClient
   {
      public static void main(String[] args)
      {
        if (args.length != 1)
        {
           System.out.println(quot;Please give server namequot;);
           return;
        }
        try
        {
           DataRetrieval data = null;
           String name = quot;rmi://quot; + args[0] + quot;/DataRetrievalquot;;
           data = (DataRetrieval)Naming.lookup(name);
           String reply;
           reply = data.GetData();
           System.out.println(quot;Got quot;+reply);
        }
        catch(Exception e)
        {
           System.out.println(quot;Exception quot;+e);
        }
        System.exit(0);
      }
Lecture 14 & 15                     ECE 566 - Parallel and Distributed   9
   }
                                                 Computing
Java RMI: Registry/rmic
• RMI registry serves the role of the object manager
            • % rmiregistry
            • % rmiregistry <port #> // default is 1099
• Addressing a remote object
MyObject obj1 =
  (MyObject)Naming.lookup(“rmi://objecthost.myorg.com/Object1);
MyObject obj1 =
  (MyObject)Naming.lookup(“rmi://objecthost.myorg.com:2099/Object1);
• rmic compiler
            • rmic serversideimpl
            • generates client stub and server skeleton
            • bootstraps off java bytecode

Lecture 14 & 15                 ECE 566 - Parallel and Distributed     10
                                           Computing
CORBA
• Object Request Broker (ORB)
      – enable clients and server objects to interact
      – provide servers
             • naming services, security services, …
• Interface Definition Language (IDL)
• Dynamic Invocation Interface (DII)
      – Interface repository
• Internet Inter-Orb Protocol (IIOP)
Lecture 14 & 15            ECE 566 - Parallel and Distributed   11
                                      Computing
CORBA Solver
• Generate IDL description
• Generate client stub
             • idltojava -f client Solver.idl
             • generates Base Interface, holder classes & client stubs
                    package DCJ.examples;
                    public class _SolverStub
                                 extends org.omg.CORBA.portable.ObjectImpl
                                 implements DCJ.examples.Solver {



                    package DCJ.examples;
                    public class _ProblemSetStub
                                 extends org.omg.CORBA.portable.ObjectImpl
                                 implements DCJ.examples.ProblemSet {

Lecture 14 & 15                 ECE 566 - Parallel and Distributed           12
                                           Computing
CORBA Solver
• Generate server skeleton and implementation
             • idltojava -f server Solver.idl
             • generates abstract base class for remote implementation
    package DCJ.examples;
    public abstract class _ProblemSetImplBase extends org.omg.CORBA.portable.ObjectImpl
                                              implements DCJ.examples.ProblemSet,
                                                          org.omg.CORBA.portable.Skeleton {

    package DCJ.examples;
    public abstract class _SolverImplBase extends org.omg.CORBA.portable.ObjectImpl
                                          implements DCJ.examples.Solver,
                                                      org.omg.CORBA.portable.Skeleton {




Lecture 14 & 15                    ECE 566 - Parallel and Distributed                         13
                                              Computing
CORBA Solver
• Implement remote object
• Implement client
• Start name server
             • nameserve -ORBInitialport 1050
• Run Server
• Run Client




Lecture 14 & 15             ECE 566 - Parallel and Distributed   14
                                       Computing

Contenu connexe

Tendances (20)

Corba
CorbaCorba
Corba
 
CORBA Basic and Deployment of CORBA
CORBA Basic and Deployment of CORBACORBA Basic and Deployment of CORBA
CORBA Basic and Deployment of CORBA
 
Corba
CorbaCorba
Corba
 
CORBA - Introduction and Details
CORBA - Introduction and DetailsCORBA - Introduction and Details
CORBA - Introduction and Details
 
Corba and-java
Corba and-javaCorba and-java
Corba and-java
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
Chapter10
Chapter10Chapter10
Chapter10
 
C O R B A Unit 4
C O R B A    Unit 4C O R B A    Unit 4
C O R B A Unit 4
 
Common Object Request Broker Architecture
Common Object Request Broker ArchitectureCommon Object Request Broker Architecture
Common Object Request Broker Architecture
 
Corba introduction and simple example
Corba introduction and simple example Corba introduction and simple example
Corba introduction and simple example
 
Corba concepts & corba architecture
Corba concepts & corba architectureCorba concepts & corba architecture
Corba concepts & corba architecture
 
Presentation On Com Dcom
Presentation On Com DcomPresentation On Com Dcom
Presentation On Com Dcom
 
CORBA
CORBACORBA
CORBA
 
Java RMI Presentation
Java RMI PresentationJava RMI Presentation
Java RMI Presentation
 
Corba
CorbaCorba
Corba
 
Rmi, corba and java beans
Rmi, corba and java beansRmi, corba and java beans
Rmi, corba and java beans
 
Unit iv
Unit ivUnit iv
Unit iv
 
Distributed objects
Distributed objectsDistributed objects
Distributed objects
 
Corba in power system
Corba in power systemCorba in power system
Corba in power system
 
DCOM Comparison
DCOM ComparisonDCOM Comparison
DCOM Comparison
 

En vedette

Oopsla 2007 - The Web: Distributed Objects Realized!
Oopsla 2007 - The Web: Distributed Objects Realized!Oopsla 2007 - The Web: Distributed Objects Realized!
Oopsla 2007 - The Web: Distributed Objects Realized!Stuart Charlton
 
java 6 (rmi-corba) education
java 6 (rmi-corba) educationjava 6 (rmi-corba) education
java 6 (rmi-corba) educationM Sinan Şahin
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMIbackdoor
 
A Case Study In Social CRM Without Technology: The Green Bay Packers
A Case Study In Social CRM Without Technology: The Green Bay PackersA Case Study In Social CRM Without Technology: The Green Bay Packers
A Case Study In Social CRM Without Technology: The Green Bay PackersPaul Greenberg
 
Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)Nidhi Baranwal
 
Handling Byzantine Faults
Handling Byzantine FaultsHandling Byzantine Faults
Handling Byzantine Faultsawesomesos
 
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...Mitul Tiwari
 
orkut and social networking
orkut and social networkingorkut and social networking
orkut and social networkingprashant
 
shiv nadar and hcl
shiv nadar and hclshiv nadar and hcl
shiv nadar and hclprashant
 
supriya gayen 11 - Copy
supriya gayen 11 - Copysupriya gayen 11 - Copy
supriya gayen 11 - CopySupriya Gayen
 
تحليل المعلومات في الشبكات الإجتماعية
تحليل المعلومات في الشبكات الإجتماعيةتحليل المعلومات في الشبكات الإجتماعية
تحليل المعلومات في الشبكات الإجتماعيةRiyadh Geeks
 
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8helpsoft01
 

En vedette (20)

Oopsla 2007 - The Web: Distributed Objects Realized!
Oopsla 2007 - The Web: Distributed Objects Realized!Oopsla 2007 - The Web: Distributed Objects Realized!
Oopsla 2007 - The Web: Distributed Objects Realized!
 
Rmi presentation
Rmi presentationRmi presentation
Rmi presentation
 
java 6 (rmi-corba) education
java 6 (rmi-corba) educationjava 6 (rmi-corba) education
java 6 (rmi-corba) education
 
Social crm
Social crmSocial crm
Social crm
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMI
 
A Case Study In Social CRM Without Technology: The Green Bay Packers
A Case Study In Social CRM Without Technology: The Green Bay PackersA Case Study In Social CRM Without Technology: The Green Bay Packers
A Case Study In Social CRM Without Technology: The Green Bay Packers
 
Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)
 
Introduction To Rmi
Introduction To RmiIntroduction To Rmi
Introduction To Rmi
 
Java RMI
Java RMIJava RMI
Java RMI
 
Handling Byzantine Faults
Handling Byzantine FaultsHandling Byzantine Faults
Handling Byzantine Faults
 
TN566 labs
TN566 labsTN566 labs
TN566 labs
 
Station 1 POD1
Station 1 POD1Station 1 POD1
Station 1 POD1
 
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
 
orkut and social networking
orkut and social networkingorkut and social networking
orkut and social networking
 
shiv nadar and hcl
shiv nadar and hclshiv nadar and hcl
shiv nadar and hcl
 
cv
cvcv
cv
 
supriya gayen 11 - Copy
supriya gayen 11 - Copysupriya gayen 11 - Copy
supriya gayen 11 - Copy
 
تحليل المعلومات في الشبكات الإجتماعية
تحليل المعلومات في الشبكات الإجتماعيةتحليل المعلومات في الشبكات الإجتماعية
تحليل المعلومات في الشبكات الإجتماعية
 
RMI
RMIRMI
RMI
 
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
Comparison between-rpc-rmi-and-webservices-son-1228374226080667-8
 

Similaire à Distributed Objects: CORBA/Java RMI

Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocationelliando dias
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?Doug Hawkins
 
Distributed Objects and JAVA
Distributed Objects and JAVADistributed Objects and JAVA
Distributed Objects and JAVAelliando dias
 
(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++Amazon Web Services
 
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!Priyanka Aash
 
Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)aragozin
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsAzul Systems, Inc.
 
Java remote method invocation
Java remote method invocationJava remote method invocation
Java remote method invocationVan Dawn
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js frameworkBen Lin
 
Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVMSylvain Wallez
 
Building Testable PHP Applications
Building Testable PHP ApplicationsBuilding Testable PHP Applications
Building Testable PHP Applicationschartjes
 

Similaire à Distributed Objects: CORBA/Java RMI (20)

Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
17rmi
17rmi17rmi
17rmi
 
Cp7 rpc
Cp7 rpcCp7 rpc
Cp7 rpc
 
Java rmi
Java rmiJava rmi
Java rmi
 
Using the Windows 8 Runtime from C++
Using the Windows 8 Runtime from C++Using the Windows 8 Runtime from C++
Using the Windows 8 Runtime from C++
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Distributed Objects and JAVA
Distributed Objects and JAVADistributed Objects and JAVA
Distributed Objects and JAVA
 
(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++(DEV204) Building High-Performance Native Cloud Apps In C++
(DEV204) Building High-Performance Native Cloud Apps In C++
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
Breaking Parser Logic: Take Your Path Normalization Off and Pop 0days Out!
 
Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)Virtualizing Java in Java (jug.ru)
Virtualizing Java in Java (jug.ru)
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM Mechanics
 
Java remote method invocation
Java remote method invocationJava remote method invocation
Java remote method invocation
 
Rmi
RmiRmi
Rmi
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVM
 
Building Testable PHP Applications
Building Testable PHP ApplicationsBuilding Testable PHP Applications
Building Testable PHP Applications
 
My java file
My java fileMy java file
My java file
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 

Plus de elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

Plus de elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Dernier

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Distributed Objects: CORBA/Java RMI

  • 1. ECE 566- Parallel and Distributed Technology Distributed Objects: CORBA/Java RMI Manish Parashar parashar@ece.rutgers.edu Department of Electrical & Computer Engineering Rutgers University
  • 2. Distributed Objects: Goals • Let any object reside anywhere in the network, and allow an application to interact with these objects exactly in the same way as they do with a local objects • Provide the ability to construct an object on one host and transmit it to another host • Enable an agent on one host to create a new object on another host. Lecture 14 & 15 ECE 566 - Parallel and Distributed 2 Computing
  • 3. Distributed Objects: Operations • Locate remote object • Creating remote objects • Invoke methods on remote objects • Obtain results from a remote method invocation • Delete remote object Lecture 14 & 15 ECE 566 - Parallel and Distributed 3 Computing
  • 4. Distributed Objects: Properties • Object locator • Communication – data type – data representation – synchronous/asynchronous • State Persistence • Security • Reliability/Availability • Load Balancing Lecture 14 & 15 ECE 566 - Parallel and Distributed 4 Computing
  • 5. Java RMI • Components – Object Interfaces • extends the Remote interface – Server side implementation of the interface • extends the java.rmi.server.UnicastRemoteObject – RMI registry – rmic compiler for stub and skeleton generation • Others Issues – Serialization – Exception handling – Constructors Lecture 14 & 15 ECE 566 - Parallel and Distributed 5 Computing
  • 6. Java RMI: Object Interfaces import java.rmi.Remote; import java.rmi.RemoteException; public interface DataRetrieval extends Remote { String GetData() throws RemoteException; } Lecture 14 & 15 ECE 566 - Parallel and Distributed 6 Computing
  • 7. Java RMI: Server Implementation import DataRetrieval; import java.rmi.Naming; import java.rmi.RemoteException; import java.rmi.RMISecurityManager; import java.rmi.server.UnicastRemoteObject; public String GetData() import java.net.InetAddress; throws RemoteException { String client = null; public class DataRetrievalImpl extends UnicastRemoteObject try implements DataRetrieval { client = getClientHost(); { } private int call; catch(Exception e) { System.out.println(quot;exception: quot; + e); public DataRetrievalImpl() client = quot;unknownquot;; throws RemoteException } { call++; super(); System.out.println(client + quot; call = 0; request, data is:quot; + call); } return quot;data is:quot; + call; } Lecture 14 & 15 ECE 566 - Parallel and Distributed 7 Computing
  • 8. Java RMI: Server Implementation public static void main(String args[]) { System.out.println(quot;Started server...quot;); try { InetAddress host = InetAddress.getLocalHost(); String name = quot;//quot; + host.getHostName() + quot;/DataRetrievalquot;; System.out.println(quot;binding to quot; + name); System.setSecurityManager(new RMISecurityManager()); DataRetrievalImpl data = new DataRetrievalImpl(); Naming.rebind(name,data); } catch(Exception e) { System.out.println(quot;exception: quot; + e); } } } Lecture 14 & 15 ECE 566 - Parallel and Distributed 8 Computing
  • 9. Java RMI: Client import DataRetrieval; import java.rmi.Naming; public class DataRetrievalClient { public static void main(String[] args) { if (args.length != 1) { System.out.println(quot;Please give server namequot;); return; } try { DataRetrieval data = null; String name = quot;rmi://quot; + args[0] + quot;/DataRetrievalquot;; data = (DataRetrieval)Naming.lookup(name); String reply; reply = data.GetData(); System.out.println(quot;Got quot;+reply); } catch(Exception e) { System.out.println(quot;Exception quot;+e); } System.exit(0); } Lecture 14 & 15 ECE 566 - Parallel and Distributed 9 } Computing
  • 10. Java RMI: Registry/rmic • RMI registry serves the role of the object manager • % rmiregistry • % rmiregistry <port #> // default is 1099 • Addressing a remote object MyObject obj1 = (MyObject)Naming.lookup(“rmi://objecthost.myorg.com/Object1); MyObject obj1 = (MyObject)Naming.lookup(“rmi://objecthost.myorg.com:2099/Object1); • rmic compiler • rmic serversideimpl • generates client stub and server skeleton • bootstraps off java bytecode Lecture 14 & 15 ECE 566 - Parallel and Distributed 10 Computing
  • 11. CORBA • Object Request Broker (ORB) – enable clients and server objects to interact – provide servers • naming services, security services, … • Interface Definition Language (IDL) • Dynamic Invocation Interface (DII) – Interface repository • Internet Inter-Orb Protocol (IIOP) Lecture 14 & 15 ECE 566 - Parallel and Distributed 11 Computing
  • 12. CORBA Solver • Generate IDL description • Generate client stub • idltojava -f client Solver.idl • generates Base Interface, holder classes & client stubs package DCJ.examples; public class _SolverStub extends org.omg.CORBA.portable.ObjectImpl implements DCJ.examples.Solver { package DCJ.examples; public class _ProblemSetStub extends org.omg.CORBA.portable.ObjectImpl implements DCJ.examples.ProblemSet { Lecture 14 & 15 ECE 566 - Parallel and Distributed 12 Computing
  • 13. CORBA Solver • Generate server skeleton and implementation • idltojava -f server Solver.idl • generates abstract base class for remote implementation package DCJ.examples; public abstract class _ProblemSetImplBase extends org.omg.CORBA.portable.ObjectImpl implements DCJ.examples.ProblemSet, org.omg.CORBA.portable.Skeleton { package DCJ.examples; public abstract class _SolverImplBase extends org.omg.CORBA.portable.ObjectImpl implements DCJ.examples.Solver, org.omg.CORBA.portable.Skeleton { Lecture 14 & 15 ECE 566 - Parallel and Distributed 13 Computing
  • 14. CORBA Solver • Implement remote object • Implement client • Start name server • nameserve -ORBInitialport 1050 • Run Server • Run Client Lecture 14 & 15 ECE 566 - Parallel and Distributed 14 Computing