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 8940591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:04:25+00:00 2026-06-15T11:04:25+00:00

I have a client-server application where the server transmits serialized objects in protobuf format

  • 0

I have a client-server application where the server transmits serialized objects in protobuf format to a client, and I would like to retire a required field. Unfortunately I can’t change both client and server at the same time to use the new .proto definition.

If I change a required field to be optional, but only for code that serializes messages (i.e. deserializing code has not been rebuilt and still thinks it’s a required field), can I continue to publish messages that can be deserialized as long as I populate a value for the now-optional field?

(It appears to be fine to do so, at least for a few trivial cases I experimented with (only using Java), but I’m interested if it’s a generally sensible approach, and whether there are any edge cases etc I should worry about).

Motivation: My goal is to retire a required field in a client-server application where the server publishes messages that are deserialized by the client. My intended approach is:

  1. Change required field to optional on the trunk.
  2. If it’s necessary to deploy new server code (for unrelated features/fixes), ensure that the optional field continues to be populated in the message.
  3. Gradually deploy updated code for all clients (this will take time as it requires involvement of other teams with their own release schedules)
  4. Confirm that all clients have been updated.
  5. Begin to retire (i.e. not populate) the optional field.
  • 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-06-15T11:04:27+00:00Added an answer on June 15, 2026 at 11:04 am

    According to the encoding format documentation, whether a field is required or not is not encoded in serialized byte stream itself. That is, optional or required makes no difference in the encoded serialized message.

    I’ve confirmed this in practice, using the Java generated code, by writing serialized messages to disk and comparing the output – using a message containing all of the supported primitive types as well as fields representing other types.

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

Sidebar

Related Questions

I have a client/server application where data is exchanged in XML format. The size
I have a client Server application which communicate using objects. when I send only
I have a client / server application exactly like in this link. When I
I have a client server application in which I need to transmit a user
I have client/server application where the client app will open files. Those files get
I have some client-server application. And as one of its part, I need to
I have a Client/Server application, where the Client and Server have some common tables
I have a client server application in which the server and the client need
I have a client - server application, where I want to add a exception
i have this client/server application, and the client application sometimes completely freezes when i

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.