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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:03:04+00:00 2026-05-23T17:03:04+00:00

I am just getting into backbone.js and am finding progress a little slow. My

  • 0

I am just getting into backbone.js and am finding progress a little slow. My main problem is working out how to keep my client and server side models in sync using socket-io (technically I am using now.js but the same principal should apply).

I think the best way is to override the sync method but some simple advice would be really welcome.

  • 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-23T17:03:04+00:00Added an answer on May 23, 2026 at 5:03 pm

    Simply overwrite Backbone.sync so that it sends messages down socket.io and tells the relevant backbonejs models on the server to alter state.

    The interesting part of this solution is setting up the master-master relationship. You need to insure that for any client they can only “update” the state of models on the server that they have “ownership” of to avoid hackers and server-side state corruption.

    So for each client they have a set M where that client is the master of all models in M and has a set S where that client has slaves of all the models in S.

    It can only force updating on the server of models in M and only one client should have a particular model in M (or you need to implement a solid locking / merging implementation).

    Whenever a model on the server is updated you simply push out to any client who has that model in S. (and push to any client who has that model in M if the model is in M for multiple clients).

    A lot of thought needs to go into control / permissions and ownership that is normally handled by the MVC controller once a client POST/PUT/DELETE some data.

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

Sidebar

Related Questions

I' m just getting into Yii and am finding it a little confusing (at
My little brother is just getting into programming, and for his Science Fair project,
I am just getting into more client-side stuff in ASP.NET using Javascript, and there's
I'm just getting into Markdown and think it's the bee's knees. I'm working in
I am just getting into MEF and I have come across a problem that
I am just getting into SQL Server, and I have some experience with MS
I'm just getting into using prototypal JavaScript and I'm having trouble figuring out how
I just started getting into BizTalk at work and would love to keep using
I'm just getting into graphics in Java and I have a problem. I created
I'm just getting into functional programming and i'm in the try out some non-trivial

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.