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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:38:55+00:00 2026-05-26T01:38:55+00:00

I have a small application that I’ve written and it talks to another application

  • 0

I have a small application that I’ve written and it talks to another application through a python server that can send json over a network.

What I would really like to do is to be able to have to objects “synchronize” with each other through json. Now I’ve already looked into the gson library, and it seems to be great for serializing an object into json. However, it does not seems (or maybe I just can’t figure it out), to be very helpful if I just want two objects to update with each other.

For example:

Gson is great at

Gson g = new Gson();
Object o = new Object();
String serialization = g.toJson(o, o.class);

However, let’s say that I have object o on two separate clients. If at client 1, they call
o.doSomeMethod(value);

I would like the resulting change to be update to object o on client 2’s computer. Right now I can do a little bit of fanciness and just replace the object with the new serialized version, but that does not seem to be a very efficient method of updating the two objects.

Thanks for any help in advance!

  • 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-26T01:38:55+00:00Added an answer on May 26, 2026 at 1:38 am

    If I were you, what I’d do in your o.doSomeMethod is include a call out to the network that informs client2 about the change. On client2’s side of things, have a method listening for potential updates. When an update comes in, it makes the change to the object on client 2. What you’ll have to do is implement some sort of protocol for sending this sync updates. For instance, let’s say you have an attribute called att1 and client1 makes a change to that attribute on object o. Let’s also say object o has some sort of unique identifier (id). When you call the doSomeMethod, it sends out a message on the netwoks saying “This object has changed the the value for att1, here’s the new value.”. Does that make sense?

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

Sidebar

Related Questions

I have a small application that redirects the stdout/in of an another app (usually
I have a small AJAX application, written in PHP that I did not secure
I have a small command-line application written in C that acts as a wrapper/launcher
I have a small ASP.Net application that appends records from users connected through internet.
I have finalized a small PHP application that can serve many documents. These documents
I have small application that is uploading pictures to another website via webservice. My
I have a small application that I have written that uses the MVP pattern
Background : I have a small Python application that makes life for developers releasing
I have a small application that I am building a Chat application into, so
I have a small application that uses a SharePoint list as the data source.

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.