?
Solved

Developing a new web application

Posted on 2006-03-30
23
Medium Priority
?
225 Views
Last Modified: 2013-11-24
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.
0
Comment
Question by:M_SYED
  • 11
  • 4
  • 4
  • +1
21 Comments
 
LVL 14

Accepted Solution

by:
hoomanv earned 672 total points
ID: 16337532
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
 
LVL 14

Expert Comment

by:hoomanv
ID: 16337806
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
 

Author Comment

by:M_SYED
ID: 16338205
Hoomany, thanks a lot for your comments.

Looking forward to further expert opinions.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 5

Assisted Solution

by:mrigank
mrigank earned 664 total points
ID: 16338472
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
 
LVL 5

Expert Comment

by:mrigank
ID: 16338484
Do not use Entity Beans for such  a large number of Users.
Either use Hibernate or use direct SQL queries.
0
 
LVL 5

Expert Comment

by:mrigank
ID: 16338492
Also to manage the load, you should go for an clustered environment.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 664 total points
ID: 16339553
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
 

Author Comment

by:M_SYED
ID: 16342876
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
 
LVL 30

Expert Comment

by:Mayank S
ID: 16342925
That sounds fine. Use connection-pooling at the data-base driver.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16342941
0
 
LVL 5

Expert Comment

by:mrigank
ID: 16343383
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
 
LVL 5

Expert Comment

by:mrigank
ID: 16343391
The primary keys of the database tables should be numbers.
Faster to query on numbers than on String values.
0
 

Author Comment

by:M_SYED
ID: 16343667
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
 
LVL 5

Expert Comment

by:mrigank
ID: 16343783
0
 
LVL 5

Expert Comment

by:mrigank
ID: 16343828
>> 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
 
LVL 5

Expert Comment

by:mrigank
ID: 16343837
0
 
LVL 5

Expert Comment

by:mrigank
ID: 16343878
>> an XSLT containing images as the body of the e-mail.

Not sure what you meant here.
0
 

Author Comment

by:M_SYED
ID: 16343957
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
 
LVL 5

Expert Comment

by:mrigank
ID: 16344341
You can dry run on a given xsl and try sending the mail out from a stand alone email application.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16349341
>> 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

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question