Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

serialization with sockets

 
Robert Benson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Here's another question for you, with regard to serialization and sockets:

ok I'm coming out of the closet. I coded a socket solution! There I feel better already

I've read the books, followed the tutorials but found sockets to be more intuitive and easier to work with.

However there's one point that I do not understand and cant find (or skipped over) relevant information. Why do some tutorials/examples use serialization with sockets and others not.
I've coded sockets with serialization (because its a requirement).

What is the defining moment when you should/ should not serialize with sockets?



Regards, Robert.
 
David Byron
Rancher
Posts: 175
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Robert Benson wrote:ok I'm coming out of the closet. I coded a socket solution! There I feel better already

You're not alone!

Why do some tutorials/examples use serialization with sockets and others not. I've coded sockets with serialization (because its a requirement).

What is the defining moment when you should/ should not serialize with sockets?


Serialization without sockets: for example, when you want to persist an object graph to the file system.
Sockets without serialization: for example, html or plaintext streaming.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!