1 / 44

JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000

JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000. M.S. Thesis Defense Joseph W. Longson March 30, 2000. Publish / Subscribe bus. Bus Client. Bus Client. Implementation is like a chat room Each member uses a room number for communication (topic)

chenoa
Download Presentation

JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000 M.S. Thesis Defense Joseph W. Longson March 30, 2000

  2. Publish / Subscribe bus Bus Client Bus Client • Implementation is like a chat room • Each member uses a room number for communication (topic) • Allows multiple clients in the same room (topic) • Transmit strings, pictures, sounds, etc (data) Pub/Sub bus Bus Client Introduction

  3. Platform Independent Bus Client Mac Platform Bus Client UNIX Platform • Code does not rely upon a platform • Implemented for a virtual platform • Multiple Operating Systems for clients (Mac, Windows, UNIX, etc) • Multiple Hardware Platforms for clients (Mac, PC, SGI, SUN, etc) Pub/Sub bus Windows Platform Bus Client Introduction

  4. C++ Program Windows Platform MS Java Program Windows Platform CWave bus Windows Platform VBProgram CWave 2000 Toolkit • Toolkit containing many components including • Environment for setting up bus clients • Publish Subscribe bus implementation • Includes a Publish / Subscribe bus implementation • Based on Microsoft’s COM/DCOM, limited to the Windows platform • Allows process and machine independent client interaction Introduction

  5. Problem Statement • Problem: CWave 2000 not platform independent. • Limited to the Windows OS, on the PC platform • Uses DCOM, which is designed for a LAN, not for the Internet • Solution: • Extend CWave 2000’s Publish / Subscribe bus • Allow communication from other operating systems • Allow non-COM languages to communicate with bus Introduction

  6. JBus Java Pub/Sub bus CWave Pub/Sub bus C++ Program UNIX Platform Java Program Mac Platform Windows Platform Windows Platform C++ Program MS Java Program • Provides a platform independent Publish / Subscribe bus • Implemented in Java for the Java Virtual Machine • Interfaces available for Java, C, and C++ • Compatible with the CWave 2000 System • But not dependent on it JBus Windows Platform Windows Platform C Program VBProgram Introduction

  7. Primary Design Constraints • Platform independence • Hard to achieve completely, so this will used as a guideline • Leverage the Internet for communication • Using HTTP and XML for message Transport • Maintain compatibility with CWave 2000 • Compatible but not dependent on CWave • Modular design • Allows bus implementation to be easily replaced Introduction

  8. Secondary Design Constraints • Have a small memory and disk space footprint • This allows JBus clients such as Web Browsers to be developed • Platform independent data marshalling • This is a hard constraint that may not be solved • Support new and existing C/C++ clients • Extends the languages available for JBus client implementation • Entire system should perform at an interactive level • Performance will be tuned to a usable level Introduction

  9. Related Work Introduction

  10. Java BusImplementation

  11. Machine 2, UNIX Java Client C++ Client JBus Representation Machine 1, Windows Machine 3, Web Browser Java Client Web Client • Provided the illusion of a single omnipresent bus • Platform independent (using Java) • Topic based communication JBus Phase 1

  12. Machine 1, Windows Java Client JBus Implementation Machine 2, UNIX C++ Client • Implemented as a set of connected local buses • Each client has a local bus instance • Transport objects used for communication between buses • Each local bus acts as either a Server or Proxy JBus JBus Transport Transport Phase 1

  13. Pub Sub JBus Architecture • Bus Client Interface • Used to get a JBus instance • Publish/Subscribe methods • Message Filtering • Routes messages to Bus Clients • Filtering of messages • Message Transport • Implemented as Bus Client • Can have local filtering • Communicates using desired medium (e.g. HTTP, SSL) Pub Sub Bus Client Interface Message Filtering Message Transport Phase 1

  14. Case 1, Java Client Connects as a Bus Server Installs an HTTP Server on the local machine Case 2, C/C++ Client Connects as a Bus Proxy Remotely connects to a machine using the HTTP protocol JBus Client Example Phase 1

  15. JBus Client Example Case 1: Java Client Bus Server HTTP Server 4 Pub Pub Sub Sub 2 Bus Factory 1 Bus Factory Machine 1 3 Java Client (1) - Java Client asks Bus Factory to create a Bus Server (2) - Bus factory creates Bus Server and HTTP Server (3) - HTTP Server subscribes to bus and begins communicating with bus (4) - Client begins communicating with bus Phase 1

  16. JBus Client Example Case 2: C/C++ Client with Transports Bus Server Java Client Pub HTTP Server Pub Pub 7 Sub Sub Sub 9 HTTP Bus Proxy Bus Factory Bus Factory Pub Transport Pub Sub Sub 6 5 Machine 1 Transport 8 Machine 2 C/C++ Client (5) - C/C++ Client asks Bus Factory to create a Bus Proxy to a Server (6) - Bus Factory creates a local Bus Proxy and a local Transport object (7) - Remote HTTP Server creates a Transport Object for proxy connection (8) - Communication commences between Transport Objects (9) - Client and Transports begin communicating with their buses Phase 1

  17. JBus Client Example Case 1 and 2 in action

  18. CWave 2000 GatewayObject

  19. Gateway Object Representation Java Client CWave Client • Interfaces between the JBus and CWave 2000 • Transparent to the client • Allows communication from either implementation JBus interface CWave 2000 JBus Gateway CWave interface Phase 2

  20. Gateway Object Implementation • Implemented as a JBus object • This provides a transparent interface for JBus clients • Uses Microsoft’s Extensions for Java • This allows communication with the CWave 2000 bus Phase 2

  21. Case 3, CWave Client Uses the Gateway Object Connects as a Bus Proxy Begins communicating with JBus or CWave bus clients JBus Client Example Phase 1

  22. JBus Client Example Case 3: CWave Client with Gateway Pub HTTP Server Bus Server Java Client Sub Pub Pub 12 Sub Sub Pub Transport HTTP Sub Bus Proxy Bus Factory Bus Factory Transport Pub HTTP 11 Sub 12 JBus Gateway 12 Pub Transport Pub Sub Sub 10 Machine 1 Transport Machine 2 C/C++ Client Pub Sub Machine 3 CWave Client (10) - CWave Client asks Bus Factory to create a Gateway Proxy to Server (11) - Bus Factory creates Gateway and Transports. Transports connect and begin communicating (12) - Client and Transports begin communicating with their buses Phase 1

  23. JBus Client Example Case 3 in action

  24. Data Marshalingwith XML

  25. BINARY 01 10110111 04 01011011 ASCII 183 c XML <INT>183</INT> <CHAR>c</CHAR> Data Marshaling • What is Data Marshaling? • The translation of data from one form to another • Where is it used? • Between Transport Objects • Between Programming Languages • What options do we have? • BINARY • ASCII • XML Phase 3

  26. XML <?xml version=1.0”?> <CWAVE> <CM t=”Hello” f=”SIMPLE”> <SIMPLE> <STRING>World</STRING> </SIMPLE> </CM> <CM t=”Hello” f=”COMPLEX”> <COMPLEX n=“2”> <STRING>World</STRING> <FLOAT>3.14159</FLOAT> </COMPLEX> </CM> </CWAVE> • Similar to HTML • ASCII format • Uses the concept of Tags • Structure of XML • Stores the format with the data • Multiple formats can be intermixed in a transmission • Why use? • Flexible • Platform Independent • Many parser implementations available. Phase 3

  27. Complex: Struct, Class Subtyping: Inherited classes, Multiple class instances What to Marshall? JBus 1.0 Primitives: Int, Float, Char, etc Easy Hard Multi-element A: AnEvent, Java Vector Multi-element B: general collection classes Phase 3

  28. JBus Client Example with Data Marshaling Pub Transport Sub Bus Proxy Transport JBus Gateway Pub Transport Sub 13 Pub HTTP Server Machine 1 Bus Server Java Client Pub Sub Pub Sub Sub Transport Bus Factory Machine 2 HTTP C/C++ Client Pub Pub HTTP Sub Sub Machine 3 CWave Client Pub Sub (13) - Properly Marshal data between the Client and the bus, and between Transports Phase 1

  29. JBus Client Example with Data Marshaling in action

  30. Performance Results

  31. Preliminary Performance

  32. Preliminary Performance

  33. Preliminary Performance

  34. Conclusion

  35. Platform independent extension to CWave 2000 Extends client implementation choice Extends CWave communication to the Internet Message Transport using XML over HTTP Allows more Platform independent data marshaling Can function with or without CWave 2000 Allows use of the JBus beyond CWave 2000 Modular bus design More flexible for bus experimentation Contributions Conclusion

  36. Future Research • Performance Tuning • Better data marshaling for complex data types • Enhance the ability for thin clients to use the JBus Conclusion

  37. Questions? Thank you!

  38. Preliminary Performance 2

  39. Preliminary Performance 2

  40. Preliminary Performance 2

  41. Extensions C/C++ Extension Web Extension

  42. Pub Sub JBus++ Extension (C/C++) Pub Sub • Extension to the JBus Client Interface • Allows C or C++ clients to use the JBus functionality • Relies upon the JNI from Sun • Data Marshaling • XML • JNI Data Types JBus++ Client Interface JBus Client Interface Message Filtering Message Transport Extensions

  43. Web Extension • HTTP Transport • Allows Firewall Penetration • Works with Proxy Servers • Web Clients • Create a Web Server • Serves Web pages with embedded Applets • Thin Clients • Use the JME (Java Micro Edition) • Download Applets Extensions

  44. Extensions Phase 3 Phase 2 Phase 1 Research Progression • Phase 1 • Java version of the bus • Simple TCP/IP communication • Phase 2 • CWave 2000 Gateway • Phase 3 • Data Marshalling using XML • HTTP communication • Extensions • C/C++ clients • Web Interface Introduction

More Related