| | |
Interview Question
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I attended one interview today,Interviewer asked me one question regarding the creation of unique identifier.
Question :
Consider same webapplication is deployed in 3 webserver.if any user registered in any of my application,a unique identifer is given to the user.It cannot be stored in a database.3 webserver should not produce the same uid again.How t implement this ?
Question :
Consider same webapplication is deployed in 3 webserver.if any user registered in any of my application,a unique identifer is given to the user.It cannot be stored in a database.3 webserver should not produce the same uid again.How t implement this ?
•
•
Join Date: Aug 2008
Posts: 83
Reputation:
Solved Threads: 18
Since there is no database is available, you could always check with the other web servers before using a UID. There could be two ways of implementing this:
- either each server keeps track of every UID used (synchronization errors could occur), or
- each server keeps a list of its own UID's (would longer to generate a UID, and if one server goes offline there could be problems)
- either each server keeps track of every UID used (synchronization errors could occur), or
- each server keeps a list of its own UID's (would longer to generate a UID, and if one server goes offline there could be problems)
![]() |
Similar Threads
- Interview question in Linked list (C)
- Interview Tips And HR Interview Question And Answer (IT Professionals' Lounge)
- question&please answer (ASP.NET)
- an interview question (Java)
- Real Yahoo Interview Question And Answer (IT Professionals' Lounge)
- Best/worst interview questions? (IT Professionals' Lounge)
- Java Interview Question (Java)
Other Threads in the JSP Forum
- Previous Thread: JavaBeans beginner needs help
- Next Thread: Working with dynamic textboxes
| Thread Tools | Search this Thread |
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write





