FAQ xmlBlaster
Why should I need such a middleware? If you have a distributed client / server architecture you will face the problem how all the processes communicate with each other. xmlBlaster provides a professional way for sending instant messages between C/C++, Perl, Tcl, Java, Php and any other CORBA, SOCKET or XmlRpc aware programming language based process. If parts of the clients are off line, messages will be queued reliable. Message routing may be based on two different styles:
|
Why CORBA, XmlRpc and XML, is it only a hype? Yes, its a hype, but a nice one.CORBA allows inter operability between all major programming languages with type safety at compile time. XML allows dynamic modeling of real day problem domains with type safety at runtime and free versioning. The query language XPath allows to access XML in a powerful way. XmlRpc is a very simple protocol using HTTP, and allows easy integration of scripting languages. |
We use a lot of open source products in daily life, for example gcc and Linux. So we had the desire to contribute something back to the community. The license is based on LGPL (see LICENSE file). Please note that the code is delivered as is, there are no warranties. |
Can is use xmlBlaster for free in my commercial application? Yes. |
Are there examples how to access xmlBlaster with Java, C/C++, Perl, TCL, Python, Php ? Yes, there are examples provided in the directoryxmlBlaster/demo and xmlBlaster/testsuite You can try the examples with xmlBlaster and if you like it, use the examples as a base for your own applications. If you are using xmlBlaster with other languages, it would be nice if you could send us a little note with some working code. See the installation page for useful links. |
What is the current state of xmlBlaster, can I use it in my project? Yes, you can use it in your project.
XmlBlaster has a rich featured support for Publish/Subscribe and PtP operation and clustered operation We develop daily on xmlBlaster, since it is used in many commercial applications already like air traffic control, telecommunication / satellite industry, industrial control, ship control, GPS car control etc. So, xmlBlaster is even getting better with every day. Note that there is no transaction support yet, but reliable store and forward (acknowledged message delivery) with crash recovery is available. For most applications this is quite enough. Transaction support is planned for a future release. |
Is there any database (RDBMS/ODBMS/NativeXML) used in xmlBlaster? Persistency is handled by a plugin framework. Currently there are plugins for Postgres http://www.postgresql.org, Microsoft-SQLServer http://www.microsoft.com/sql, Oracle http://www.oracle.com, Firebird http://www.ibphoenix.com, HSQLDB and some other databases available. All persistency requests from xmlBlaster are forwarded to the I_Queue and I_Map plugin interface which uses the configured plugin to store the data in the backend RDBMS. See requirement queue.jdbc.commontable. for a detailed description. |
With xmlBlaster <= 1.0.6 you need to use SUNs crimson parser.
With xmlBlaster > 1.0.6 and with JDK 1.5 or above all DOM/SAX XML access is only using standardized XML API. Here is an overview what you can set in your xmlBlaster.properties file:
|
What is XML'ish with xmlBlaster? All messages sent using xmlBlaster have a header, a content and a QoS.
|
The three parts of a message have following requirements according to the charset used.
|
How can i query topics with XPath? Topics are stored in xmlBlaster building a huge DOM tree. Each topic has a unique name (see 'oid=...') and contains all messages with the same oid. Here are some messages sent to xmlBlaster, the key of each looks like:<key oid='airtraffic.windspeed1' contentMime='text/plain'> <wind> <speed id='1' unit='knots'/> </wind> </key> <key oid='airtraffic.windspeed2' contentMime='text/plain'> <wind> <speed id='2' unit='knots'/> </wind> </key> <key oid='airtraffic.winddirection' contentMime='text/plain'> <wind> <direction/> </wind> </key>If a topic with those oids are not existing they are dynamically created by xmlBlaster on the first message arriving. Internally we store those topics in a DOM tree: <xmlBlaster> <key oid='airtraffic.windspeed1' contentMime='text/plain'> <wind> <speed unit='knots'/> </wind> </key> <key oid='airtraffic.windspeed2' contentMime='text/plain'> <wind> <speed id='2' unit='knots'/> </wind> </key> <key oid='airtraffic.winddirection' contentMime='text/plain'> <wind> <direction/> </wind> </key> </xmlBlaster>Note that the DOM is immutable, if a follow up message for an existing oid changes the XML meta information this DOM change is ignored. To query only the wind speed of device 2 the XPath query could look like this: //wind/speed[@id='2']or like this (better performing query) /xmlBlaster/key/wind/speed[@id='2']The Zvon tutorials give a nice introduction on how to use XPath. Here you find theXPath specification |
Why is it not 100% JMS (Java Message Service) based? JMS has several drawback, the main problems with JMS are:
|
Which ports are used? How to configure the firewall? Example for XmlRpc:1. The server starts for example with:
and listens on:
so you need to open port 6002 2. If the client wishes callbacks:
so the client host needs to open port 6007 on hostB Example for CORBA (JacORB):
Now the server listens on 6002 on hostA
Note that if you use our builtin IOR download,
you need to open bootstrap port 3412 as well.
Setting -bootstrapPort to 0 switches this feature off, but then
you need to find other ways to transfer the server IOR. Don't forget to switch off the protocols you don't need in xmlBlasterPlugins.xml If you use Linux (or another UNIX) check the ports used with
so you have full control what happens. Example for raw SOCKET communication:XmlBlaster supports a native SOCKET protocol as well. This is best suited to tunnel firewalls since it doesn't need a callback server. Callback messages are sent in the same socket connection back to the client. Note that currently only for Java, C and C++ clients the SOCKET protocol is implemented (volunteers for other languages are welcome, there was a very basic implementation in Python already).
Now the server listens on 7607 and the client needs no listen port.
Now client and server communicate over port 8080 in both directions. This port is open in many firewalls. You can also use port 80, which is most certainly open in your firewall, but then the xmlBlaster server needs to run as root. For more info read requirement protocol.socket. |
How can i establish a secure connection? Java clients with SSL out of the boxIf you need a SSL connection from java clients to xmlBlaster this is available out of the box (JDK 1.4 or above). Please read details about the simple setup in protocol.socket requirement. Setup with SSL tunnelingYou can tunnel your access from clients to xmlBlaster using ssh to have a secure connection.
Here is an example using the SOCKET protocol of xmlBlaster: On the client machine establish a secure tunnel to the server host: ssh -L 7607:server:7607 server Activate SOCKET in xmlBlasterPlugins.xml and start xmlBlaster: java org.xmlBlaster.Main Start the client (in one line): java HelloWorld3 -protocol SOCKET -plugin/socket/hostname localhost -plugin/socket/port 7607 The HelloWorld3-client connection to xmlBlaster and its callback connection (which is the same socket) is tunneled secure with SSH! Other useful tools for tunneling are Zebedee and the Java SSL toolkit. On demand search the mailing list for a setup tunneling a CORBA connection and a CORBA callback connection with multiple ssh tunnels (described by sebastien.louafi@e-qual.fr) For XmlRpc with SSL and tunneling through proxies (squid) read Does Squid support SSL/HTTPS/TLS |
Why is it not COM/DCOM/COM+/.NET based? What is COM ?? :-O |
Which platforms are supported? Every platform supporting JDK 1.4 or better (e.g. JDK from SUN or IBM) should be OK for the server to run.
The Java client side runs with JDK 1.4 or better, further there is a tiny J2ME and applet client library available.
To develop xmlBlaster, there is ANT as the build tool, which should run on any Java aware
platform with JDK 1.4 or better. |
When starting xmlBlaster in background the CPU goes to 100% load
Please start the xmlBlaster server if running as a background process or as a Windows service
with the argument |
How do i distribute an xmlBlaster server or an xmlBlaster Java client?
|
Java clients: Why is the key/qos on xmlBlaster method invocations a String instead of some "QosWrapper" object? To avoid to "force" clients to use these wrappers if they don't want it. In any case, if you have the PublishQos.java object (lets call an instance of it qosWrapper), then you can pass qosWrapper.toXml() to the method publish(String qos, String qos).All method invocations of xmlBlaster have simple strings as arguments. The strings are usually xml encoded. This allows future changes and enhancements without braking the client/server contract. (An older client may still talk to a newer server without need to recompile). If we would pass objects (or structs) as arguments, the CORBA IDL would change with every small modification, for example adding a new QoS 'ForceUpdate' would change the object and could lead that an older client somewhere suddenly couldn't talk to the updated xmlBlaster server anymore. Having the arguments as xml encoded strings, allows simple access, if you use Perl, Python, C++ or whatever. The Java class PublishQos is just a simple helper class for Java clients, it is only provided that you don't need to type the xml ASCII string "by hand". |
This is a great idea, fields of interest are distributed transactions, load balancing and anything else you can imagine. Fell free to contribute ideas, code, links or patches on our mailing list. If you want to contribute code contact us to get subversion write access. |
How can I get commercial support? Michele Laghi and Marcel Ruff offer commercial support if you desire so. |
How can I debug remotely the xmlBlaster? To start the xmlBlaster just invoke:java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n org.xmlBlaster.MainAnd then you can attach to it remotely with the debugger of your choice. For example with Eclipse you would debug as Remote Java Application using Standard (Socket Attach) as the Connection Type and the host and port (in this case 8787) on which the xmlBlaster is running. |