Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Java Web Services

Thread view: 
Dave f - 08 Feb 2006 18:29 GMT
I'll be starting work on a web services interface to some internal
applications soon.  They'll be implemented in WAS6 and could
potentially receive millions of hits per day.  Authentication with each
request is required.  The web service will essentially just turn the
XML into a Java object, authenticate, log the request, and dump it on
an MQ Series queue; and no, direct MQ-to-MQ is not an option -- a web
service is required for clients with no MQ.

As I have relatively little experience in high traffic web services, I
thought someone here might be able to suggest a place to start.  Is it
cost-effective to expose a stateless EJB as a web service, should I use
a servlet, some other API?  And will WAS6 clustering effectively handle
expansion as the number of requests grows?  For authentication I was
considering a cached read only HashMap of users (or something similar)
to query rather than hitting the database each time; maybe updating the
cache every few minutes.

Comments, suggestions, etc. would be helpful.

Thanks.

Dave
iksrazal@gmail.com - 08 Feb 2006 22:06 GMT
Some quick points:

1) Use axis2 for web services. Its in late beta, but has lots of users.
The performance is about the best available.

2) What EJB can provide for you with web services is transactions on
the db layer. I've done it with jboss, but I've also done it with just
hibernate and I recommend the later. EJB 2.x is basically legacy, and
it'll be a while before WAS supports ejb 3.

3) Use ehcache or something like it to cache user state. I use
java.util.uuid and cache that. The idea is that after login, the user
passes back the uuid. Your hash map needs to survive server restarts
and perhaps clustering.

4) Consider using WSDL to define your in / out data - anything much
beyond hello world makes it worh it.

HTH,
iksrazal
http://www.braziloutsource.com/

> I'll be starting work on a web services interface to some internal
> applications soon.  They'll be implemented in WAS6 and could
[quoted text clipped - 18 lines]
>
> Dave
Dave f - 09 Feb 2006 14:41 GMT
Let me ping some questions back at you:

Can axis2 be deployed in WebSphere (or JBoss etc.) and clustered?

It's interesting that you suggest Hibernate: I've been experimenting
with it and like it a lot, but aren't there issues with clustering
Hibernate sessions?  I've used a JiBX/Hibernate combination to quickly
and easily go from XML - to - POJO - to - RDB, but vaguely recall
reading about Hibernate sessions clashing across servers in a cluster.

We have used ehcache in the past.  Good idea.
iksrazal@gmail.com - 10 Feb 2006 20:35 GMT
> Let me ping some questions back at you:
>
> Can axis2 be deployed in WebSphere (or JBoss etc.) and clustered?

There is a lot going on in this area. There's WS-Addressing and
WS-Context which are new standards - not axis2 specific. There's a
proposal and some work going on in clustered session management:

http://wiki.apache.org/ws/FrontPage/Axis2/SessionMgmtProposal

If your talking about hooking axis2 into EJB - that may be tricky. I've
done it a lot with axis1 and jboss - it'd require a few days work to
configure I think. Outside of EJB - its just straight WAR kind of
stuff.

> It's interesting that you suggest Hibernate: I've been experimenting
> with it and like it a lot, but aren't there issues with clustering
> Hibernate sessions?  I've used a JiBX/Hibernate combination to quickly
> and easily go from XML - to - POJO - to - RDB, but vaguely recall
> reading about Hibernate sessions clashing across servers in a cluster.

Hibernate has what is called a 'second level cache' . You can use
ehache, jboss's tree cache, etc. Lots of people cluster this so I think
its a non-issue - though not trivial.

> We have used ehcache in the past.  Good idea.

Yeah, works great ;-) .

HTH,
iksrazal
http://www.braziloutsource.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.