This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes CD Lessons in Production Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "CD Lessons in Production" Watch "CD Lessons in Production" New topic
Author

CD Lessons in Production

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
At the local state university, we're about to put into production a simple web app developed following the lessons of the Cattle Drive. While the app will have hundreds of users, it will likely never have more than a dozen concurrent users.
It occurs to me that I might want to ask if there is anything about the JDBC or Servlets assignments that was strictly for learning purposes and shouldn't be implemented in even a small-scale/small-volume web app. So, is there anything to look out for?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20729
    ∞

Are you familiar with concurrancy issues?
I think the big thing you will need to think about is what if two people try to use the same servlet at the same time. The main thing is that you don't want to use "global variables" - don't store something as a servlet attribute and have methods within the servlet depend on that information. In other words, don't set such an attribute to a value then call a method that depends on that value. It's possible that another user is using the same servlet at the same time and is setting the same variable to something else!
It was a long time ago that I wrote those assignments. So I can't remember that much about them. But off the top of my head, I would guess that they would be okay.


permaculture Wood Burning Stoves 2.0 - 4-DVD set
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I'm only up to Servlets-4b but so far there seems to be no requirement for synchronization on the list used for the Video Library. I did put it in but got hints that I shouldn't do it because users were well mannered.
Also there is one "global" library, not one for each user.
There is just one password to access the servlets and it is hardcoded and unencrypted.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
I can't think of anything that should not be implemented. It would probably be wise to add/modify a couple of things for real life use even though they're above and beyond the assignment requirements. Passwords and concurrent access are on top of the list. If you have a small number of users, you probably won't need to get into connection pooling.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CD Lessons in Production