• 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

network connectivity?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have chosen using plain socket and object serializtion. So, I will have a server socket running at the server side. My question is can I use a random port number and if it is already used? I am thinking to go on to the next port number until finding available one? Am I right or there is no need?
Also I am thinking to write the IP address and port number so that the client gets them to connect to the proper server socket?
can anybody please confirm me?
any idea highly appreciated
Kind regards,
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there
I am too happy to hear that you are also doing a Socket based solution (I thought that I am the only one). You should allow the user to configure the port number thru a GUI configuration window at start up. As the assignment instructed, you should read the previous port number from a property file along with other settings. Hope this help. I am done with everything except the Client window, I had been busy for almost a month, but I am back in business now. Wish you all the luck and hope to hear from you soon.

Hatim
 
s yucel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
thank you very much for the quick response.
Still I am not sure what to do with IP address and port number.
So, if the examiner wants to run the server on a remote PC, then
initially, he needs to run the client GUI, change the IP address and PORT number , and then run the server on that remote pc. By the way, the client will get the address/port from the conf. files...Am I right with
all these things?
Actually I have one more question confusing me. I would like to clear.

java -jar <path+filename> mode
if mode==server , then just only the server will run,
if mode==alone then without server the client will run itself
if mode is empty then GUI will run and connect to the server ?
And the main class that directing to the proper classes will be defined
in the Manifest dir of the jar file called Main-Class:....?

any confirmation is highly appreciated

Kind regards,

syucel
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am busy with B&S version 2.3.1. I, too, am using the serialization over simple socket.

The assignment say that GUI must be used to configure. Meaning, you may have one GUI to configure networked-client and the database server or have different GUI. I have chosen the later.

The assignment also mention the name of the conf file "suncertify.properties". If the file does not exist then default to something appropriate. The user may or may not change these defaults. These values must then update the properties file for the next time.

I think the appropriate default IP address in the networked-client config GUI should be either "localhost" or "127.0.0.1". Where as port number should be any between 1000 - 99999. I'd say 1234 is quite ok.



java -jar <path+filename> mode
if mode==server , then just only the server will run,
if mode==alone then without server the client will run itself
if mode is empty then GUI will run and connect to the server ?
And the main class that directing to the proper classes will be defined
in the Manifest dir of the jar file called Main-Class:....?



Your understanding of modes are correct. However, you should not edit the Manifest, the tool used to create the "executable jar" will do the necessary. The IDE your are using must have functionality to create an executable jar.

Hope this helps.

Regards
Sanjay
 
hatim osman
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
Everything being said in the previous post is ok...and you should follow that. however I have some remarks regaring this:

he needs to run the client GUI, change the IP address and PORT number , and then run the server on that remote pc.



Watch out!!! the assessor doesn't have to run anything except the executable jar file "There is only one program to be executed". I recommend that whether the properties file exists or no, the GUI configuration window should pop up with defaults if present.

Hatim
 
hatim osman
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
Everything being said in the previous post is ok...and you should follow that. however I have some remarks regaring this:

he needs to run the client GUI, change the IP address and PORT number , and then run the server on that remote pc.



Watch out!!! the assessor doesn't have to run anything except the executable jar file "There is only one program to be executed". I recommend that whether the properties file exists or no, the GUI configuration window should pop up with defaults if present.
I wonder why the manifest file cannot be created manually???

Hatim
 
reply
    Bookmark Topic Watch Topic
  • New Topic