
Good day, DevNewzians.
Today's article continues our ongoing drive toward a world which
uses XML as the most common of denominators. Unlike several of
our previous articles, however, this one includes no code examples.
There is nothing here for you to cut-and-paste and try out for
yourself. No fun, in other words. Unless, of course, you enjoy
using some of the most efficient, most effective, most sensible
technology offered to improve the performance and increase the
functionality of your company's network. Consider the possibilities,
and enjoy...
Thanks for reading,
The DevNewz Team

by James McGovern
JMS stands for Java Messaging Services, which is a Java-based
API for accessing messaging systems. XML is a set of syntax rules
and guidelines for defining text-based markup languages. XML (eXtensible
Markup Language) is one of the key technologies used in the exchange
of data across applications, especially when different organizations
need to share data. XML's rapid adoption is based upon organizations
agreeing to an industry standard data format that allows for rapid
implementation.
Lets
start with an outline of some of the things you may want to think
about when using JMS and XML along with some additional real-world
business uses. We will discuss eight tips that will make you successful
in developing systems that utilize XML based messaging systems.
Hopefully, you can have your boss read the next couple of paragraphs.
The whole reason for looking at JMS and usage with XML is most
likely to interface with some external system. You have most likely
realized that the primitive way of interfacing to external systems,
which required writing separate mapping/extract routines, is dead.
You will see support for XML from many industry-recognized companies
such as Peoplesoft, SAP and BAAN for Enterprise Resource Planning
(ERP) systems to Siebel and e.piphany in the CRM space as well
as other systems in other verticals. XML usage will become even
more popular with the advent of web services. Listed below are
reasons you should seriously consider using JMS with XML.
For projects that have very tight deadlines and require integration
with multiple systems (either existing and/or under development)
one can use XML as the published interface between these systems.
This will allow each individual effort to be developed and deployed
independently without concern for each other. Systems need to
be autonomous and using JMS and XML help you reach this goal.
In many organizations, the business sponsor and their analysts
may capture (in many scenarios overstate) a requirement for near
real-time performance of the system being developed. For instance,
let's say you wanted to add a new vendor to your inventory system
and the analyst required the process complete within ten seconds.
As good corporate citizens, we will work hard to make sure that
our code meets this requirement. When the system is in production,
the reality is very different than the requirement. We learn that
updates can be spaced as far as fifteen minutes apart and not
have any business impact. In this scenario, we could have designed
for only very obvious critical items in our system to be real-time
and used a queue along with priority scheduling to defer other
requests. This would make our system appear more responsive when
a process came along that actually required real-time completion.
Success or failure will depend upon how quickly and completely
the development team can come to a consensus agreement on XML
usage. The author recommends having a small focused team (No more
than four people) develop the standards for usage. >>
|
The XML schema should be created and published before any
code is written.
Standards
are required and should document message flows, operational characteristics
and how the messages exactly map to external target data sources
as well as internal Java classes. This will assist in not having
to revisit the same modules multiple times.
Agree
in advance the naming convention for message field attributes and
descriptors unless you desire pain. Your pain can be increased ten-fold
by not enforcing standards. This could be very time consuming, especially
if you are working with multiple external systems. Capture this
as an action item in your project plan before you write a single
line of code. For developers who violate the rule make them baby-sit
the cucumber of questionable freshness.
Think best of breed. I have encountered way too many managers
in my travels that have limited thinking abilities. The world
offers solutions other than big blue. By utilizing XML you can
abstract out the difference in data exchange formats. Java provides
for the ability to abstract out the differences in operating system
platforms. JMS brings capabilities of abstracting out the differences
in system interfaces and transaction management (in conjunction
with Java Transaction APIs). This will now allow you to develop
and deploy a system faster that contains higher levels of functionality
and with potentially lower operating costs. There is an added
benefit of not coding yourself into a hole.
When developing a new interface to an existing system, consider
talking with your technology vendors. Many vendors already have
deep expertise in their own subject areas and may be aware of
emerging XML standards. At a minimum, they may provide valuable
knowledge that will help you jump start the process definition.
Many applications send multiple compound messages using some form
of correlation identifier to group them. Try to avoid this if
at all possible. An example of this is a purchase order that may
contain header information, multiple detail lines and trailers.
Many messaging systems process a single message as a unit of work.
This will cause headaches for taking these messages and mapping
them to objects as well as making error handling difficult.
XML messaging sometimes is not the right choice for building
robust high volume applications. It is important that you understand
when traditional approaches make good sense. Hopefully these eight
tips will point you in the right direction and guide you on the
path of those who are successful.
About the Author:
James McGovern
is a CTO for a high profile B2B web site and moonlights as a columnist
for Java Developers Journal. His day job requires him to focus
on high availability, directory services, single signon and CRM.
|