SlideShare ist ein Scribd-Unternehmen logo
1 von 45
IADCS Diploma Course Distributed Programming with Java U Nyein Oo COO/Director(IT) Myanma Computer Co., Ltd
Why Distributed Application? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Client/Server Systems? ,[object Object],[object Object],[object Object]
Three components of CSS ,[object Object],[object Object],[object Object]
IPL at Client Machine User Interface Layer (Web Browser) Information Processing Layer (Application Client) Information Storage Layer (Application Server) Client Machine Server Machine
IPL at Server Machine User Interface Layer (Web Browser) Information Processing Layer (Application Client) Information Storage Layer (Application Server) Client Machine Server Machine
Different type of Method Invocation ,[object Object],[object Object],[object Object],[object Object]
Distributed Computing Environment(DCE) ,[object Object],[object Object],[object Object],[object Object],[object Object]
How Distributed Systems work? ,[object Object],[object Object]
The services and Technologies used within DCE Cell ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is a DCOM? ,[object Object],[object Object],[object Object],[object Object]
DCOM(cont) ,[object Object],[object Object],[object Object],[object Object]
DCOM(cont) ,[object Object],[object Object],[object Object],[object Object],[object Object]
CORBA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Method invocation in CORBA IDL Stub IDL  Skeleton Client Host Server Host client Object Server Object ORB
Benefits using CORBA ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why Java Distributed Object Model Need? ,[object Object],[object Object],[object Object],[object Object]
RMI (your best choice for java) ,[object Object],[object Object],[object Object],[object Object],[object Object]
RMI(cont;) ,[object Object],[object Object],[object Object],[object Object]
RMI Architecture ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],Advantages using Remote Interface
Three tier Architecture of Java RMI Client Object Server Object Stub Skeleton Remote Reference Layer Remote Reference Layer Transport Layer Transport Layer Lower Layer Protocols Lower Layer Protocols
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Inside RMI
java.rmi Package ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
java.rmi.registry Package ,[object Object]
java.rmi.server Package ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
java.rmi.activation Package ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
java.rmi.dgc Package ,[object Object],[object Object],[object Object]
Three Tiered Layering of Java RMI   ,[object Object],[object Object],[object Object]
Implementing RMI   ,[object Object],[object Object],[object Object]
Implementing RMI on Remote Host   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implementing RMI on Remote Host (Contd…) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implementing RMI on Local Host   ,[object Object],[object Object]
Genreation Remote Interface //remote interface import java.net.*; import java.security.*; import java.rmi.*; public interface MyServer extends java.rmi.Remote{ String getAndSetMessage(String message) throws java.rmi.RemoteException; }
Generation Client RMI import java.rmi.RMISecurityManager; import java.rmi.Naming; import java.net.*; import java.security.*; public class MyClient{ public static void main(String args[]){ System.setSecurityManager(new RMISecurityManager()); try{ MyServerser=(MyServer)Naming.lookup("//147.81.10.2/ServerTest"); String serverString=ser.getAndSetMessage("I amd Trying "); System.out.println("reply from the server is "+serverString); }catch(Exception e){ System.out.println(e); } } }
Generation Server RMI import java.rmi.*; import java.rmi.server.*; import java.rmi.registry.*; import java.security.*; import java.net.*; public class MyServerImpl extends UnicastRemoteObject implements MyServer{ static String hostName="147.81.10.2"; String name; public MyServerImpl(String name) throws RemoteException{ super(); this.name=name; }
Generation Server RMI (cont) public String getAndSetMessage(String message)throws RemoteException{ return("My name is "+name+"Thanks for message"+message); } public static void main(String args[]){ System.setSecurityManager(new RMISecurityManager()); try{ String objectname="Servertest"; MyServerImpl theServer=new MyServerImpl(objectname); Naming.rebind("//"+hostName+"/"+objectname,theServer); System.out.println("I am Registered"); }catch(Exception e) { System.out.println(e); } }}
Steps to Compilation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],Steps to Compilation(cont)
Example-2(Remote Interface) //Remote Interface import java.rmi.*; import java.net.*; public interface Server1 extends Remote { public void doSomething() throws RemoteException;  }
Client Remote import java.rmi.*; import java.net.*; import java.rmi.server.*; public class Client1 { public static void main(String[] args) { System.setSecurityManager(new RMISecurityManager()); try { Server1 ro = (Server1)Naming.lookup("doSomething"); System.out.println("Location: "+System.getProperty("LOCATION")); ro.doSomething(); } catch (Exception e){ e.printStackTrace(); System.exit(-1); } } }
Server Remote import java.rmi.*; import java.rmi.server.*; import java.rmi.registry.*; public class Server1Impl extends java.rmi.server.UnicastRemoteObject implements Server1 { public static void main(String[] args) { System.setSecurityManager(new RMISecurityManager()); try { Server1Impl obj = new Server1Impl(); Naming.rebind("doSomething", obj); System.out.println("doSomething bound in registry"); } catch (Exception e) { e.printStackTrace(); return; } }
Server Remote (cont) public Server1Impl() throws RemoteException {  } public void doSomething() throws RemoteException { System.out.println("This message is printed by the Server1 object"); System.out.println("Location: " + System.getProperty("LOCATION")); } }
Invoke rmi registry & Run Client Remote
Running Remote Server

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)
 
