• 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

Porting my Client-Server app to RMI

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone.
Yesterday I finished my final Java project where I had to build GUI client-server app.After successfully compiling this,I came to an idea to try and transpose this to RMI,thus,I have only worked with some basic RMI examples.
In my code,I have one thread for a client,one for a server,let me give you a snippet,so you can visualize it.



And here is the snippet of a server code..

 
Milan Milanovic
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basicallz what I think that I need to do,is to implement interfaces both for server and client,but as I have two threads,I dont really understand how to do it,I read something about callbacks and threadsafe threads,but could not figure it out myself.
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RMI is sort of obsolete. I wouldn't spend time learning it unless you knew for sure that you'd need it.

An architecture that might teach you more immediately useful technologies might involve a server running in a servlet container that is accessible via a REST API (implemented using the Java JAX-RS API). That would also take care of the server-side thread issues.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic