SlideShare una empresa de Scribd logo
1 de 14
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Más 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
 

Más 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
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

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