Java rmi
Java rmiJava rmi
Java rmi
 
Java rmi
Java rmiJava rmi
Java rmi
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
A Short Java RMI Tutorial
A Short Java RMI TutorialA Short Java RMI Tutorial
A Short Java RMI Tutorial
 
Java RMI Presentation
Java RMI PresentationJava RMI Presentation
Java RMI Presentation
 
Java RMI
Java RMIJava RMI
Java RMI
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVA
 
Rmi ppt
Rmi pptRmi ppt
Rmi ppt
 
Rmi
RmiRmi
Rmi
 
Rmi ppt-2003
Rmi ppt-2003Rmi ppt-2003
Rmi ppt-2003
 
Java rmi tutorial
Java rmi tutorialJava rmi tutorial
Java rmi tutorial
 
Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)
 
Remote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVARemote Method Innovation (RMI) In JAVA
Remote Method Innovation (RMI) In JAVA
 
Rmi architecture
Rmi architectureRmi architecture
Rmi architecture
 
Rmi
RmiRmi
Rmi
 
Rmi presentation
Rmi presentationRmi presentation
Rmi presentation
 
Remote Method Invocation (RMI)
Remote Method Invocation (RMI)Remote Method Invocation (RMI)
Remote Method Invocation (RMI)
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 

Ähnlich wie Distributed Programming using RMI

Ähnlich wie Distributed Programming using RMI (20)

Remote method invocatiom
Remote method invocatiomRemote method invocatiom
Remote method invocatiom
 
RMI (Remote Method Invocation)
RMI (Remote Method Invocation)RMI (Remote Method Invocation)
RMI (Remote Method Invocation)
 
DS
DSDS
DS
 
Rmi
RmiRmi
Rmi
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
Oracle docs rmi applications
Oracle docs rmi applicationsOracle docs rmi applications
Oracle docs rmi applications
 
Rmi
RmiRmi
Rmi
 
ADB Lab Manual.docx
ADB Lab Manual.docxADB Lab Manual.docx
ADB Lab Manual.docx
 
Chapter 6-Remoting
Chapter 6-RemotingChapter 6-Remoting
Chapter 6-Remoting
 
Remote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programmingRemote Method Invocation, Advanced programming
Remote Method Invocation, Advanced programming
 
Java - Remote method invocation
Java - Remote method invocationJava - Remote method invocation
Java - Remote method invocation
 
Distributed Objects and JAVA
Distributed Objects and JAVADistributed Objects and JAVA
Distributed Objects and JAVA
 
