• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Client Connection timeout bound with Record Lock timeout - URLyBird

 
Ranch Hand
Posts: 57
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(URLyBird 1.1.3 with cookies)

Here is my idea:



-ConnectionManager is Subject for GUIClient the Observer.
-Let say that every two minutes the ConnectionManager in the network mode will replace the Data with new instance in the GUIClient.
-Before the subject disconnects the data instance it will performs necessary check if client has something running on the remote object.

I was now reading the SCJD forum for a wail and didn�t found anything that would be similar to this solution.
I just want to check if some had implemented any kind of prevention of dropped connection.
I don�t mean solving the problem, I mean preventing it (just to be explicit). I guess read a lot about the problem solving like WeakHashMap or Unreferenced or daemons checking the Map for invalid connections.

Right now I�m in starvation for simplicity please help
 
Mat Banik
Ranch Hand
Posts: 57
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jet other view.
How many people got through (SCJD) with just lockRecords Map that did not implement any lock removal after client has suddenly dropped connection (didn�t remove the lock record)?
Has somebody failed because of deadlock by dead client?
Can somebody tell?
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matej,

Several candidates have proposed (and presumably implemented) timeouts in their locking code in the past. I have not heard of anyone failing for this.

I have also heard of several candidates passing with very high scores without having any code to handle orphaned clients.

No matter what you do, you have to be very clear in your own mind why you chose your particular option over the others, and make sure you document it clearly in your Design Choices document.

Having got all that out of the way ...

In my personal opinion, I don't think automatic timeouts are acceptable. The way I read the instructions, once I have been granted a lock, it is mine. Fullstop. There is nothing in the instructions that might indicate that the server could decide after 10 seconds to cancel a lock. And that being the case, how do you decide what the magic number for timeouts is? 10 seconds might be OK for a "booking" process where the entire booking happens without user interaction, but 5 minutes may be too short if the booking requires user interaction (lock record / confirm with client / update record / unlock). Since the instructions indicate that parts (if not all) of the application may be rewritten in the near future, you might have to make the timeout value configurable. This is getting more complex as we go along.

The alternatives you mentioned (using Unreferenced / using a WeakHashMap in combination with a background thread) only come into play when the connection is guaranteed to be lost. They are also not required according to the instructions, however in my opinion they lead to a more professional solution.

Regards, Andrew
[ December 11, 2004: Message edited by: Andrew Monkhouse ]
 
Mat Banik
Ranch Hand
Posts: 57
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply to my post. I want to avoid excessive code in my assignment. I would like to have the code clear and as much as possible relevant to the requirements. I didn�t know how I should start my description of the choice �not to implement client connection record deadlock�, but you got me started. Thank you.


They are also not required according to the instructions, however in my opinion they lead to a more professional solution.
/QUOTE]

I totally agree. But consider that the assignment by it self is not based on very real ground (for example cookies implementation).
I consider the well being of the examiner of my assignment more imported than professionalism (just one exception in the practice).

 
Andrew Monkhouse
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matej,

I consider the well being of the examiner of my assignment more imported than professionalism (just one exception in the practice).





That's a great way to put it - I may have to steal that line as a signature line

Regards, Andrew
 
Mat Banik
Ranch Hand
Posts: 57
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andrew,

You can use any thing that I write as signature line.

Since this post looks like private conversation. I would like to know your opinion on this (I know it is entirely of the topic but this is just for evaluation):

Examiner (requirements are not the only grading factor).

The result of examination you receive is greatly influenced by:
-examiners mood
-examiners professional experience
-examiners coding habits
-by the day of the week of the examination
-examiners seriousness in the matter of the certification
-examiners health condition
-examiners age (in relation to: need to know more)
�(that�s it for know)

The factor that I�m able to influence:
-complete the requirements and just the requirements (even the once between the lines, and they are very hard to see)
-write the code in the most standard way. (common mistake writing method with names like �compareToRecodrAtSecondColumn()�)
-make the code and listings in �fast to read� fashion (I�m planning to open a thread on this topic after I have study some more literature and code examples.)
-design in relevance to the assignment (like designing by interface is good OO practice but interfaces that are never used are jut more reading for the examiner)

What do you thing it is worth to open discussion on such ground. Or I would spread to concrete details. Do you thing that the best way for discovering opinions on the points above would be discus each in speared thread.

You are very experience in posting (with 3422 posts). So what ever you say I�m going to respect.

You might enjoy reading �Patent It your self� by David Pressman. Even if it has nothing to do with java it is perfect way to discover the examiner�s psyche in very funny way.
 
Andrew Monkhouse
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matej,

You can use any thing that I write as signature line.



Thanks.

Since this post looks like private conversation. I would like to know your opinion on this (I know it is entirely of the topic but this is just for evaluation): ....



There are some excellent topics in your message that could, and probably should, be discussed.

In recent years I have noticed that there are more books coming out regarding how to approach the examination / assessment process. This is something that, unfortunately, I was never taught at school. From talking to friends and family it seems that most people of my generation (at least) were not taught how to do tests / assignments. It was assumed that if you attended the classes & read the books & did the exercises then the tests and assignments would be simple. :roll:

Some of the questions I have seen raised in this forum seem to come from the same feeling of not knowing some of the "other factors" / "factors you can influence" you mentioned.

I would love to see you open some topics up to cover some of these items. Generally speaking, it appears that if a topic is too theoretical and covers more than one concept, it does not appear to get very many responses. So you might want to space out how often you open a new "theoretical" topic, and how encompasing you make it.

You might enjoy reading “Patent It your self” by David Pressman. Even if it has nothing to do with java it is perfect way to discover the examiner’s psyche in very funny way.



Thanks for the suggestion - I will look out for this.

Regards, Andrew
 
Mat Banik
Ranch Hand
Posts: 57
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andrew,

Thank you for your opinion. After I�m done selling stuff on eBay and buying stuff form eBay (for chrisms), I�ll start posting one topic after another.

Have nice one.
Matej
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic