Java Web Services

D

Dave f

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
 
I

iksrazal

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/

Dave f escreveu:
 
D

Dave f

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.
 
I

iksrazal

Dave said:
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top