Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6322641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:22:15+00:00 2026-05-24T16:22:15+00:00

I’m working on a simple client/server application that uses sockets for all the communications.

  • 0

I’m working on a simple client/server application that uses sockets for all the communications. Communications are packet-based and the concept of packets is implemented using a set of classes and ObjectInputStream/ObjectOutputStream wrapper for socket streams.

Wondering if this approach has any disadvantages when compared to either fully text-based protocol (like IRC) or “very binary” stuff where I explicitly work with bytes.

Let’s ignore the traffic problems here (“qwerty” vs. “qwerty” + 1KB of metadata) and only consider reliability and maintainability.

What do you think?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:22:16+00:00Added an answer on May 24, 2026 at 4:22 pm

    Personally I’ve found the binary serialization built into Java to be immensely painful. It’s ludicrously easy to end up with version incompatibilities even when you haven’t changed anything you expect to cause problems.

    That’s not an issue if:

    • You can guarantee your clients/servers will all be running exactly the same version of your code.
    • You never need to read any data that was written by a previous version.

    Maybe that’s your situation – but personally I prefer a serialization format which allows me to be more flexible with versioning. Now that doesn’t require it to be either binary or text of course. You could use JSON, Protocol Buffers, Thrift or any number of other options. Each will have separate pros and cons – but each is likely to be designed with simpler version compatibility in mind than Java.

    Now the upside of Java serialization is that while you’re in the situation where everything works (your entire tree is serializable) you can just serialize it with no other changes – you don’t need to model your data separately, as you do with some serialization frameworks. Unfortunately, as soon as you want to use a class which isn’t serializable somewhere in your tree, you’re back into pain…

    As for the choice between text and binary forms – the pros and cons are reasonably obvious. Text is bigger, but it’s easier to diagnose what’s going on just by looking at network traces. You need to make sure you use the same encoding on both sides, of course.

    Oh, and of course if you ever want to communicate with a non-Java client/server, you’ll have a hard time if you’ve used Java’s native serialization 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.