ps Sstat ffa e t s Java RMI - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

ps Sstat ffa e t s Java RMI

Description:

?a???e? t? ??a??s ? ep???????a? a?? esa st?? Client ?a? st?? Server ... Tanenbaum and Maarten Van Steen, 'Distributed Systems: Principles and Paradigms' ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 15
Provided by: aaa147
Category:
Tags: rmi | ffa | java | sstat | steen

less

Transcript and Presenter's Notes

Title: ps Sstat ffa e t s Java RMI


1
???p???s? S?st?µat?? ??f?f???a? µe t? ???s? Java
RMI
  • ?a?a?as?d?? ????a?d???
  • ?ast?d?? Ge????a
  • ?apaf?t? ?a??a
  • ??ts??? St?fa??? ???/???
  • Sa?t?a? ?a???e??? ?a?a???t??

2
Ge????
  • ?? Java RMI
  • ep?t??pe? se efa?µ???? t?? ???s? µe??d?? ap?
    ap?µa???sµ??a a?t??e?µe?a
  • ?pa?te?ta? ? ?pa??? e??? RMI client ?a? e??? RMI
    server.
  • ?a???e? t? µ??a??sµ? ep???????a? a??µesa st??
    Client ?a? st?? Server
  • ep?t??pe? se ?p???d?p?te a?t??e?µe?? t?? Java ?a
    ???s?µ?p????e?, a??µa ?a? a? ? RMI server de? t?
    ??e? ?a?as??a?t?se?

3
?fa?µ???? ?e??t? ???p???t?
  • ??a t?p??? efa?µ??? e??p???t? d?µ?????e?
  • ap?µa???sµ??a a?t??e?µe?a
  • a?af???? se a?t? ?ste ?a e??a? p??sß?s?µa
  • pe??µ??e? t??? pe??te? ?a ?a??s??? µe??d??? p???
    se a?t?.
  • ??a t?p??? efa?µ??? pe??t?
  • ?a?e? µe??d??? p??? se ap?µa???sµ??a a?t??e?µe?a
    µ?s? µ?a? ap?µa???sµ???? a?af????.

4
?e?t?????e? Client ?a? Server
  • Server
  • ??????s? p???t???? asfa?e?a? (?ta? de? ????µe
    HTTP µp????µe ?a f??t?????µe t??? pe??te? p?? ?a
    ????? p??sßas?)
  • S??des? µe t? Registry
  • ??aµ??? ??a rmi requests
  • Client
  • ??????s? p???t???? asfa?e?a? (a? ??e???eta?).
  • ??t?p?sµ?? ?a? s??des? µe t?? e??p???t?.
  • ??a?µat?p???s? ap?µa???sµ???? ???se??.

5
???es? ?p?µa???sµ???? ??t??e?µ???? ???s? t??
Registry
  • ?? RMI p??sf??e? ??a ap?? s??µa ???µat?d?s?a?,
    st? ?p??? ??a ap?µa???sµ??? a?t??e?µe?? d??e?
    st?? ea?t? t?? ??a ???µa ?ta? t???e? ??a p??t?
    f???.
  • St? s????e?a ?ata???e?ta? st? RMI registry µe µ?a
    d?ad??as?a e???af??.
  • ?? registry s??d?e? t? ???µa t?? a?t??e?µ????
    (??? t? ???µa t?? ???s??) ?a? t? ?d?? t?
    a?t??e?µe??.
  • St? Java, ?ta? ??a ap?µa???sµ??? a?t??e?µe??
    e????feta? st? registry µ?a? s???e???µ????
    µ??a???, s??d?ta? µe ??a a?t??e?µe??
    ???µat?d?s?a?.
  • ?? ??a pe??t?? ???e? ?a ???s?µ?p???se? ??a
    a?t??e?µe??, t? ?p??? ß??s?eta? se ??a?
    ap?µa???sµ??? ??µß? (?st? ??µß?? A),
  • ???e? µ?a a?a??t?s? st? Registry t?? ??µß?? ?.
  • ???s?µ?p??e? t? ap?t??esµa t?? a?a??t?s?? ??a ?a
    s??de?e? µe t? ap?µa???sµ??? a?t??e?µe??, ?a? ?a
    pa?eµß???e? t?? µe??d??? t??.

