• 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

"Fly by Night"

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody! Do you know the "Fly by Night" project in SCJD exam? Would you like give me some suggestion? First I am confused why there is a "non-networked mode"? Does the client side have a local database file? It is useless in my opinion! Second the exam said: "the program must allow the user to specify the !!location!! of the database, and it must also accept an indication that a local database is to be used," what the location means? In server side, means "server ip and port number" or exactly server-side filepath and filename like "\\....\db.db"? And what about the client-side? Is "localhost" enough or it must be "c:\...\db.db"? Please Help Me!
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have just come to the right place.
First and foremost, this application is to test your ability to develop Java software. It is not intended to be a perfect software or to make perfect sense (the binary database is an example of non-sense).
As for the local mode, it has to connect directly to the file locally (localhost won't do at all). And yes, the file has to be in the client side.
So, you will have two connection modes (mutually execlusive):
1- Network: u have to specify the server DNS name (or IP), and the port number. In my case I also added the name and path of the file on the server (for example c:\scjd\db\db.db)
2- Locally: you need to specify the file name and path (for example: c:\scjd\db\db.db)
Hope this helps
Best regards
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what i understand of u is that both modes are exclusive.
can we say that , the db file will never be acessed by clients in rmi and a local client on same time
plz clarify
walid
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What made sense to me was to make my "server" just a kind of "administrator version" of my "normal client." The server opens the database "locally," and then makes it available to normal clients via RMI.
I have only a single application that has a "server" and a "client" mode, in other words. I can search for & book flights from the server just like any other client, and RMI makes it essentially transparent as to whether I'm in "server" or "client" mode.
Clients make their calls through stubs, whereas the server calls the stub's "parent" directly. The server competes for locks just as any client would.
And that is essentially the whole point of RMI: to make your code "not care" whether it's executing locally or remotely.
[ November 10, 2002: Message edited by: Thomas Fly ]
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a question regarding running the application-- Do we need to test the application remotely(ie.. keeping the server.jar in one system and client.jar in one system)? or is it enough if we run in one system. To test remotely, either we need a webserver(which is not specified in requirements) or the two systems must be connected through LAN. Will the examiner test the application remotely ??
Please clarify this..
thanks in advance..
 
fadi mujahid
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding the first question of Walid, depending on the design of your application, it will/won't matter if both remote and local clients are accessing the same database.
I did what Thomas said: make the server (in my case sockets) only a tool to access the database locally tot the server. So, whether u have multiple local clients, or multiple remote clients, or a mix of both doesn't matter.
Regarding testing the application remotely, you don't need a web server for that. All what u need is a LAN with two computers: the server running on one, and the client running on another.
If it is not possible to have two computers, u can use one computer and run teh client and server on two JVM, and use localhost to point to the server address.
Hope this helps
 
Tiger Meng
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I saw the exam first time, I have the same project design as Thomas Fly, "one application"(with server and client mode) is enough. Because it is useful. only server-side have the db.db file. Server-side locally running and client-side RMI running. But I am afraid of the following things:
* The exam said : your should let user choice the mode! Following this design, the local mode(or non-networked mode) can only occur in the server-side! or in "server mode" like Thomas said.
Will the examiner confused by us?? My sense is the examiner would like to see the local mode program run in client-side (after I have studied the exam docs for about 100 times).
Thank you everybody.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"meng xx"-
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
 
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