• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

time-outs and server-crash

 
puranik
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am almost done with this project. However
I scared to submit it for two reasons.
(1) I have not implemented time-outs for locks.
(2) I do not inform client in the event of
a server crash.
I would appreciate any input on how critical
these two features are.
I would like to implement the second one (at
least) and would appreciate any pointers on that.
ap
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by apuranik:
I am almost done with this project. However
I scared to submit it for two reasons.
(1) I have not implemented time-outs for locks.
(2) I do not inform client in the event of
a server crash.
I would appreciate any input on how critical
these two features are.
I would like to implement the second one (at
least) and would appreciate any pointers on that.
ap

Hi apuranik,
First, you might want to consider changing your name: the policy here is a first name followed by a last name. Perferably, your own.
As to your questions.
1. You don't need to, per the the instructions for the lock method. Don't worry about this.
2. If you're using rmi, the client should get an RemoteException when the server crashes. So long as you handle that, you should be fine. If you don't handle it, then you might want to display a friendly message and shutdown. Don't offer to reconnect, as it's probably out of scope. Remember, all you have to do is build the application they asked for.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
[ August 06, 2002: Message edited by: Max Habibi ]
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. You don't need to, per the the instructions for the lock method. Don't worry about this.
2. If you're using rmi, the client should get an RemoteException when the server crashes. So long as you handle that, you should be fine. If you don't handle it, then you might want to display a friendly message and shutdown. Don't offer to reconnect, as it's probably out of scope. Remember, all you have to do is build the application they asked for.

Ditto to both 1) and 2). That's exactly how I handled that, and I got max score on the server.
Eugene.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"apuranik"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And a second ditto from me on Max and Eugene's answer.
Mark
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only thing I would add regarding lock time outs is you might consider having your Remote connection class implement Unreferenced in case a client crashes so you can release any locks that the client holds. That will at least make those locks available again to other clients when Unreferenced is called.
Michael Morris
I am assuming you are talking about server side lock time outs. For client side, just don't worry about it. As the others said, the next call you make on the Remote interface should generate a RemoteException which you should handle as they indicated.
[ August 06, 2002: Message edited by: Michael Morris ]
 
puranik
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all very much for your responses.
I think I am already handling the RemoteException.
The message (in an Error Dialog) I display is
like "Connection Refused to host XXX.XXX.XXX.XXX
nested Exception is ..."
Time-out for locks is also off my TODO list.
Additional questions
1. I have implemented a provision for
advance search. Where flights could be
search by any combination of
Flight#, Origin, Destination, Carrier,
price and Day of the week. (you could enter
none through all of these values).
Is it a scope creep and a potential candidate
for deduction of points ? (It made and still
makes so much sense to me to have it and I do
not have a heart to remove it)

My "regular" search is via two comboboxes
for Origin and Destination inputs.
2. As part of my documentation I have a Readme
and a Design-Doc. Is it absolutely necessary
to have just one Readme with the all the docs
in it ?
thanks
AP
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. I have implemented a provision for
advance search. Where flights could be
search by any combination of
Flight#, Origin, Destination, Carrier,
price and Day of the week. (you could enter
none through all of these values).

You mean "you could enter any through all of these values", right?

My "regular" search is via two comboboxes
for Origin and Destination inputs.

Sounds like your regular search is a subset of the criterias in the advanced search. If you want to keep the extra criteria, keep them all in a single search feature.

2. As part of my documentation I have a Readme
and a Design-Doc. Is it absolutely necessary
to have just one Readme with the all the docs
in it?

I am not sure what you mean by "just one Readme with the all the docs in it". If you are asking if the readme.txt should contain the information about location of db.db, location of design choices documents, etc., the answer is a firm "yes". Also don't forget about user documentation (separate from readme and design doc).
Eugene.
[ August 06, 2002: Message edited by: Eugene Kononov ]
 
puranik
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
quote:-----
You mean "you could enter any through all of these values", right?
---------------
Yes, thats what I had intended to say.
quote:--
Sounds like your regular search is a subset of the criterias in the advanced search. If you want to keep the extra criteria, keep them all in a single search feature.
----
You are correct the "regular" search (as per the
specs) is a subset. For regular search
the the combo-boxes are right on the top of the
Table .For 'Advance Search' a button is pressed
which pops up a small window which takes in the
extra criteria. IMHO it is similar to GUIs I
have seen. The Adv Search is not in the way of
the regular search hence I am having a difficult
time deleting it.
quote:--
I am not sure what you mean by "just one Readme with the all the docs in it". If you are asking if the readme.txt should contain the information about location of db.db, location of design choices documents, etc., the answer is a firm "yes". Also don't forget about user documentation (separate from readme and design doc).
----
great!
Thanks for your response.
ap
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi A,
If I understand your second question correctly, you're asking if it's ok to have two documents. A ReadMe, and a Design_Choices. The answer is yes. Not only is it ok, it's completely necessary. As to what to feature in your ReadMe: read your directions _exactly_(they may be different then the directions others have received). Interpret them _exactly_, and submit your assignment. You can't be faulting for taking written directions literally, but you can be faulted for not following them.
Good luck,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

For regular search
the the combo-boxes are right on the top of the
Table .For 'Advance Search' a button is pressed
which pops up a small window which takes in the
extra criteria. IMHO it is similar to GUIs I
have seen.

Oh, ok, that's just fine (although not neccessary).
Eugene.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic