Developing a new web application

Hi,

I have got to develop a new web application in 10 working days.
Basically there are 5-6 screens. There is a requirement to send e-mails from two screens.
The only problem is that the expected no. of users is around 1 million.

So I wanted to get expert opinion on the architecture/design to be used to successfully serve all the users.
Due to the short time line I am planing to have JSP/Servlet based interface with a message driven bean for the Email requirement.
The addition of other beans will depend on the database schema.... I guess.

Looking forward to expert responses.

Best Regards.
M_SYEDAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hoomanvCommented:
one million per hour / day / week ?
not only it depends on your design but also the web server shoud be able to serve such a greate amount of visitors.
have a look at this page
http://www.webperformanceinc.com/library/reports/ServletReport/index.html
there you'll find benchmarking results of comparing different J2EE web servers
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hoomanvCommented:
another thing you should consider is the performance of your code. I have read a book "java performance tuning" by orreily it suggests good comments to optimize your servlet and guides you on how to achieve and maintain good performance. although it covers 90% J2SE optimization and it helpd me a lot to make my java app run faster.
worths a read
0
M_SYEDAuthor Commented:
Hoomany, thanks a lot for your comments.

Looking forward to further expert opinions.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

mrigankCommented:
Use javamail APIs to send mails rather than Message Driven beans.
They will be easier to code and manage and support large number of USers.

Just a thought : The sendMail part, start a new thread for it. Do not make it a synchronous call. Just to save time given the users that you have.
0
mrigankCommented:
Do not use Entity Beans for such  a large number of Users.
Either use Hibernate or use direct SQL queries.
0
mrigankCommented:
Also to manage the load, you should go for an clustered environment.
0
Mayank SAssociate Director - Product EngineeringCommented:
Yes there is no need to use MDBs for only sending e-mails - there is no need to introduce heavy components if not required.... use the Java mail API. You can write a simple E-mail utility and reuse it.

Follow general best-practices like using StringBuilder (Java 5) instead of directly concatenating/ modifying strings or StringBuffer (<= Java 1.4).

What server are you going to use? Make sure you use clustering. For example:

http://tomcat.apache.org/tomcat-5.0-doc/cluster-howto.html

http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html 
0
M_SYEDAuthor Commented:
The environment is going to be;

1. Weblogic Server 8.1
2. Oracle 9.2 is the Database.
3. J2SDK 1.4 is the java version.

Am not to sure about the usage of clustering at this moment.

Best Regards
0
Mayank SAssociate Director - Product EngineeringCommented:
That sounds fine. Use connection-pooling at the data-base driver.
0
Mayank SAssociate Director - Product EngineeringCommented:
0
mrigankCommented:
Weblogic supports clustering.. go through the links posted above

Cache static/definition data from the Database into Java classes during server start up to minimise db queries.

0
mrigankCommented:
The primary keys of the database tables should be numbers.
Faster to query on numbers than on String values.
0
M_SYEDAuthor Commented:
Hi,

mrigank: You wrote about using JavaMail API,  I am not familiar with it so I have a couple of basic questions;
1. Is it possible to setup JAVA Mail API to send an e-mail when a button is clicked on a JSP/Servlet based front-end.
2. IF 1. then is it possible that we can send graphical content ex: an XSLT containing images as the body of the e-mail.
3. Finally is there any link to a tutorial or any website where I can gain more information about seting up and using JavaMail API.

Thanks for all your comments, please keep them coming.

Best Regards

0
mrigankCommented:
0
mrigankCommented:
>> 1. Is it possible to setup JAVA Mail API to send an e-mail when a button is clicked on a JSP/Servlet based front-end.

Yes. Just call the JavaMail APIs with the mail content and details(to,cc,bcc, subject etc).
You can progmatically call the APIs when you want to do so.
On the onclick of the button, pass the flow to the servlet with the event set as send well.
If required submit the entire form as well.

>> 2. IF 1. then is it possible that we can send graphical content ex: an XSLT containing images as the body of the e-mail.

You can send attachments as well with the Mail. You can add images as attachment.
0
mrigankCommented:
>> an XSLT containing images as the body of the e-mail.

Not sure what you meant here.
0
M_SYEDAuthor Commented:
Hi,

Thanks for the prompt responses mrigank, appreciate them.
In one of our existing applications we send e-mails where the body of the e-mail is set as a xslt file.
This xslt is transformed by a XSLTransformer(a java program) and after transformation it generates the required e-mail message body.
This xslt can have images. The xslt part is not that important as that logic is already in place.

I will go through the links that you have provided and learn about JavaMail.

Best Regards
0
mrigankCommented:
You can dry run on a given xsl and try sending the mail out from a stand alone email application.
0
Mayank SAssociate Director - Product EngineeringCommented:
>> generates the required e-mail message body

That's fine. Once you have the email body, you can send it using this:

http://www.javaalmanac.com/egs/javax.mail/SendApp.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.