• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does anyone have experiences in serialized connection?

 
Laudney Ren
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm starting my work on SCJD. Since I'm quite familiar with TCP/IP, sockets, HTTP etc, I'm considering using sockets to implement the connection between client and server. Besides, the objects to sent over the sockets are fixed, commands are simple and with few changes, a new protocol can be built from scratch.
Does anyone have experiences in this field or do the same thing? I'd like to hear about advice and comments.
-- Laudney
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A long time ago, in a galaxy far far away....
The first java program that I wrote with a co-worker was a chat program. We used Object Serialization for our connection between our chat server and client.
On the server we created a Deamon thread that listened for "Calls", it would accept the object, spawn off a new thread, passing this object to the thread. The new thread was a "Handler" It would look at the object, determine it's purpose and handle it.
the code wasn't that difficult, you just had to code everything. Whereas RMI handles all that plumbing for you.
As a suggestion, which you don't have to follow. But because you already have experience with Sockets, etc. I would go the other way and learn RMI. You will find that you will learn more in the "Certification Process", than using Object Serializations. And even though you will pass with Object Serilization, I find that those that scored higher used RMI.
Again you can just ignore my suggestion, if you want
Mark
 
Laudney Ren
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark.
After careful evaluation and reading from various sources, I have decided to use RMI. It's absolutely right that it's a great chance for me to learn sth new: RMI. In fact, I'm quite interested in distributed computing and plan to design PMDA (protocol modules dynamic assembler) in the near futture.
-- Laudney
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic