Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passed Certification. A few thoughts.

 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally got my results: 150/155
General Considerations:
Maximum=58 Deductions=3 Actual=55
Documentation:
Maximum=20 Deductions=1 Actual=19
GUI:
Maximum=24 Deductions=1 Actual=23
Server:
Maximum=53 Deductions=0 Actual=53
Total:
Maximum=155 Deductions=5 Certification Score=150
Thanks to all who contributed to all the discussions that helped me. Here are a few things that I'd like to say about the certification.
1. I consider the SCJD certification a very valuable experience. I had to learn a lot of stuff to prepare for it, and I feel that I made a big step forward as a developer during the process, especially in formalizing and much improving my knowledge of Swing, layout managers, event handling, design patterns, and thread programming.
2. It took me about 350 hours from start to finish (including the research) to complete my project, I did quite a bit of refactoring.
3. As you can see, I got the maximum points for the server, but I didn't implement server GUI, graceful shutdown, Unreferenced, unlock(-1), cleaning the stale connections, timeouts, or anything else of that sort. However, I thought it would be important to design my server so that it can connect to multiple databases (because the requirements imply that multiple database files might be used, and not just db.db), and that's how I designed it. Essentially, for every client, the server creates a remote object that wraps the reference to a database file and the corresponding lock manager. So, if there are 5 databases and 50 clients, I have 5 references to database files, 50 remote objects, and 5 lock managers. The remote object (unique to each client) was used as a client id. The lock manager is the class that does the locking and unlocking, and all the code in that class was just 28 lines of code (including record lock/unlock and database lock).
4. I implemented MVC in client, but I had (and still have) a lot of doubts about the best MVC design, especially in the interactions between the views and controllers. I think this is where I lost the 3 points in general considerations.
5. I kept my GUI extremely simple, -- just one JFrame for searching, viewing, and booking. I also had a JDialog for the on-the-fly database switching (local or remote). Not sure where I lost 1 point in GUI, but it might have been because I used the event thread to do the processing (so if connecting to remote database took 5 seconds, the "connect" button stayed pressed for 5 seconds).
6. I didn't use security managers, policy files, codebase parameters, classpath setting, dynamic downloading, or any other things that can complicate your project and the set up. My server and client are started as simple as
java -jar server.jar <port>
java -jar client.jar
No environmental setup of any kind is needed.
7. I think it is extremely important to document your design decisions clearly and in detail in your design choices document. If I were the grader, I would prefer an inferior design with a superior documentation to a superior design with an inferior documentation. My design choices document was about 7 pages long and covered 12 topics: Abstract, General Considerations, RMI vs. Serialized Objects Over Socket Connections, Modifying vs. Extending the Data class, Server Design, Database Record Locking, Simplifying Data Access, Client design, Exception Handling, Record Search Algorithm, Connecting the Classes Together -- a Flight Booking Example, User Interface.
8. I think one of the complex (and important) things for the successful completion of the assignment is to differentiate between the extras that are not in the requirements from the extras that are implied by the requirements. For example, as I mentioned above, a lot of people are spending much time with server GUI, security managers, timeouts, and other features that provide absolutely no value to the project extendibility. Yet it is easy to miss the really important issues (not explicit in the requirements) that might cripple the design.
9. Finally, some word of encouragement, -- all the answers to all your questions are right here in this forum.
Eugene Kononov.
P.S. While Mark is in Zurich buying the watches in bulk so that he can resell them in Detroit, I decided to take advantage of this by posting the message in this forum, rather then in the Certification Results, because I think this discussion really belongs here.
[ August 01, 2002: Message edited by: Eugene Kononov ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Eugene, Awesome score!!
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eugene -
Congrats. Nice score.
In reference to your locking, it sounds as if the lock method is implemented in your Connection object, and it delegates the job of actually performing the lock to the LockManager. So then Data has no code in its lock method, right? I am asking because this was the way I originally implemented it, but I was concerned that the requirements stated that lock and unlock need to be implemented in Data. Did you have that requirement, and if so, did you have the same concern I am having?
Thanks,
BJ
[ August 01, 2002: Message edited by: BJ Grau ]
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In reference to your locking, it sounds as if the lock method is implemented in your Connection object, and it delegates the job of actually performing the lock to the LockManager. So then Data has no code in its lock method, right? I am asking because this was the way I originally implemented it, but I was concerned that the requirements stated that lock and unlock need to be implemented in Data. Did you have that requirement, and if so, did you have the same concern I am having?

That's right, I left the lock() and unlock() methods in Data empty, and yes, I had same concerns as you had. I kept factoring and refactoring until I realized that there is no perfect way around it, -- you ether implement locking in Data (which has a disadvantage that the Data has to know about the lock manager and that locking occurs in local mode), or do it in a much cleaner way so that no locking is performed in local mode and Data and lock manager know nothing about each other, but at the cost of somewhat awkward looking empty lock() and unlock() in Data.
Eugene.
[ August 01, 2002: Message edited by: Eugene Kononov ]
 
Sarada Bhasker
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
However, I thought it would be important to design my server so that it can connect to multiple databases (because the requirements imply that multiple database files might be used, and not just db.db), and that's how I designed it. Essentially, for every client, the server creates a remote object that wraps the reference to a database file and the corresponding lock manager. So, if there are 5 databases and 50 clients, I have 5 references to database files, 50 remote objects, and 5 lock managers. The remote object (unique to each client) was used as a client id. The lock manager is the class that does the locking and unlocking, and all the code was just 28 lines of code (including record lock/unlock and database lock).

Does that mean you will allow/ask the remote user to enter the database name?
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have implemented lock and unlock method in Data class. My Data class knows LockManager class so when the server object wants to modify the data, it class the lock method on the Data class which in turn calls the lock on LockManager similarly when the server object calls unlock on Data which in turn calls the unlock on LockManager to release the record.
Is this approach correct ?
Thanks in advance
Ravi
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Does that mean you will allow/ask the remote user to enter the database name?

Yes, when the user requests a remote conection, (s)he specifies database name (without the path), server DNS, and server port. When the user requests a local connection, (s)he specifies database name (with full path). I think this is what Sun wants to see, since the requirements say that one of the parameters to start the server could be data file(s). The server keeps the list of references to Data instances (one for every database file) along with the corresponding lock managers, and once a request is made to connect to a specific database, the server wraps the reference to corresponding Data and its lock manager in a remote object and that object is returned to a client.
Eugene.
[ August 01, 2002: Message edited by: Eugene Kononov ]
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have implemented lock and unlock method in Data class. My Data class knows LockManager...

As I mentioned before, this approach has two problems. First, the locking will occur in local mode. Second, the Data is coupled with LockManager. But I don't think these problem can be considered severe, so I am sure you will pass with your design.
Eugene.
 
Robin Underwood
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations! I really like how you implemented connecting to multiple databases!
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations, Eugene!
I have to move this to "Results" though...
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good job Eugene
 
Fei Ng
Ranch Hand
Posts: 1245
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations !! great job..
i have to catch up!!
 
Mike Piotrowski
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eugene,
Great job, congratulations!! Thanks for the great comments.
Mike
 
Sana shaheen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eugene Kononov:
I finally got my results: 150/155
General Considerations:
Maximum=58 Deductions=3 Actual=55
Documentation:
Maximum=20 Deductions=1 Actual=19
GUI:
Maximum=24 Deductions=1 Actual=23
Server:
Maximum=53 Deductions=0 Actual=53
Total:
Maximum=155 Deductions=5 Certification Score=150
Thanks to all who contributed to all the discussions that helped me. Here are a few things that I'd like to say about the certification.
1. I consider the SCJD certification a very valuable experience. I had to learn a lot of stuff to prepare for it, and I feel that I made a big step forward as a developer during the process, especially in formalizing and much improving my knowledge of Swing, layout managers, event handling, design patterns, and thread programming.
2. It took me about 350 hours from start to finish (including the research) to complete my project, I did quite a bit of refactoring.
3. As you can see, I got the maximum points for the server, but I didn't implement server GUI, graceful shutdown, Unreferenced, unlock(-1), cleaning the stale connections, timeouts, or anything else of that sort. However, I thought it would be important to design my server so that it can connect to multiple databases (because the requirements imply that multiple database files might be used, and not just db.db), and that's how I designed it. Essentially, for every client, the server creates a remote object that wraps the reference to a database file and the corresponding lock manager. So, if there are 5 databases and 50 clients, I have 5 references to database files, 50 remote objects, and 5 lock managers. The remote object (unique to each client) was used as a client id. The lock manager is the class that does the locking and unlocking, and all the code in that class was just 28 lines of code (including record lock/unlock and database lock).
4. I implemented MVC in client, but I had (and still have) a lot of doubts about the best MVC design, especially in the interactions between the views and controllers. I think this is where I lost the 3 points in general considerations.
5. I kept my GUI extremely simple, -- just one JFrame for searching, viewing, and booking. I also had a JDialog for the on-the-fly database switching (local or remote). Not sure where I lost 1 point in GUI, but it might have been because I used the event thread to do the processing (so if connecting to remote database took 5 seconds, the "connect" button stayed pressed for 5 seconds).
6. I didn't use security managers, policy files, codebase parameters, classpath setting, dynamic downloading, or any other things that can complicate your project and the set up. My server and client are started as simple as
java -jar server.jar <port>
java -jar client.jar
No environmental setup of any kind is needed.
7. I think it is extremely important to document your design decisions clearly and in detail in your design choices document. If I were the grader, I would prefer an inferior design with a superior documentation to a superior design with an inferior documentation. My design choices document was about 7 pages long and covered 12 topics: Abstract, General Considerations, RMI vs. Serialized Objects Over Socket Connections, Modifying vs. Extending the Data class, Server Design, Database Record Locking, Simplifying Data Access, Client design, Exception Handling, Record Search Algorithm, Connecting the Classes Together -- a Flight Booking Example, User Interface.
8. I think one of the complex (and important) things for the successful completion of the assignment is to differentiate between the extras that are not in the requirements from the extras that are implied by the requirements. For example, as I mentioned above, a lot of people are spending much time with server GUI, security managers, timeouts, and other features that provide absolutely no value to the project extendibility. Yet it is easy to miss the really important issues (not explicit in the requirements) that might cripple the design.
9. Finally, some word of encouragement, -- all the answers to all your questions are right here in this forum.
Eugene Kononov.
P.S. While Mark is in Zurich buying the watches in bulk so that he can resell them in Detroit, I decided to take advantage of this by posting the message in this forum, rather then in the Certification Results, because I think this discussion really belongs here.
[ August 01, 2002: Message edited by: Eugene Kononov ]
 
Sam Stackly
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done Eugene, Congrats,
Sam
 
Sumit Amar
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats, great score
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic