• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passed 87%, some thoughts....

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the breakdown...
General Considerations(maximum = 72): 57
Documentation(maximum = 10): 7
Object-Oriented Design(maximum = 6): 6
GUI(maximum = 20): 20
Data conversion program(maximum = 10): 10
Server(maximum = 37): 35
My project was the Fly By Night reservation system. I used serialized objects over TCP/IP for communication.
Even though I viewed this cert as a 'fun' coding project, I still stuck to fundamental design procedures and concepts and approached the project just as I would approach a real-world project. I spent many hours working on the design of the client and server and the interface for communication between the two. I only spent about 1.5 weeks on coding, and about 1 week on testing and packaging. The design phase took about 1 month, but it really went a long way because I had absolutely no coding conflicts during implementation; designing something right really does work.
Here is my system view.

I kept the client simple. It works the same regardless of connection type (remote/local). The specifics to handle remotely or locally connected clients are contained in appropriate adapter classes (RemoteConnectionAdapter,LocalConnectionAdapter), which the client GUI makes use of.
I also gave no consideration for future client (GUI) updates, even though the specification requires it, because I had a feeling that the examiners would not deduct many points if it was missing. I was right since I got a perfect score on the GUI.
From the servers perspective, local and remote clients are treated the same through the ClientHandlerThread interface. The specifics to handle a remote or local client are contained in the appropriate class that implements the ClientHandlerThread interface, namely RemoteClientHandlerThread and LocalClientHandlerThread.
I created online help and linked my Javadocs, user guides, and system architecture docs to them.(cant see why I did'nt get a perfect score on this)
When I packaged my jar, I created scripts to run the client, server, and conversion tool on DOS and UNIX because I was not sure of the platform the examiners would be using.
And that's that! Next is the UML 486 test!
SAF

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congrats! and thanks for explaining your design.
Good luck with your UML exam.
 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations. Thanks for the detailed account of your project. The diagram really helped nicely
Good luck on the uml test.
- Sean
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations!!! Can you please tell me what type of event handling you have done in GUI, is it AWT event handling or Swing Model-Delegate? Did you create your own thread for event handling? Thanks in advance.
 
SAFROLE M3
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used the Model/Delegate event handling framework from Swing to handle all GUI events. There is no need to create a separate thread to handle GUI events because the GUI is a separate thread itself from your main process, so it handles the events for you. Creating a sepearte thread to handle events is incorrect structure and I highly recommend you do not use it.
My GUI is contained in one class, and I created inner classes contained in the GUI public class , which extend the appropriate adapter classes, such as MouseAdapter, KeyAdapter, etc, to handle the events.
Here is what the GUI looks like, just to give you an idea of how simple I made it.

Here is what the logon dialog looks like, again, simplicity is very important. No need to impress the examiners because they could care less, trust me.

Hope that helps!
SAF
 
Luna Bora
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats good, can you tell me how you provided online help, thanks.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi SAFROLE M3,
Congratulations on your achievement!!.
The UI looks fantastic.I downloaded my assignment about a week ago and had some doubts on the UI.But looking at your Screen shot
all my doubt's vanished in thin air.Thanks a lot!!
All the very best for your next exam.
regards,
Manjunath
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good job SAFROLE, congratulations.
Feel like answering some more questions?
My questions are:
1. Packaging. Did you put any of your classes into suncertify package? Actually, if you can present your package hierarchy I would truly appreciate it
2. Exam. You were probably asked to explain your networking choice (sockets over RMI). What was your reasoning?
3. Thank You
 
SAFROLE M3
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Luna,
When I say "online" help, I mean that the user can navigate through a series of HTML documents all linked together. These documents consist of the API, system design, and user guides. I created a 'docs' directory in the root directory of my jar file which contained a table of contents (index.html), and the remaining folders that contained the API, system docs, and user guide docs. In my README file I made it very clear to the examiner where and how to access the documenation, although the nature of my packaging scheme make it very clear where the documentation is in any event.
Misha,
Yes, I did follow the suncertify packaging scheme, but of course I expanded on it with my own customizations. Here is my source package scheme...
suncertify
|
+---fbn
|
+---adapter
+---client
+---comm
+---db
+---server
+---share
+---tools
As you can see, I preserved the 'db' package and added my own packages as well.
And yes, you are correct. Part II of the exam asked me to explain which communication method I choose and why. I wrote that I choose serialized objects over TCP/IP instead of RMI because I already had real-world experience with this method. I dont have any previous experience with RMI, but really RMI is the same thing as serialized objects over TCP/IP, the only difference being explicit socket and stream manipulation is hidden from the programmer with RMI. That's exactly what I wrote for the essay question! I also mentioned that I was on a strict time schedule at work and to learn a technology such as RMI would waste time that I did'nt have (this, of course, was bull sh*t, but hey, who's going to notice?)
Hope it helps,
SAF
 
SAFROLE M3
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I should have know better! Damn HTML! Here is my package layout...
suncertify
   fbn
      adapter
      client
      comm
      db
      server
      share
      tools
SAF
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations SAFROLE. Good job, simple and elegant.
QUESTION: In your search did u allowed the user to enter the Carrier Name also, besides Origin and Destination ?
Thanks,
Arvind.
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I did, as you can see in the pic, there is a field for "Carrier".
SAF
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations SAFROLE. You are so warm-hearted, so generous!
I want to discuss with you on two issues:
1. Did you choose to track the client id when you called lock() & unlock()? I didn't do it, because all the codes are under my control, as long as client follows lock-bookFight-unlock sequence, I believe everything will be fine, although it may look more professional to have server side centralize the client ID assignment.
2. where did you call lock() & unlock(), although I implemented the bookFlight(...) on the server side, I still put lock() and unlock on the client side, the way which looks like what SUN intends to let us go...
What's your opinion?
Thanks a lot in advance!
Richard.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations on your success
I have few doubts.Kindly advice me on the below mentioned:
1. If some new data is added in the db.db ,is your choice box upgraded ,if so how?
2. what 've u done regarding client tracking?
3.is u criteriafind synchronized?
 
pooja vij
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations on your success
I have few doubts.Kindly advice me on the below mentioned:
1. If some new data is added in the db.db ,is your choice box upgraded ,if so how?
2. what 've u done regarding client tracking?
3.is u criteriafind synchronized?
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Richard,
Yes, I tracked the client id on the server side in the Data class. Since each client is a unique thread, the client thread assigns a unique thread name to itself using a private method that creates a unique identifier on each invocation. The Data class maintains a hashtable that uses a record number as a key, and the client thread id as the value. So, when a client calls on the Data class to lock a record, a new entry is added to the hashtable using the record number to be locked as the key, and the client id as the value.
When the same client attempts to unlock the record, the hashtable is accessed using the record number to be unlocked as the key. If the value stored for this key is not equal to the calling client threads id, then no action is taken. If it is equal, the record is unlocked. This conforms to the specification.
And yes, I implemented bookFlight() on the server side as well, but left lock() and unlock() to be called on the client side. When an Oracle database is updated, it is up to the client to use setAutoCommit() and comiit() to maintain the integrity of the database. This is not the responsibility of the database, or server, for that matter. Therefore, I used the same logic and placed all database integrity responsibility on the client.
Hope that clears things up,
SAF
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
pooja,
Sorry, I missed your questions. If new data is added to the database, are my choice boxes updated? I am assuming you mean my Origin and Destination combo boxes, right? They are the only choice boxes I used, but no, they are not updated. I simply use static data to populate the list.
I did perform client tracking, just check the post before this one directed to Richard for an explanation of my design.
My criteriaFind() method is not synchronized because the specification did not ask for it.
hope that helps,
good luck
SAF
 
pooja vij
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks fot the reply
if possible kindly guide on these two questions:
(1) i am using textfield for entering source,destination etc.
the problem is that i have to press 'ENTER' for generating action Event.Now suppose that the customer misses/forget to press 'ENTER' ,the result generated is incorrect.Is there alternative where i can aviod pressing 'ENTER'.
(2)I really appreciate your client model.please help me on connect/disconnect to network or local in client model.
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why bother with generating an ActionEvent from the Origin and Destination airport textfields? Just use a "Search" button like I did. Also, if I were you, I would use drop down menus for the Origin and Destination airports. Apparently the examiners did'nt mind that I used this approach since they gave me perfect score on the GUI. Just a recommendation, that's all.
I'm not sure what you mean by your second question. Do you need help on the locally connected clients? Are you confused on how to design that part?
SAF
 
richard Jei
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx SAF, I was choosing RMI, I do know the merit of using socket with threads, client id gotten from thread name is just one of those, as well as speed, flexibility. I may provide one more function in interface for the client registry where client will get its unique ID assigned by server.
Thanks again for your opinion and time.
Richard.
 
Luna Bora
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can you please tell me whether your class files are in their respective directories along with source files? or did you create another directory for classes? thanks.
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congradulations on your score SAFROLE M3
What is the UML Test that you are talking about ???
Vivek
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Luna,
My class files are stored in a jar file called "fbn.jar" located in the "bin" directory of my main jar file. My source files are located in a directory named "src" located in the main jar file as well. The source files are not in a jar file and they are separate from the binary class files.
Vivek,
The UML test is an IBM test (486) which covers UML and object oriented design and analysis. You can get more info here
SAF
 
Luna Bora
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SAF,
Thanks for your time. I have one more doubt, what all can we document regarding design decisions? What user documentation did you provide for the Data server? I think there is nothing much that we can document for the server, I don't know what to include. Thanks in advance.
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as system documentation is concerned, I only documented high-level aspects of my system. I created an overview that briefly covered the entire system, then I included sections that covered client-side connection adapter component design, server-side client thread design, and TCP/IP OO message model. That's it.
I did not provide any user documentation for the data server. I only provided user guides that covered how to start the server and client, and how to use the conversion tool.
SAF
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi SAF,
Congrats on passing!!!
Thanks again for taking the time to answer these post. I have personally learned a great deal from reading them.
My question is in regards to your response to Richard Jei's client id locking question. Correct me if I am wrong, but I believe you are using a server side hashtable with the record number as the key and the client thread ID for locking comparison.
How do you handle the scenario where a client locks a record and then crashes before it can unlock the record? How is the lock released?
What happens if two clients (on different machines) connect to the server with the same PID? I know the probability is low, but I was wondering.
Thanks,
Tim
 
pooja vij
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm planning to give written exam with in 2/3 days.
i've heard there are 6/7 question which are asked in the written exam.as per my knowledge every body is asked the same questions.
what question were asked in ur written exam
please help me
thanks
please mail at my id.

[This message has been edited by pooja vij (edited July 09, 2001).]
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,
That's interesting. I thought about that scenario, and many other scenarios began to come to mind as well. Should you handle them all? You certainly can, but I did'nt. Remember, a simple and eloquent design that satisfies the requirements is what the examiners are looking for. No need to go nuts. I kept the GUI simple and still scored a 10/10 on it, go figure! And I did'nt even take future GUI updates into consideration0, like the requirements specify.
If two clients connect to the server, they are both guaranteed unique PID's. Are you talking about thread id when you say PID? When the server creates a new client thread, the thread constructor calls a private method that obtains a unique id and passes this argument to the super classes constructor,namely Thread( String name). This assigns the thread's id. I can post my method for creating a unique id from System.currentTimeMillis(), but you should be able to derive your own method also. I'll post it tomorrow.

pooja,
The questions that were asked on the written exam, as far as I can remember, were...
1) How did you implement record locking?
2) What communication method did you choose(objects over TCP/IP or RMI) They dont even ask why, but I mentioned why anyway!
3) Describe the cost and merits of using serialized objects over TCP/IP and RMI.
4) damn, that's all I can remember!
hope it helps, dont worry, it's an easy test. You should feel bad for me! I have to take 486 UML on Wednesday!
SAF
 
