TheServerSide.com newsletters are designed to bring the most important news from the J2EE industry to your door, along with providing you with exclusive J2EE articles and advanced topics not found anywhere else. Our newsletters will also keep you informed with what's new on TheServerSide. Newsletter mailings will be infrequent, a monthly basis. Instructions for unsubscribing are at the end of this newsletter. This newsletter is printer-friendly.
Newsflash:
TheServerSide adds new "Events" section to help developers track J2EE conferences and events.
IN THIS ISSUE
Developers Corner
· XML messages throughout your system, a good idea?
Featured Enterprise Learning Events
· Public Classroom Training in EJB, EJB for Architects, J2EE, XML, and Java becomes a reality
Conference Watch
· Wall Street on Java
· Intl. Conference for Java Development
Advanced Techniques in EJB Programming
· Implementing EJB 2.0 style Dependent Objects in BMP
· Integrating SOAP and EJB
Application Server Reviews
· JBoss: can an open source server be a BEA beater?
New Features on TheServerSide
· The Enterprise Conferences and Events 2001 Calendar
Latest News Headlines From the J2EE Industry
Announcing The Enterprise Events Mailinglist: Along with the new "Events" section, TheServerSide.com is now running an Enterprise Events notification mailing list, which will infrequently (once a month or so) notify our members of new and important events in the Enterprise Industry such as Conferences, Expert Web Chats, Programming Retreats, Learning Events, etc. You can unsubscribe yourself from the events list by going to the "User Profile" page on TheServerSide.
DEVELOPERS CORNER
XML messages throughout your system, a good idea?
by Billy Newport, EJB Consultant
People are starting to use XML a lot for messaging. Developers like it, lots of tooling is becoming available (editors, parsers, validation technologies, transformation engines, query engines) and most messaging systems support it now. There are quite a few EAI/process automation and workflow products that support XML as the message data format through out the flow. This lets people use technologies such as XSLT to transform messages to different formats easily and to use XPath to select portions of a document easily. It looks like an almost perfect solution for your messaging needs. You chose an EAI/process automation product that uses XML exclusively as its message/data format because it's easy to use, and you can rapidly build the system. Unit testing/developing goes very well and then you do your first system test that also tests performance. It's at this point that you discover your mistake.Nothing for nothing...
There is, of course, a cost. XML is bulky. XML is expensive to parse. If you are building a high volume system then you are probably already painfully aware of this. You're wondering why you need so much CPU power for your process agents and why your messaging rates are miserable. The process agents need to parse the incoming message, probably convert it to internal Java objects, do the work and then build a string representing the output message for the result. This takes a lot of CPU and memory, can generate a lot of garbage and slows your messaging down as the XML message is a lot larger than the binary representation of the message.You are also probably noticing that as your process advances from step to step, the message is serialized to your Java representation and then serialized back to XML. This step is repeated by each agent in turn. The parsing/ building XML strings and that bulky nature of XML is what's slowing down your system, it is consuming CPU, memory and network resources for very little gain when used in the internals of your system.
A solution to the problem
Why not use XML at the public interfaces to your system and at that boundary, transform the XML to your Java serialized object representation. Now, push this around in your messages. Now each agent simply de-serializes directly to the native Java objects and then serializes the Java objects back to the message for the output. We avoid the XML parsing/ string building and the message is significantly smaller than the XML equivalent. When the process finishes, simply convert from the native Java representation back to XML for the client.Use UTF-8 for your XML strings as much as possible.
It is very unlikely that you need UTF-16 XML strings most of the time. You should be able to survive with UTF-8. This will half the size of your messages with a corresponding improvement in message rates per second. Prefix all your XML strings with a processing instruction such as:<?xml version="1.0" ?>Your java routines can then examine the first bytes of the message payload and because you know that it always contains a processing instruction, you can figure out whether its UTF-16 or UTF-8. Thus, you can still use UTF-16 for far-eastern support but can also use UTF-8 as much as possible. If your process automation or message broker forces you to always use UTF-16 or always use UTF-8 then complain. You can have both with no performance compromise using the initial processing instruction method.Message brokers.
We can use a message broker between the outside world and our system. The message brokers job is to convert from the incoming format (probably XML) to our systems native (efficient) format. When the process completes, the message broker receives the response and then converts it back to the callers expected return data format (again probably XML). This approach gives us the best of both worlds. We use XML for the external data format and we use the native formats for best performance in the internal system and on the internal message buses. It's important to remember that your probably have n times the number of external messages on your internal message bus so any improvements on the internal messaging/processing will have a large impact on your overall performance.I'm using an XML based process automation engine, what can I do?
Use a message broker to store the initial data in a database in an format thats cheap to access. Only model keys to this database and any necessary data for your routing in the workflow. This can significantly reduce the amount of work that the process engine needs to do when starting and completing activities. It also reduces the size of the messages between the workflow and your system significantly. Of course, you now need to access the database to retrieve the necessary data using a key obtained from the activity activation message but this may be more efficient than using the process engine as a persistent store. If you have transactional support between your JMS and JDBC drivers then even better, you should now be able to tolerate failures without any problems, if not then you'll need to cope with this when implementing the system.Conclusion
XML is great and extremely useful in messaging but when building high volume systems, it may not be appropriate for your internal message formats. An external system may send a single message that triggers several messages within your system before a message is returned to the external system. You can significantly improve the performance of the system by avoiding XML for your internal messaging and instead using a native format. This significantly lowers the stress on your CPU and memory systems as well as your internal messaging system. You still take advantage of XML for your external interfaces but this approach may allow your to significantly improve your throughput without spending a fortune on hardware.
Back to Top
FEATURED ENTERPRISE LEARNING EVENTS
Public Training Events for Enterprise Developers
For the first time, The Middleware Company is offering public enrollment to their #1 selling enterprise training courses. The initial event offering is extremely limited, with only 5 courses in Q1 2001. Available seats for these intensive 50% seminar, 50% hands on programming events is running out fast. Interested developers should signup soon or have to wait until Q2.
Expert Public Training Events held in Austin, Texas 5 day hands-on/seminar learning events February March Java 2 for Programmers 2/12 - 2/ 16 Gain a strong foundation in Java required for enterprise programming.
Mastering J2EE 2/19 - 2/23 Harness web technologies including Servlets, JSP, JDBC, EJB, JMS, and much more.
Mastering XML 2/26 - 3/2 Learn advanced XML topics such as SOAP, ebXML, XML persistence, and more.
Mastering EJB 3/12 - 3/16 5 days of complete EJB immersion. Covers the new EJB 2.0 specification.
EJB For Architects 3/19 - 3/23 Tackle the toughest of EJB architectural issues.
Download Brochure (pdf)
CONFERENCE WATCH
Wall Street on Java
The 2001 Wall Street on Java Technology event is aimed at senior technologists and business executives working for financial markets participants and vendors of financial applications.This one day conference is receiving heavy backing from Sun and BEA, and for a first year show, they have a terrific lineup of J2EE related vendors.
Feb 6, New York City
The conference is focused on the financial industry and has an impressive list of speakers lined up including:
David Sherr, VP, Charles Schwab
Simon Phipps, Chief Software Evangelist at Sun
Ed Roman, CEO of The Middleware Company, author of Mastering EJB
Patrick Albert, Founder and CTO of ILOG, and more.
Check out the Java on Wallstreet Homepage.Int'l Conf. for Java Development
Feb 28 - March 2, New York City
The second International Conference for Java Development will be held on Feb 28 - March 2nd, in New York. This conference is very enterprise focused, almost exclusively featuring Enteprrise Java and Wireless related talks. Ed Roman and Floyd Marinescu will be presenting talks on the latest hard-core EJB 2.0 design patterns at the show.
Check out the conference schedule.
Some of the awesome talk titles presented:
Architecting a Content Delivery System using Java, XML, and WAP (Alex Chaffee)
Automating Workflows with Enterprise Java: A Case Study (Derek Ferguson)
EJB Design Patterns and Optimizations (Ed Roman)
EJB Security (Larry Koved)
Advanced EJB Design Strategies (Floyd Marinescu)
Extreme Programming with EJB! (Jason Westra)
Using Java Reflection to Improve Enterprise Application Design (Michael Portwood)
How JMX Enables Flexible Administration of Java Systems (Tyler Jewell)
Check out the Conference Home Page.
Back to Top
ADVANCED TECHNIQUES IN EJB PROGRAMMING
Coarse Grained BMP beans with Dependent Value Objects
By Floyd Marinescu, The Middleware Company.Performance and efficiency concerns require a standard way to build coarse-grained entity beans using BMP as well as CMP.
Dependent objects provide an automatic way to build coarse-grained entity beans for CMP entity beans, but the EJB 2.0 specification doesn’t provide an equivalent mechanism for BMP entity beans.
* * *
Building your entity beans to be coarse-grained is a common performance optimization. It allows modeling the business objects with plain java classes rather than as entity beans, reducing the inter-remote object communication and transactional overhead associated with entity beans. These plain classes typically have a life cycle dependent on a parent entity bean, do not have a distinct identity of their own and do not need to be referenced remotely by a client. For CMP, these objects are called dependent objects, and EJB 2.0 defines a standard way to define CMP dependent objects, leaving the complex task of persisting them to the underlying application server.
Unfortunately, BMP entity bean developers cannot leverage dependent objects, they are a CMP construct only. However, BMP developers should still be able to create coarse-grained entity beans.
Click here to learn how.
Integrating SOAP and EJB
By Billy Newport, Enterprise Consultant.When is SOAP a good idea in a project.
SOAP is basically an XML marshalling mechanism for RPC calls. It doesn't specify a transport although it is most commonly used with HTTP. It could also be used to encode an RPC call over a simple TCP/IP socket or a JMS message. People have a tendency to use the latest technology for no other reason than 'just because'. This article gives the reasons why SOAP may be appropriate in conjunction with session beans and when it makes little sense.
Introduction thought-piece: When is SOAP a good idea in a project.Integrating Apache SOAP with an EJB Server
This 4 part series shows how to integrate SOAP with EJB using Apache SOAP, Visual Age and Websphere. The article is useful to anybody using SOAP regardless of which server you're using as it shows how to write the server adapter code for binding SOAP to session beans, use SOAP via SSL and more.
Part 1: Integrating SOAP with Websphere and Visual Age.
Part 2: Custom HTTP SOAP transport and Servlet integration.
Part 3: Enable SOAP via SSL.
Part 4: Integrating SOAP with an EJB Layer.
Back to Top
NEW FEATURES ON THESERVERSIDE
Announcing the Enteprise Events Section
TheServerSide has added the colour purple to its pallete with the introduction of the internets first and only Enteprise Java conference and events calendar. There wasn't anywhere on the net where a developer could get a complete picture of what important enterprise java conferences and events are coming up, so TheServerSide created the Enterprise Events section, where developers can stay up-to-date with the latest conferences, learning events, web forums and chats, press events, and more. The Events section also contains an Enterprise Events Forum, where developers can discuss past and future conferences and exchange notes about presentations.
Along with the new "Events" section, TheServerSide.com is now running an Enterprise Events notification mailing list, which will infrequently (once a month or so) notify our members of new and important events in the Enterprise Industry such as Conferences, Expert Web Chats, Programming Retreats, Learning Events, etc. You can unsubscribe yourself from this list by going to the "User Profile" page on TheServerSide.
Visit the Enterprise Events Section at: http://www.theserverside.com/events.
Back to Top
NEW APPLICATION SERVER REVIEWS AND WINNERS
TheServerSide.com has been providing an application server review repository since its inception. This repository has helped developers learn from each others experiences, choose the right application servers and avoid the wrong ones. If you haven't posted a review of an application server yet, be sure to post one. Not only can you win $100 as part of our contest, but your review will help others learn more about application servers and help J2EE projects around the world by learning from your experiences. Bartek Kiepuszewski(Websphere), Humphrey Sheil (JBoss), Jason McKerr (JRun) and Manoj Deshmukh (Websphere) are winners of the November and December Application Server review contests. Each of these contestants have won $100 for their posts. The next contest has already began, and ends on Feb. 10!
From "JBoss - can an open source server be a BEA beater?", by Humphrey Sheil:
I believe JBoss to be the best open source application server currently available to system architects and developers. Having said that, I'm not a JBoss fan, blind to it's shortcomings. It has the makings of a great application server, but it still lacks some core features that would make it a BEA beater.
Read the rest of the review here.
From "IBM WebSphere 3.5 (service pack 2) and VAJ 3.5 ", by Bartek Kiepuszewski:
WebSphere and VAJ form a powerful combo of well-integrated tools. However there are many pitfalls that become apparent only in the later stages of development. They can hinder your work at the best or render WebSphere altogether unacceptable at the worst.
Read the rest of the review here.
Back to Top
LATEST NEWS IN THE MIDDLEWARE INDUSTRY
Giga on App. Server Marketshare: BEA: 56%, IBM: 33%, IPlanet: 3%
The Giga Information Group released a report on Dec. 12 containing the results of their web-based survey on app. server usage. The Survey gave BEA 56% marketshare, 33% for IBM, 3% for IPlanet, and 7% for all others combined.
Click here to read more.
Free Website Performance Testing Tool from Microsoft
Microsoft has made freely available a complete, functional, website load generator and performance testing tool called Web Application Stress Tool (WAS). Along with cool features like cookie support and POST form testing, this tool seems to contain all the features that many of the existing and expensive web stress tools have.
Click here to read more.
Log4j joins the Apache Foundation and announces 1.0 release
Log4j, the popular logging tool used in many J2EE sites including TheServerSide.com has finally gone 1.0. With this release, log4j has become part of the Apache Foundation (should be available on their website shortly) and is packaged with the much anticipated JMS Appender.
Click here to read more.
Jini vs. EJB for developing Enterprise Solutions
How can Jini be used for a B2B application? Why would one use it over EJB? Dave Sag discusses a project in which he used Jini as a platform for large enterprise development project. In other Jini related news, Keith Edwards, author of "Core Jini" will be holding a live web chat from Jan 23-29.
Click here to read more.
Announcing EJBGen the EJB 2.0 code generator
EJBGen is an EJB 2.0 code generator written by Cedric Beust, one of BEA's top developers of the Weblogic EJB 2.0 container. EJBGen allows the developer to write only the Bean class with special Java Doc tags. EJBGen can then parse the EJBean class and generate the remote and home interfaces and deployment descriptor. Cool tool!
Click here to read more.
Understanding Web Services
The internet is changing yet again to accomodate a new need in eCommerce - business' exposing their services programmatically over the web. These Web Services are basically a set of related application functions that can be programmatically invoked over the Internet. XML, WSDL, UDDI and SOAP are the technologies that will make this happen.
Click here to read more.
Back to Top
ABOUT THESERVERSIDE / UNSUBSCRIBE
If you are receiving this newsletter it is because you signed up as a member of TheServerSide.com and elected to receive our newsletters. To unsubscribe from TheServerSide.com's monthly newsletter, log on to TheServerSide and edit your user profile. Email webmaster@theserverside.com if you are having problems editing your profile.
About TheServerSide.com
TheServerSide.com J2EE community is brought to you by The Middleware Company. The Middleware Company is an advanced training and consulting company dedicated to server-side Java. The Middleware Company offers onsite training courses in Java 2, Enterprise JavaBeans (EJB), the Java 2 Platform, Enterprise Edition (J2EE), and the Extensible Markup Language (XML). They also aid in the design, development, and deployment of middleware solutions.
Visit The Middleware Company.
This newsletter and contents are Copyright © 2001 The Middleware Company LLC