190 likes | 742 Views
A New-Old Programming Model for Web Services. SOAP RMI. Aleksander Slominski, Madhusudhan Govindaraju, Randall Bramley, Dennis Gannon Indiana University Extreme! Lab. Outline. Web Services and RMI (Triangle) RMI and SOAP RMI system for Java and C++ Is XML enough for interoperability?
E N D
A New-Old Programming Modelfor Web Services SOAP RMI Aleksander Slominski, Madhusudhan Govindaraju, Randall Bramley, Dennis Gannon Indiana University Extreme! Lab
Outline • Web Services and RMI (Triangle) • RMI and SOAP • RMI system for Java and C++ • Is XML enough for interoperability? • Can RMI/XML be fast (enough)? • Further Steps • Conclusions
Web Services Today • Apache SOAP, MS SOAP, … Optionally: WSDL or IDL Optionally: Create IDL.. Client Interact Service
Web Services Tomorrow Registry Publish Lookup Client Interact Service
Classical RMI Overview RMI Registry Lookup Publish Client Remote Reference Server Remote Object Interact Skeleton Stub Transport Layer
Improving RMI • Reusing instead of inventing … • Language independent RMI model • needs common protocol: SOAP • making C++ and Java work together … • Naming = <name, remote reference> • well known naming service: LDAP • Working with future standards • UDDI, WSDL, …
Implementation Goals: • Compatibility with non-RMI SOAP implementations (platform neutral) • over 40 available now • Minimal overhead on application writer • Easier Naming Service (JNDI, LDAP) • Multi-protocol fail-over (prototyped) • Allow subscription to services from behind firewall (prototyped)
SoapRMI and Java/C++ • SOAP is wire protocol • Binding to language constructs • For C++ • Stub • Skeleton • XML related classes (mapping) • For Java • Can be static: as in C++ • Or dynamic: • Only interfaces and XML mapping info
Dynamic vs. Static Stubs • Static stubs: classic stubs compiled from IDL – faster but needs to be regenerated each time IDL changes • Dynamic stubs: created with use of advanced reflection in JDK 1.3 (java.lang.reflect.Proxy) – runtime overhead • Good to have both (and be able to run in JDK 1.2 as well – maybe …)
SoapRMI/Java Design • Subset of RMI like API • Transport Layer • RPC services • Pluggable client and server protocols • XML mapping
Design: RMI API RMI Server API UnicastRemoteObject Naming.bind RMI Client API Remote, RemoteException Naming.lookup()
Design: Transport Layer RMI Server API UnicastRemoteObject Naming.bind RMI Client API Remote, RemoteException Naming.lookup() HTTP SoapEmbeddedServer HTTP java.net.HttpURLConnection
Design: RPC Layer RMI Server API UnicastRemoteObject Naming.bind RMI Client API Remote, RemoteException Naming.lookup() SOAP RPC SoapServices HTTP SoapEmbeddedServer HTTP java.net.HttpURLConnection
Design: Protocol Providers RMI Server API UnicastRemoteObject Naming.bind RMI Client API Remote, RemoteException Naming.lookup() SOAP RPC SoapServices Dispatcher (dynamic-skeleton) Invoker (dynamic-stub) HTTP SoapEmbeddedServer HTTP java.net.HttpURLConnection
Design: SOAP/XML layer RMI Server API UnicastRemoteObject Naming.bind RMI Client API Remote, RemoteException Naming.lookup() SOAP RPC SoapServices Dispatcher (dynamic-skeleton) Invoker (dynamic-stub) SOAP Encoding with Mapping HTTP SoapEmbeddedServer HTTP java.net.HttpURLConnection
XML mapping objectives • interoperability on the wire • supporting multi-ref, xsi:type, … • easy to process • mapping described in XML and object model • flexible enough • XML schema types • IDL port types (interfaces) • powerful enough to allow • code generation • dynamic stubs • SOAP serialization, deserialization
Performance and beyond XML • XML is not designed for performance • our paper in SC ’00 • … but for robustness!!! • Intranet/Internet: Java RMI/IIOP/SOAP • SOAP – simplicity is important but • our take: Simple Open Access Protocol • RMI abstraction layer • Multi-protocol approach possible
Further work • Standardized remote references • dynamic WSDL or future standards • Multi protocol selection (prototyped) • Security aspects (under consideration) • Exception model (needs more work) • Fail-over (prototyped) • Routing • Transactions • …
Conclusions • Web Services • ubiquitous and Internet ready • RMI model • simple but typically only Java • Coexistence of New and Old Systems • Open Source SoapRMI 1.1 is available now! • http://www.extreme.indiana.edu/soap