Tim Lauster
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SAF,
Thanks for the comments.
I think you are right about keeping the record locking simple. It is easy to get carried away and turn this into a REALLY complex project.
Please do post the method to create unique identifiers.
Thanks,
Tim
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The method is simple....
private static String nextClientId(){
 long cur = System.currentTimeMillis() * 36;
 synchronized (ClientHandlerThread.class){
  //make sure we return a unique id by
  //comparing cur to lastId
  if (cur <= lastId){
   cur = ++lastId;
  }
  else{
   lastId = cur;
  }
 }
 return String.valueOf( cur);
}
SAF
 
Misha Milshtein
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just wondering,
before you uploaded your application, have you tested it on any of UNIX based platforms? Did it look ok? Yesterday I tried mine on Linux and it looked rather unflattering. Of course, the resolutions on that box were pretty low too...
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Absolutely. I tested on both Windows and XWindows (UNIX). I did this mainly for the GUI because some differences do exist in hte look and feel between the two platforms. For the most part, the GUI looked the same with the exception of a few labels that were getting cut off because of their size, so I was forced to use the FontMetrics class in order to make the GUI adaptive and display correctly irrespective of the platform it was running on.
The rest of my program remained unchanged.
SAF
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SAF,
There is a requirement that says 'You must provide exact command-line instructions.' Did you provide the commands to execute the programs in both unix and windows in Readme.txt? Thanks for your reply.
 