6
???aµ??? f??t?s? ???se??
  • ?a???eta? ? d??at?t?ta, ? pe??t?? ?a ste??e? st??
    e??p???t? t? µ???d? p?? ep???µe? ?a e?te?este?.
  • G?a ?a ???e? a?t? ?a p??pe? ?a ?p???e? ?a? st??
    pe??t? e? ?e?t?????a e??p???t?? Web.
  • ?? de? ?p???e? e??p???t?? Web st? s?st?µa, t?te
    t? RMI e?te?e? a?t?µata ??a ap?? e??p???t? Web,
    ??a t?? a?ta??a?? µ???µ?t?? ?a? t? µetaf??? t??
    ???se??

7
????te?t????? Client ?a? Server
8
?e?t?????a t?? stub
  • ?at? t?? ep????s? µ?a? µe??d?? t?? stub, ?????ta?
    ta pa?a??t?
  • ??????s? µ?a? s??des?? µe t?? ap?µa???sµ??? JVM
    p?? pe????e? t? ap?µa???sµ??? a?t??e?µe??.
  • ????af? ?a? µet?d?s? t?? pa?aµ?t??? st??
    ap?µa???sµ??? JVM.
  • ??aµ??? t?? ap?t??sµat?? t?? ap?µa???sµ????
    ep????s?? t?? µe??d??.
  • ??????s? t?? ap??t?s?? ? t?? e?a??es?? p??
    ep?st??feta? ap? t?? ap?µa???sµ??? ep????s?.
  • ?p?st??f? t?? t?µ?? st?? ?a???ta.

9
?e?t?????a t?? skeleton
  • ?ta? t? skeleton ?aµß??e? ??a µ???µa ???e? ta
    e???
  • ??aß??e? t?? pa?aµ?t???? ??a t?? ap?µa???sµ???
    µ???d?
  • ???e? ep????s? t?? µe??d?? st? p?a?µat???
    ap?µa???sµ??? a?t??e?µe??
  • G??fe? ?a? µetad?de? t? ap?t??esµa (t?µ? ?
    e?a??es?) st?? pe??t?.

10
Stubs ?a? Skeletons
11
?pa?t?se??
  • ?pa??? e??p???t? Web t??????st?? st?? RMI server
  • ??t??es? JRE t?s? st?? RMI client ?s? ?a? st??
    RMI server

12
?e?????sµ?? ?a? ??t?µata ?p?d?se??
  • ? ???s? t?? HTTP ??a t?? a?ta??a?? µ???µ?t??
    µe???e? t?? ap?d?s? ?at? t??????st?? µ?a t???
    µe??????
  • ??t?µet?p?s? firewalls
  • ???at?t?ta tunelling µe t? ???s? e??? e?d??µes??
    ??µß?? µe t?? ?p??? µp????? ?a ep????????s??? ?a?
    ?? d?? ???e?

13
??ad??as?a ?eta???t?s?? ?a? ??t??es?? Client ?a?
Server
  • G?a t?? e??p???t?
  • ?eta???t?ss? t?? e??p???t?
  • javac server.java
  • ??µ??????a t?? Skeleton ?a? Stub
  • rmic server
  • ??????s? t?? registry
  • rmiregistry
  • ??t??es? t?? e??p???t?
  • java server hostname
  • G?a t?? pe??t?
  • ?eta???t?ss? t?? pe??t?
  • javac client.java
  • ??t??es? t?? pe??t? ?a? ?a????sµ? t?? ??s?? t??
    stub
  • java -Djava.rmi.server.codebase
    http//hostname/username/directory/ clientclass
    hostname method parameters

14
??af????
  • http//www.javacoffeebreak.com/articles/javarmi/ja
    varmi.html
  • http//java.sun.com/docs/books/tutorial/rmi/
  • Andrew S. Tanenbaum and Maarten Van Steen,
    "Distributed Systems Principles and Paradigms",
    Prentice Hall, 2002
Write a Comment
User Comments (0)
About PowerShow.com