jbus, a platform independent publish/subscribe bus for cwave 2000
DESCRIPTION
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) - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/1.jpg)
1
JBus, A Platform Independent Publish/Subscribe Bus for CWave
2000
M.S. Thesis Defense
Joseph W. Longson
March 30, 2000
![Page 2: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/2.jpg)
2
Publish / Subscribe bus
BusClient
BusClient
BusClient
Pub/Sub bus
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)
Introduction
![Page 3: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/3.jpg)
3
Platform Independent
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)
Introduction
UNIXPlatform
MacPlatform
WindowsPlatform
BusClient
BusClient
BusClient
Pub/Sub bus
![Page 4: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/4.jpg)
4
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
VBProgram
C++Program
MS JavaProgram
WindowsPlatform
WindowsPlatform
WindowsPlatform
CWave bus
![Page 5: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/5.jpg)
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
![Page 6: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/6.jpg)
6
JBus
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
Introduction
VBProgram
C++Program
MS JavaProgram
WindowsPlatform
WindowsPlatform
WindowsPlatform
CProgram
JavaProgram
WindowsPlatform
UNIXPlatform
MacPlatform
JBus
Java Pub/Sub bus CWave Pub/Sub bus
C++Program
![Page 7: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/7.jpg)
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
![Page 8: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/8.jpg)
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
![Page 9: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/9.jpg)
9
Related Work
Introduction
Platform Inde-
pendence
HTTPCWave
compatibleModularDesign
SmallSize
DataMarshaling
C/C++Clients
Performance
CWave2000
no no yes no partial no yes yes
TIBCO partial no yes no yes no yes yes
Voyager yes no yes no partial no yes yes
iBus yes no maybe no partial no yes yes
JMS/JMQ
partial yes maybe no no partial partial yes
SOAP yes yes no no N/A partial no no
Siena no yes no no no no yes yes
JINI yes no no no yes yes no yes
JBus yes yes yes yes yes partial partial no
Product
Secondary ConstraintsPrimary Constraints
![Page 10: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/10.jpg)
10
Java BusImplementation
![Page 11: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/11.jpg)
11
JBus Representation
Provided the illusion of a single omnipresent bus– Platform independent (using Java)
– Topic based communication
JBus
JavaClient
Machine 1, Windows Machine 3, Web Browser
WebClient
JavaClient
Machine 2,UNIX C++
Client
Phase 1
![Page 12: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/12.jpg)
12
JBus Implementation
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
Phase 1
Machine 2, UNIX
JBus
JavaClient
Machine 1, Windows
C++Client
Transport Transport
JBus
![Page 13: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/13.jpg)
13
JBus Architecture
Bus Client Interface
Message Filtering
Message Transport
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)
Phase 1
![Page 14: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/14.jpg)
14
JBus Client Example
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
Phase 1
![Page 15: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/15.jpg)
15
2
Bus Factory
JavaClient
(1) - Java Client asks Bus Factory to create a Bus Server
HTTPServer
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
43
Phase 1
Bus Factory
1
JBus Client Example Case 1: Java Client
Machine 1
![Page 16: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/16.jpg)
16
Bus Factory
5
6
Bus Factory
(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
(8) - Communication commences between Transport Objects
JavaClient
HTTPServer
Bus Server
C/C++Client
Bus Proxy Transport
(7) - Remote HTTP Server creates a Transport Object for proxy connection
(9) - Client and Transports begin communicating with their buses
Transport7
89
Phase 1
JBus Client Example Case 2: C/C++ Client with Transports
Machine 1
Machine 2
![Page 17: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/17.jpg)
17
JBus Client Example Case 1 and 2 in action
![Page 18: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/18.jpg)
18
CWave 2000 GatewayObject
![Page 19: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/19.jpg)
19
Gateway Object Representation
Interfaces between the JBus and CWave 2000– Transparent to the client
– Allows communication from either implementation
Phase 2
JBus CWave 2000
Gateway
JBus interface
CWave interface
JavaClient
CWaveClient
![Page 20: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/20.jpg)
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
![Page 21: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/21.jpg)
21
JBus Client Example
Case 3, CWave Client– Uses the Gateway Object
– Connects as a Bus Proxy
– Begins communicating with JBus or CWave bus clients
Phase 1
![Page 22: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/22.jpg)
22
10
Bus Factory
(11) - Bus Factory creates Gateway and Transports. Transports connect and begin communicating
JavaClient
HTTPServer
Bus Server
C/C++Client
Bus Proxy Transport
(10) - CWave Client asks Bus Factory to create a Gateway Proxy to Server
(12) - Client and Transports begin communicating with their buses
Transport
Phase 1
JBus Client Example Case 3: CWave Client with Gateway
CWaveClient
JBus Gateway Transport
Transport
12
12
12
Machine 1
Machine 2
Machine 3
Bus Factory
11
![Page 23: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/23.jpg)
23
JBus Client Example Case 3 in action
![Page 24: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/24.jpg)
24
Data Marshalingwith XML
![Page 25: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/25.jpg)
25
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
01 10110111
04 01011011
BINARY
183 c
ASCII
<INT>183</INT>
<CHAR>c</CHAR>
XML
![Page 26: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/26.jpg)
26
XML
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.
<?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>
Phase 3
![Page 27: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/27.jpg)
27
What to Marshall?
Easy Hard
Primitives: Int, Float, Char, etc
Multi-element A: AnEvent, Java Vector
Complex:Struct, Class
Subtyping:Inherited classes, Multiple class instances
JBus 1.0
Multi-element B: general collectionclasses
Phase 3
![Page 28: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/28.jpg)
28
Bus Factory
JavaClient
HTTPServer
Bus Server
C/C++Client
Bus Proxy Transport
(13) - Properly Marshal data between the Client and the bus, and between Transports
Transport
Phase 1
JBus Client Example with Data Marshaling
CWaveClient
JBus Gateway Transport
Transport
Machine 1
Machine 2
Machine 3
13
![Page 29: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/29.jpg)
29
JBus Client Example with Data Marshaling in action
![Page 30: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/30.jpg)
30
Performance Results
![Page 31: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/31.jpg)
31
Preliminary PerformanceSingle Process Subscriber Notify Time
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
100 1,000 10,000 100,000
Number of Messages
Me
ssa
ge
s p
er
Se
con
d
1
5
10
25
![Page 32: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/32.jpg)
32
Preliminary PerformanceSingle Process Subscriber Notify Time
with Gateway Object
0
100
200
300
400
500
600
100 1,000 10,000
Number of Messages
Me
ssa
ge
s p
er
Se
con
d
1
5
10
25
![Page 33: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/33.jpg)
33
Preliminary Performance
Network Subscriber Notify Time
0
20
40
60
80
100
120
100 1,000 10,000
Number of Messages
Me
ssa
ge
s p
er
Se
con
d
Transmit and Parse
![Page 34: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/34.jpg)
34
Conclusion
![Page 35: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/35.jpg)
35
Contributions
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
Conclusion
![Page 36: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/36.jpg)
36
Future Research
Performance Tuning
Better data marshaling for complex data types
Enhance the ability for thin clients to use the JBus
Conclusion
![Page 37: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/37.jpg)
37
Questions?
Thank you!
![Page 38: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/38.jpg)
38
Preliminary Performance 2Single Process Subscriber Notify Time
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
1 5 10 25
Number of Messages
Me
ss
ag
es
pe
r S
eco
nd
100
1,000
10,000
100,000
![Page 39: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/39.jpg)
39
Preliminary Performance 2Single Process Subscriber Notify Time
with Gateway Object
0
100
200
300
400
500
600
1 5 10 25
Number of Messages
Me
ssa
ge
s p
er
Se
con
d
100 Messages
1,000 Messages
10,000 Messages
![Page 40: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/40.jpg)
40
Preliminary Performance 2
![Page 41: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/41.jpg)
41
Extensions
C/C++ Extension
Web Extension
![Page 42: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/42.jpg)
42
JBus++ Extension (C/C++)
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
Message Filtering
Message Transport
JBus++ Client Interface
Extensions
![Page 43: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/43.jpg)
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
![Page 44: JBus, A Platform Independent Publish/Subscribe Bus for CWave 2000](https://reader035.vdocuments.net/reader035/viewer/2022062723/56814018550346895dab6545/html5/thumbnails/44.jpg)
44
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
Introduction
Extensions– C/C++ clients
– Web Interface