Remote method invocation
Remote method invocationRemote method invocation
Remote method invocation
 
Rmi3
Rmi3Rmi3
Rmi3
 
Javarmi 130925082348-phpapp01
Javarmi 130925082348-phpapp01Javarmi 130925082348-phpapp01
Javarmi 130925082348-phpapp01
 
MIDELWARE TECH
MIDELWARE TECHMIDELWARE TECH
MIDELWARE TECH
 
6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF
 
Session 1 Tp1
Session 1 Tp1Session 1 Tp1
Session 1 Tp1
 
Basic java part_ii
Basic java part_iiBasic java part_ii
Basic java part_ii
 
Basic java
Basic java Basic java
Basic java
 

Mehr von backdoor

Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivitybackdoor
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet backdoor
 
Client Side Programming with Applet
Client Side Programming with AppletClient Side Programming with Applet
Client Side Programming with Appletbackdoor
 
Java Network Programming
Java Network ProgrammingJava Network Programming
Java Network Programmingbackdoor
 
Windows Programming with Swing
Windows Programming with SwingWindows Programming with Swing
Windows Programming with Swingbackdoor
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWTbackdoor
 
Multithreading
MultithreadingMultithreading
Multithreadingbackdoor
 
Object and Classes in Java
Object and Classes in JavaObject and Classes in Java
Object and Classes in Javabackdoor
 
IO and serialization
IO and serializationIO and serialization
IO and serializationbackdoor
 
Exception Handling
Exception HandlingException Handling
Exception Handlingbackdoor
 
Java Intro
Java IntroJava Intro
Java Introbackdoor
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Javabackdoor
 
AWT Program output
AWT Program outputAWT Program output
AWT Program outputbackdoor
 
Data Security
Data SecurityData Security
Data Securitybackdoor
 
Ne Course Part One
Ne Course Part OneNe Course Part One
Ne Course Part Onebackdoor
 
Ne Course Part Two
Ne Course Part TwoNe Course Part Two
Ne Course Part Twobackdoor
 
Security Policy Checklist
Security Policy ChecklistSecurity Policy Checklist
Security Policy Checklistbackdoor
 
Bcis Csm Chapter Three
Bcis Csm Chapter ThreeBcis Csm Chapter Three
Bcis Csm Chapter Threebackdoor
 

Mehr von backdoor (20)

Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivity
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
 
Client Side Programming with Applet
Client Side Programming with AppletClient Side Programming with Applet
Client Side Programming with Applet
 
Java Network Programming
Java Network ProgrammingJava Network Programming
Java Network Programming
 
Windows Programming with Swing
Windows Programming with SwingWindows Programming with Swing
Windows Programming with Swing
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWT
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Object and Classes in Java
Object and Classes in JavaObject and Classes in Java
Object and Classes in Java
 
IO and serialization
IO and serializationIO and serialization
IO and serialization
 
Exception Handling
Exception HandlingException Handling
Exception Handling
 
Java Intro
Java IntroJava Intro
Java Intro
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
AWT Program output
AWT Program outputAWT Program output
AWT Program output
 
Net Man
Net ManNet Man
Net Man
 
Data Security
Data SecurityData Security
Data Security
 
Ne Course Part One
Ne Course Part OneNe Course Part One
Ne Course Part One
 
Ne Course Part Two
Ne Course Part TwoNe Course Part Two
Ne Course Part Two
 
Net Sec
Net SecNet Sec
Net Sec
 
Security Policy Checklist
Security Policy ChecklistSecurity Policy Checklist
Security Policy Checklist
 
Bcis Csm Chapter Three
Bcis Csm Chapter ThreeBcis Csm Chapter Three
Bcis Csm Chapter Three
 

Kürzlich hochgeladen

Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperityhemanthkumar470700
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1kcpayne
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...allensay1
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Anamikakaur10
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLkapoorjyoti4444
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...lizamodels9
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Sheetaleventcompany
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noidadlhescort
 

