j2ee architecture advice needed

  • Thread starter Nikita Tovstoles
  • Start date
N

Nikita Tovstoles

Hi,

I am about to design and implement a java-based product-quality
(already have a working proof-of-concept) web service with the
following components:

-ejb (session+entity) back end talking to a mysql db
-web client (browser) using servlets (possibly also JSF) to access
session ejb.
-j2me personal profile client (using soap to talk to the back end)
(PDA client)

While this service is not an online store, i suppose the design and
requirements would be somewhat similar: personalized, scalable, secure
and reliable. DB queries will be small in size (2-250k, vast majority
2-50k) but frequent. as with many personalized online services, users
will have accounts which they will create themselves. Scalability will
be important (potentially into several million users, though initially
no more than 10,000), so some form of clustering will probably be
needed.

Here's where i need some advice:

-should i utilize LDAP to store and access user information (e-mail,
address, and encrypted passwords) or should i just these as columns to
a table in my DB schema? what would be advantages of each approach?

-where should i store session information? specifically: currently i
utilize stateless session beans, so session info is stored:
-in servlet's HttpSession when service is accessed through browser
-in Personal Profile application, when service is accessed via PDA
It seems to me this way i reduce load on the app server as well as
network traffic (in PDA's case). Would storing session info in a
stateful session bean be any better? Why?


thank you very much,

-nikita
ps. any to the point literature on end-to-end java-based architectures
(online or printed)?
 
I

iksrazal

Hi,

I am about to design and implement a java-based product-quality
(already have a working proof-of-concept) web service with the
following components:

-ejb (session+entity) back end talking to a mysql db

By default, MySQL tables are not transactional. EJB is all about
transactions. Transaction support in mysql has only come about in the
last year or so, and the reviews are mixed.

You might want to look at the upcomming EJB 2.1 Web Services, already
available in some app servers.
-web client (browser) using servlets (possibly also JSF) to access
session ejb.

JSF is really new - last I looked there still was not a working
implementation. I'd avoid it for now. Be sure to use value objects (or
data transfer objects as they are now called).
-j2me personal profile client (using soap to talk to the back end)
(PDA client)

While this service is not an online store, i suppose the design and
requirements would be somewhat similar: personalized, scalable, secure
and reliable. DB queries will be small in size (2-250k, vast majority
2-50k) but frequent. as with many personalized online services, users
will have accounts which they will create themselves. Scalability will
be important (potentially into several million users, though initially
no more than 10,000), so some form of clustering will probably be
needed.

Here's where i need some advice:

-should i utilize LDAP to store and access user information (e-mail,
address, and encrypted passwords) or should i just these as columns to
a table in my DB schema? what would be advantages of each approach?

LDAP is a good choice for data that is vastly read-only - the
performance is much better. The InetOrgPerson schema supports all
those requirements like a glove. The disadvantage is that there is
another piece to maintain, and ldap/java programming will take a few
days to get up to speed.
-where should i store session information? specifically: currently i
utilize stateless session beans, so session info is stored:
-in servlet's HttpSession when service is accessed through browser
-in Personal Profile application, when service is accessed via PDA
It seems to me this way i reduce load on the app server as well as
network traffic (in PDA's case). Would storing session info in a
stateful session bean be any better? Why?

There's no standard way to do this - nost unfortunately _still_ not in
the spec.
thank you very much,

-nikita
ps. any to the point literature on end-to-end java-based architectures
(online or printed)?

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

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top