Luna Bora
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you have two seperate jar files for server and client when you submitted? Thanks.
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adithya,
Yes. I created batch and Unix shell scripts to run the client, server, and conversion tool on both UNIX and Windows, and provided very clear instruction on how to use all of them in the README file. Here's my read me file if you want to look at it...
http://members.roadfly.com/saf/README
Luna,
No, I used one jar file for the entire codebase.
hope it helps guys,
SAF
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
am I missing somthing here ?
What is this conversion tool that you have apart from client and server ?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi SAF,
Congrats on passing!!!
I have some questions on CriteriaFind.
1.Is your CriteriaFind generic,if so how you have handled the logic.
2.Whether u forced the user enter a value in Carrier filed.If Carrier filed is blank whether you just created CriteriaFindString="Orgin airport='xxx',Destination airport='YYY'"
3.Whehter u provided the user to enter "ANY" or "*" in the carrier field
It will be great help if u answer these questions.
Thanks!
Srikar
[This message has been edited by Srikar Kumar (edited July 15, 2001).]
[This message has been edited by Srikar Kumar (edited July 15, 2001).]
 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
shashank,
The conversion tool was part of my specification. The database server makes use of a binary file for reading in the flight data. The binary file must be created programmatically from a text file that is provided to you as part of the assignment jar file.
Basically, you have to create a tool (program) that reads in the text file, which contains all the flight data in regular ASCII code, and converts the data into a binary file by creating a RandomAccessFile object. This file will ultimately be used by the server when it is running to access the flight data and make changes to it.
The conversion tool should be part of your assignment, or perhaps it's not. I had the Fly By Night Reservation system assignment, and maybe you have something different.

Srikar,
I'll get back to you on this tomorrow, since this will require some explaining, and I'm going to bed now ;-P
SAF
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shashank, I also have the Fly By Night assignment without the conversion tool. I think there is no reason to worry about this, since it is likely that there are minor differences between apparently similar assignments. This can serve as a protection against someone copying another persons assignment.
I think this is the reason that my specification says:
"You may not use files from sets issued to other certification candidates - even if you believe they are identical."
These are the Marking Criteria (short version) for my assignment.
Marking Criteria
General Considerations (Total 58)
Documentation (Total 20)
User Interface (Total 24)
Server Design (Total 53)


[This message has been edited by Markus Bengtsson (edited July 16, 2001).]
[This message has been edited by Markus Bengtsson (edited July 16, 2001).]
 
shashank shah
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Markus,
Thanks for clarification, ... Meantime I read the instructions again and again 10 times to see if I was missing that point :-(
Shashank
reply
    Bookmark Topic Watch Topic
  • New Topic