MOM을 Java로 구현한 xmlBlaster가 감동을 주는군요. http://xmlblaster.org에서 필요한 자료만 추려 보았습니다. 성격이 급하신 분들은 Cool demos와 Replication Demo를 먼저 보시는 것도 좋은 접근이 되겠군요. XMLParser로 Xerces를 사용하기 때문에, C++ Client를 빌드하기 위해서는 xerces-c-src_2_7_0.tar.gz가 필요합니다.
XmlBlaster is MOM (Message oriented Middleware) with a lot of features.
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.
Features:
Free for private,commercial,education use (LGPL - License)
Message Orientated Middleware (MOM) with Publish/Subscribe and PointToPoint (PtP) support
Multi platform support (server is pure Java)
Multi protocol support (CORBA, RMI, XmlRpc, raw socket, EMAIL, native access)
Language neutral (clients for C++/C, Java, Python, PHP, Javascript, Perl, C#, Visual Basic.net ...)
Client side persistent queuing with C/C++/Java/ActiveX/Javascript
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.
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.
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
XmlBlaster does XML parsing for each message.
Message latency
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.
CORBA in intranet: ~ 6 milliseconds
XMLRPC in intranet: ~ 16 milliseconds
CORBA over internet: ~ 105 milliseconds
XMLRPC over internet: ~ 320 milliseconds
The persistent http pushback over internet is not measured yet, but expected to be ~60 milliseconds (only the update).
Tested with "java Latency" in directory xmlBlaster/demo/javaclients/Latency.java
Try a traceroute 'desthost' to compare the MoM based round trip with the raw tcp/ip roundtrip times.
Message throughput per second native compiled
The 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.
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 message
Note 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 performance
As 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 machine
The 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.
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.
Installation:
Unpack the distribution and follow these guidelines.
For more thorough installation informations please read the file xmlBlaster/INSTALL in the distribution.