Page 1 Page 1
RPC Case Studies
Paul Krzyzanowski pxk@cs.rutgers.edu
Distributed Systems
Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Distributed Systems RPC Case Studies Paul Krzyzanowski - - PowerPoint PPT Presentation
Distributed Systems RPC Case Studies Paul Krzyzanowski pxk@cs.rutgers.edu Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License. Page 1 Page 1 Overview of RPC Systems Sun
Page 1 Page 1
Paul Krzyzanowski pxk@cs.rutgers.edu
Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Page 2 Page 2
Page 3 Page 3
Page 4
Page 6
Page 7
Page 8
– Name server – Keeps track of {program#,version#,protocol} port# bindings
Page 9
Page 10
– But with SUN RPC you need a unique program number per server – Greater portability
– Protocol can be selected at run-time
boundaries, fragmentation, reassembly
– Port mapper
Page 11 Page 11
Page 12
Page 13
Page 14
Page 15
Page 16
Page 17
Page 18
SERVER
dced
Page 19
SERVER
dced
Page 20
Page 21
Page 22 Page 22
Page 23 Page 23
Page 24
Page 25
Page 26
processed
Page 27
Page 28
Page 29
Page 30
Page 31 Page 31
Page 32
Page 33
Page 34
Generated stub code Generated skeleton code
Page 35
Page 36 Page 36
Page 37
Page 38
Page 39
Page 40
copied between address spaces
Page 41
copied between address spaces
Page 42
Page 43
Page 44
Page 45
Page 46
remote interface
bind lookup remote reference f(args) f(args) return/exc. return/exception marshal stream
Page 47
Page 48 Page 48
Web services and Riding the XML Bandwagon
Page 49
Restrict ports Inspect protocol
Page 50 Page 50
Page 51
Page 52
<methodCall> <methodName> sample.sumAndDifference </methodName> <params> <param><value><int> 5 </int></value></param> <param><value><int> 3 </int></value></param> </params> </methodCall>
Page 53
Page 54
Page 55 Page 55
Page 56
Page 57
Page 58
<definitions> <types> data type used by web service: defined via XML Schema syntax </types> <message> describes data elements of operations: parameters </message> <portType> describes service: operations, and messages involved </portType> <binding> defines message format & protocol details for each port </binding> </definitions>
Page 59
<definitions name="MobilePhoneService“ target=…> <portType name="MobilePhoneService_port"> <operation name="getListOfModels"> <operation name="getPrice"> <Input message="PhoneModel"/> <output message="PhoneModelPrice"/>
<output message="ListOfPhoneModels"/>
Page 60 Page 60
Page 61
Page 66
channel
Page 67
Page 68 Page 68
Page 69
www.google.com/apis/download.html
Page 70
– unnamed Microsoft employee
Page 71
Page 72
new XMLHttpRequest() xmlhttp.open(“HEAD”, “index.html”, true)
Page 73
Page 74
Page 75
Page 76
<?xml version="1.0"?> <p:Parts xmlns:p="http://www.parts-depot.com" xmlns:xlink="http://www.w3.org/1999/xlink"> <Part id="00345" xlink:href="http://www.parts-depot.com/parts/00345"/> <Part id="00346" xlink:href="http://www.parts-depot.com/parts/00346"/> <Part id="00347" xlink:href="http://www.parts-depot.com/parts/00347"/> <Part id="00348" xlink:href="http://www.parts-depot.com/parts/00348"/> </p:Parts>
Page 77
?xml version="1.0"?> <p:Part xmlns:p="http://www.parts-depot.com" xmlns:xlink="http://www.w3.org/1999/xlink"> <Part-ID>00345</Part-ID> <Name>Widget-A</Name> <Description>This part is used within the frap assembly</Description> <Specification xlink:href="http://www.parts-depot.com/parts/00345/specification"/> <UnitCost currency="USD">0.10</UnitCost> <Quantity>10</Quantity> </p:Part>
Page 78
exampleObject = new ExampleApp(“example.com:1234”); exampleObject.getUser();
userResource = new Resource(“http://example.com/users/001”); userResource.get();
Page 79
svc://Radio/ChannelList svc://Radio/ChannelInfo?sid=001-siriushits1&ts=2007091103205
Page 80 Page 80
Page 81
Page 82
Page 83
Page 84
Page 85
Page 86
Page 87 Page 87