• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Server Client Desktop Application

 
Amila Jayatillaka
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I'm working on a server client base "Desktop Application". And what I want to do is this,
Client application sending some request code to server application through internet(oh yes, these connections must be secured). and when server application gets this code it will again do some jdbc work and gather some data.
And then server application will return those data again to the client application.
what technology i can use to archive this. should i use RMI or P2P. Or just some secured connection and read data through that.
Im so much confused right now and i need to finish this project by 10th Jan and i have to do my SCWCD exam on 7th help me on this please guys.
 
Rob Spoor
Sheriff
Pie
Posts: 20659
64
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P2P seems an odd choice given your clearly client-server based protocol.

RMI is an easy solution since all the hard work is done for you. You can secure it quite easily too. Assuming you are using UnicastRemoteObject as your server base, you can pass instances of javax.rmi.ssl.SslRMIClientSocketFactory and javax.rmi.ssl.SslRMIServerSocketFactory to your constructor. All socket communication then uses SSL.
 
Amila Jayatillaka
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob thanks for the quick reply,
If you dont mind can you guide me through a RMI example. I've not done anything before using RMI ... If you can would you give me a gud example.
I only have a abstract idea about rmi but i'll google from what you have just said to get a idea
 
Rob Spoor
Sheriff
Pie
Posts: 20659
64
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Tutorials - Trail: RMI is the place to start.

There is one thing I tend to do differently from that trail though. Instead of

I usually also extend UnicastRemoteObject:

This allows me to use my own socket factories.

See also this link.
 
Amila Jayatillaka
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow that was quick ...
and helpful .
I just looked @ it and it seems so good. Thanks Rob thank you very much...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic