• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passed with 348/400

 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I received my results today and I got 348/400. The following is a summary of my performance:

General Con: 100 85
Documentation: 70 58
OOD: 30 27
GUI: 40 28
Locking: 80 80
Data Store: 40 40
Network Server: 40 30
Total: 400 348

Thanks to all ranchers that had offered me their valuable advices.
 
Walter Tang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations....

Could you tell us how you implement the server. You use a single Data object or each client has its own Data object to access the file? Thanks a million
[ January 07, 2005: Message edited by: Walter Tang ]
 
dennis du
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do it like this:
the server built one buffer for the file.
All the clients try to access the same buffer.
In theory,this is the best way which fit the C/S structure.

Is it right?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Clivant
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations.... [jumpingjoy]

Could you tell us how you implement the server. You use a single Data object or each client has its own Data object to access the file? Thanks a million

[ January 07, 2005: Message edited by: Walter Tang ]

--------------------

SCJP


I used a single Data object for all the clients. In this way my locking mechanism can be handled more easily.
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do it like this:
the server built one buffer for the file.
All the clients try to access the same buffer.
In theory,this is the best way which fit the C/S structure.

Is it right?


I did memory caching for the file and all clients will access the same buffer. However, there is a danger of the OutOfMemoryError. I justify this danger as not applicable to the scenario as my database file do not need to grow.
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Clivant [beerchug]


Thanks Andrew, for your valuable advices.
 
Beny Na
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clif quote:
"I did memory caching for the file and all clients will access the same buffer. However, there is a danger of the OutOfMemoryError. I justify this danger as not applicable to the scenario as my database file do not need to grow. "

B: Congratulations Clif...

I have a question regarding the danger of the outofmemoryerr.
can we have outofmemory error if the records size is too many to be load into memory, as i know it will be handled by operating system by caching/swapping it to the disk(virtual memory)?
please correct me, thanks...
--------------------------------------------------------------------------
 
GD Deepz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Clivant, you got 80/80 for locking, did you take orphan locks(i.e lost clients) into consderation?
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clif quote:
"I did memory caching for the file and all clients will access the same buffer. However, there is a danger of the OutOfMemoryError. I justify this danger as not applicable to the scenario as my database file do not need to grow. "

B: Congratulations Clif...

I have a question regarding the danger of the outofmemoryerr.
can we have outofmemory error if the records size is too many to be load into memory, as i know it will be handled by operating system by caching/swapping it to the disk(virtual memory)?
please correct me, thanks...
--------------------------------------------------------------------------


Hi Beny:

The OutOfMemoryError is thrown by the java virtual machine when memory consumption is too much for it to handle. Having too much record in the Java Virtual Machine's memory heap will cause the phenomenon.

Hope it helps.

Regards,
Clivant
[ January 10, 2005: Message edited by: Clivant Yeo ]
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Clivant, you got 80/80 for locking, did you take orphan locks(i.e lost clients) into consderation?


Hi Deepz,

I used Sockets as my connection option. By using sockets, lost client connection can be detected immediately, and the thread handling that client will terminate. Hence, I dun take orphan locks into consideration as the Java Virtual machine will handle it once a null client (terminated thread) accessed a lock. Just my two cents, anyone correct me if I am wrong.

Hope it helps.

Regards,
Clivant
 
GD Deepz
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Clivant. I am using RMI, just looking at the various ways how lost clients are handled. Some say, this is beyond the scope of the requirements but people who got 44/80 on the locking might have not handled lost clients eventhough they felt confident in their locking solution.
 
Beny Na
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clivant,

"The OutOfMemoryError is thrown by the java virtual machine when memory consumption is too much for it to handle. Having too much record in the Java Virtual Machine's memory heap will cause the phenomenon"


b: doesn't The OS always allocates contiguous memory space to the JVM(heap fragmentation)???
i want to convinced in what case a outofmemory error htrown by jvm.