Kürzlich hochgeladen (20)

Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperity
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 

Distributed Programming using RMI

  • 1. IADCS Diploma Course Distributed Programming with Java U Nyein Oo COO/Director(IT) Myanma Computer Co., Ltd
  • 2.
  • 3.
  • 4.
  • 5. IPL at Client Machine User Interface Layer (Web Browser) Information Processing Layer (Application Client) Information Storage Layer (Application Server) Client Machine Server Machine
  • 6. IPL at Server Machine User Interface Layer (Web Browser) Information Processing Layer (Application Client) Information Storage Layer (Application Server) Client Machine Server Machine
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Method invocation in CORBA IDL Stub IDL Skeleton Client Host Server Host client Object Server Object ORB
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Three tier Architecture of Java RMI Client Object Server Object Stub Skeleton Remote Reference Layer Remote Reference Layer Transport Layer Transport Layer Lower Layer Protocols Lower Layer Protocols
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Genreation Remote Interface //remote interface import java.net.*; import java.security.*; import java.rmi.*; public interface MyServer extends java.rmi.Remote{ String getAndSetMessage(String message) throws java.rmi.RemoteException; }
  • 35. Generation Client RMI import java.rmi.RMISecurityManager; import java.rmi.Naming; import java.net.*; import java.security.*; public class MyClient{ public static void main(String args[]){ System.setSecurityManager(new RMISecurityManager()); try{ MyServerser=(MyServer)Naming.lookup("//147.81.10.2/ServerTest"); String serverString=ser.getAndSetMessage("I amd Trying "); System.out.println("reply from the server is "+serverString); }catch(Exception e){ System.out.println(e); } } }
  • 36. Generation Server RMI import java.rmi.*; import java.rmi.server.*; import java.rmi.registry.*; import java.security.*; import java.net.*; public class MyServerImpl extends UnicastRemoteObject implements MyServer{ static String hostName="147.81.10.2"; String name; public MyServerImpl(String name) throws RemoteException{ super(); this.name=name; }
  • 37. Generation Server RMI (cont) public String getAndSetMessage(String message)throws RemoteException{ return("My name is "+name+"Thanks for message"+message); } public static void main(String args[]){ System.setSecurityManager(new RMISecurityManager()); try{ String objectname="Servertest"; MyServerImpl theServer=new MyServerImpl(objectname); Naming.rebind("//"+hostName+"/"+objectname,theServer); System.out.println("I am Registered"); }catch(Exception e) { System.out.println(e); } }}
  • 38.
  • 39.
  • 40. Example-2(Remote Interface) //Remote Interface import java.rmi.*; import java.net.*; public interface Server1 extends Remote { public void doSomething() throws RemoteException; }
  • 41. Client Remote import java.rmi.*; import java.net.*; import java.rmi.server.*; public class Client1 { public static void main(String[] args) { System.setSecurityManager(new RMISecurityManager()); try { Server1 ro = (Server1)Naming.lookup("doSomething"); System.out.println("Location: "+System.getProperty("LOCATION")); ro.doSomething(); } catch (Exception e){ e.printStackTrace(); System.exit(-1); } } }
  • 42. Server Remote import java.rmi.*; import java.rmi.server.*; import java.rmi.registry.*; public class Server1Impl extends java.rmi.server.UnicastRemoteObject implements Server1 { public static void main(String[] args) { System.setSecurityManager(new RMISecurityManager()); try { Server1Impl obj = new Server1Impl(); Naming.rebind("doSomething", obj); System.out.println("doSomething bound in registry"); } catch (Exception e) { e.printStackTrace(); return; } }
  • 43. Server Remote (cont) public Server1Impl() throws RemoteException { } public void doSomething() throws RemoteException { System.out.println("This message is printed by the Server1 object"); System.out.println("Location: " + System.getProperty("LOCATION")); } }
  • 44. Invoke rmi registry & Run Client Remote