歲月不待人 博文約禮 by BlogZin
XmlBlaster is a publish/subscribe and point to point 100% Java based MOM server (message-oriented middleware) which exchanges messages between publishers and subscribers. The message is described with XML-encoded meta information. Messages may contain everything, GIF images, Java objects, Python scripts, XML data, a word document, plain text - just anything.
Communication with the server is based on socket, CORBA (using JacORB), RMI, XmlRpc, HTTP or email, clients are free to choose their preferred protocol. Other protocols like SOAP may be plugged in.
Subscribers can use XPath expressions to filter the messages they wish to receive.
This is the publish/subscribe middleware server you have needed many times before, now available for free to glue together your distributed client/server application.
The xmlBlaster server is pure Java and under LGPL.
PHP, Perl, Python, C, C++, C#, Visual Basic.net, Flash, J2ME, Java (applications, servlets, applets) client samples are delivered in the xmlBlaster distribution.
You should be ready to go with your preferred development language.
XmlBlaster provides a browser callback framework, allowing browsers (Mozilla, MSIE, Netscape) to receive instant callbacks over a persistent http connection.
Wow! Tell me more!Every Dad (Distributed application developer) needs a Mom (Message oriented middleware). Architecture
When a publisher sends a message toxmlBlaster it passes several plugins until it is rejected by a pluginor savely stored in the server.
When a subscriber subscribes on atopic, the message is passed with a callback to the subscriber,traversing several plugins before it is delivered.
The grafic below gives you an overviewof such a message flow. Please click on the plugin symbol to get moreinformation about the plugin and how to code and register a specificplugin yourself.
The grey plugins are mandatory, youneed to registered a plugin, otherwise a default plugin is chosen.
The green plugins are optional, theyare registered on startup. The mime plugins are activated dependingon the message mime type, the dispatch plugin is activated on demandby a client on login.
The brown plugins allow to control theclustering behavior, they are mandatory if clustering is switched on.
Fig:Message flow in the server (click on plugins for detailedinformation)
The following table shows on the columns different implementationlanguages for the clients and on the rows the different features aredisplayed. If a certain feature is already implemented, a green tickis written into the corresponding cell. In case the feature is notimplemented yet (or if the language does not allow this kind offeature) a red cross is drawn. For features under implementation agreen arrow is drawn.
Message throughput per second
Publishing ten thousand small messages to xmlBlaster, which updates the messages to one subscribed client. The published and updated messages are acknowledged:
672 messages per second
on a AMD-K7 600 MHz, both client and server on the same machine running Linux 2.4.4 using JRockit 3.1 JVM with JacORB 1.3.30 CORBA lib.The java virtual machine options are set to -Xms18M -Xmx32M:
java -server -Xms18M -Xmx32M org.xmlBlaster.Main
java -Xms18M -Xmx32M org.xmlBlaster.test.stress.LoadTestSub
The socket connections eat up most of the cpuload, thereafter XML parsing is expensive. The xmlBlaster code itself only consumes little of the processing time.
Green threads and native threads have more or less the same performance.
For other java virtual machines see the Volano Report.
When running the above test with different protocols, JacORB seems to beat the others:
Fig: Performance comparison of different protocols used in xmlBlaster, message throughput in percent to the winner.
Number of simultaneous clients
Running this test:
Running xmlBlaster and "TestSubManyClients" on the same machine.
There are in this example 10-thousand clients which login to xmlBlaster simultaneously.
For RMI, every login consums ~9 kByte on the server, for CORBA ~11 kByte per login.
All 10.000 clients subscribe to a message.
A publisher client then publishes this message which is updated to all 10.000 clients.
With CORBA, 435 messages/sec are delivered
on a AMD-K7 600 MHz, both client and server on the same machine running Linux 2.2.16 using JDK 1.3 (IBMJava2-13) with JacORB 1.2.2 CORBA lib.
With POA/CORBA the server request handling is finegrained adjustable, here we used 'one thread per request' policy (using a thread pool).
With RMI no server policy is adjustable, looking into Suns java code shows us, that they use 'one thread per request' policy as well (but this is nowhere specified).In both cases, the number of clients is only limited by the amount of memory (RAM) you have on your server.
Delivering messages in "burst mode"
The "burst mode" collects messages over a certain time and sends them in a bulk.
Collecting 10-thousand messages and publishing them in burst mode, with no client update.
CORBA resulted in 2647 messages/sec
RMI resulted in 2763 messages/sec.
XMLRPC reached 1431 messages/sec.
on a 600MHz Athlon
Data about the brutto round trip latency of a message publish/update.
The following results are for one round trip including publish -> processing in xmlBlaster -> update -> parsing in client on a 600 MHz AMD Linux.
Tested with "java Latency" in directory
Try a traceroute 'desthost' to compare the MoM based round trip with the raw tcp/ip roundtrip times.
Message throughput per second native compiledThe same scenario as above but compiled with TowerJ 3.5.0 native compiler on Linux:
20% - 35% performance increase compared to JDK 1.2.2
It is possible that these number are higher in other test scenarios since this test case cycles mainly in TCP/IP calls.
Required Memory (RAM / message)Publishing one thousand different messages with only 8 bytes of content and with a relatively small meta data key to xmlBlaster (x86 PC):
Approximately 2.4 KByte RAM per messageNote this is the raw memory consumption of xmlBlaster to handle a single message. Your message content (for example a gif picture or some text) must be added to this value. The message content may as well be a pointer to some bigger file to avoid RAM consumption.
XSL and XML performanceAs XSL processor we use XT written by James Clark.
The XML engine is currently Crimson from Sun for JDK <= 1.4 and since JDK 1.5 the natively delivered XML parser
This is not one of the fastest combinations today, but there may be the option to switch to another parser in future xmlBlaster releases.
See the performance overview, copied from the XSL mailing list for coding hints.
Please visit XSLBench, the performance benchmark of XSLT processors for further informations.
This performance test from Kuznetsov and Dolph shows that XT is still superb performing.
Java XML Benchmark Results
Here is a comparison of SAX2 versus pull parser performance and here another interesting one.
The Java virtual machineThe used Java virtual machines have a high impact on the overall performance.
The Volano Report gives a good overview about current implementations, as a result we may run some tests with the IBM virtual machine in future.
See Suns comparison as well.
XmlBlaster allows remote administration over a plugin framework.
Current plugins cover:
Full SVN snapshot: all sources, docs, libraries (big).
If you develop with xmlBlaster, checkout from subversion. This is the most current snapshot and usually as stable as the official releases.
|Important note when upgrading from 1.0.6 or previous: |
Please comment out the following lines in your old
Or use the new
Please verify the download by the following MD5 checksum fileshttp://www.xmlBlaster.org/xmlBlaster_REL_1_2.tgz.md5
and compare the result with the above md5 file.
Usually your Linux distribution includes the md5sum executable, for Windows you can download the md5.exe from here
Older xmlBlaster releases
Note for Solaris users:
The Solaris tar is not compatible with our GNU tar. Solaris users should download the
zip version or install a GNU tar on their machine.
Unpack the distribution and follow these guidelines.
For more thorough installation informations please read the file xmlBlaster/INSTALL in the distribution.
|CodeHighright에 Java 코드를 넣어보니.. (1)||2006.08.31|
|CVS/Subversion Resources (0)||2006.08.31|
|MOM - xmlBlaster (0)||2006.08.30|
|SIP Server from Flextronics Software Sys (0)||2006.08.26|
|The Softswitch Framework solution from Flextronics Software Systems (FSS) (0)||2006.08.25|
|PDF2HTML download and review (0)||2006.08.24|
Posted by BlogZin