please correct me,...thanks
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Clivant. I am using RMI, just looking at the various ways how lost clients are handled. Some say, this is beyond the scope of the requirements but people who got 44/80 on the locking might have not handled lost clients eventhough they felt confident in their locking solution.


Welcome Deepz.

Just make sure that there is only a single access to the data store and that access to it is well synchronized, then you are fine. Just my 2 cents

Rgds,
Clivant
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clivant,

"The OutOfMemoryError is thrown by the java virtual machine when memory consumption is too much for it to handle. Having too much record in the Java Virtual Machine's memory heap will cause the phenomenon"


b: doesn't The OS always allocates contiguous memory space to the JVM(heap fragmentation)???
i want to convinced in what case a outofmemory error htrown by jvm.


please correct me,...thanks


Hi Beny,

To what I know, the JVM is an application running on the Operating System. It is true that the OS allocates memory to it, but the JVM itself have its own memory heap which it manages for the Java applications that are running on it. Below is a flow (my 2 cents) that depicts the relationship between Java Applications, JVM and the OS.

Java Applications -- runs on --> JVM -- runs on --> OS

The OS manages the memory heap for programs running on it (including the JVM) and the JVM manages its memory heap to run Java Applications running on it. I hope that makes the scenario clearer. Any comments from other rancher on this? My 2 cents.

Regards,
Clivant
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do it like this:
the server built one buffer for the file.
All the clients try to access the same buffer.
In theory,this is the best way which fit the C/S structure.

Is it right?


Hi Dennis,

Sorry for missing out your question. I did this approach too, the server reads up the file and then store all the records in buffer and clients access the same buffer. This method had a major setback and that is the JVM will throw a OutOfMemoryError when the records get too large (unless you do some complex buffering that buffers just part of the data and not all of the data).

I use this approach for the sake of efficiency for my searching function. Furthermore locking is easier using this approach. There are stages that I actually got very disturbed about the OutOfMemoryError issue (I did some testing and saw that my application begin to lag when the records get too large and that it finally crash).

I tried to write up the database file by not having to build the buffer, just having the inefficient way of reading the database file for every client search. I actually found out that implementing it this way is easier, lesser codes to manage and that I don't have the trouble of my application crashing.

Just when I finished some part of this approach, I suddenly remembered that my specs don't require me to insert or delete records, I just need to provide search and update function. Based on this point, I significantly justify in my choices.txt this important fact and start completing the whole choices.txt I had already completed my project with memory caching and writing the database again is time-consuming, furthermore I got to prepare for my final year project that I am having this year, no point in doing the silly business. Handed it up, make sure I write as much as I could and got certified (although it is not a very good point).

If I were to do this again, I will either not buffer at all (easy coding for the just-enough project requirements) or strong buffering without the application crashing (hard coding, thinking and time but high self-sastifaction).

Note that if you consider strong buffering, you will also need to provide paging for the results returned (The records are stored in the underlying collection for the JTable, memory still counts!).

Just My 2 cents, hope it helps.

With regards,
Clivant
[ January 10, 2005: Message edited by: Clivant Yeo ]
 
Andy Davey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Clivant!
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Clivant! [beerchug]


Thanks Andy
 
dennis du
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
--------------------------------------------------------------------
Just when I finished some part of this approach, I suddenly remembered that my specs don't require me to insert or delete records, I just need to provide search and update function. Based on this point, I significantly justify in my choices.txt this important fact and start completing the whole choices.txt I had already completed my project with memory caching and writing the database again is time-consuming, furthermore I got to prepare for my final year project that I am having this year, no point in doing the silly business. Handed it up, make sure I write as much as I could and got certified (although it is not a very good point).
---------------------------------------------------------------------
hi Yeo,

Yeah...... I don't want to do the server like Oracle 9i.
If it is enough for me to get the certified,it is ok.

Congratulation!!!
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have moved this topic to the Sun Certification Results forum.

Regards, Andrew
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations and best wishes for your future endeavors.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic