4

Can any one tell me an opensource js library that can have a real-time UI synchronization between browsers with the server having a control in between.

I checked autobahn.ws real-time ui synchronization but its not opensource.

It should be compatible with all browsers.

skoovill
  • 1,069
  • 2
  • 12
  • 22
  • 1
    Why did you tag this question as [tag:python]? – Tadeck Mar 28 '12 at 18:08
  • One thing to remember, in order to support this, you will most likely need an independent server that handles these calls. The "real-time" requirement most likely requires WebSockets. You don't have to use socket.io, but you might check out their site as they explain a lot about the process, and the options. – Dustin Graham Mar 28 '12 at 18:49
  • Just to make sure the library is compatible with python backend.. – skoovill Mar 29 '12 at 05:28

5 Answers5

4

Since you are referring Autobahn.ws, let me briefly point out couple of things:

  • Real-time UI sync is a perfect fit for WebSocket, since WebSocket not only has very low downstream latency, but also very low upstream latency. In particular the latter is very hard / next to impossible using current workarounds like Comet, Ajax Push, you pick it ..
  • With WebSocket, you can achive Round-trip times between 200µs (LAN), 10ms (same city, couple of hops), 30ms (same country), 150-200ms (across the ocean), 80-100ms (3.5G same country) or 25ms (LTE, same country).
  • Though Autobahn.ws (the appliance) is commercial, the underlying tech (AutobahnPython, AutobahnJS, AutobahnAndroid, etc) is fully open-source
  • Autobahn.ws (the appliance), though commercial, will have a fully free version, that is limited in the number of concurrent WebSocket connections
  • The JS code for the UI sliders demo on our site is 50 lines. It's really trivial.
  • Autobahn supports a broad set of desktop and mobile browsers http://autobahn.ws/browsers

Disclaimer: I am author of Autobahn and work for Tavendo.

oberstet
  • 21,353
  • 10
  • 64
  • 97
3
  • sails.js is a new star on the MVC sky
  • Derby might be that what you are looking for. It uses Racer, "a realtime model synchronization engine for Node.js".
  • Meteor is another alternative.
  • More lower level (by using web sockets) is

A discussion regarding the comparison is at https://stackoverflow.com/questions/10374113/meteor-vs-derbyjs. A discussion comparing these three is going on at https://stackoverflow.com/questions/11857367/socketstream-vs-derbyjs-vs-meteor.

Only a hand-crafted web socket solution will be compatible with the Python backend. Since the question is asked more general, I also listed frameworks including a backend.

Community
  • 1
  • 1
koppor
  • 19,079
  • 15
  • 119
  • 161
1

Use Ape.

http://www.ape-project.org/

It is not going to build your UI for you. That is your job. There's no way around it. You architect your data for Push, and then you build your clients based on that data.

FlavorScape
  • 13,301
  • 12
  • 75
  • 117
  • thats fine. i will do the ui. thanks for the info. – skoovill Mar 29 '12 at 05:30
  • I found ape to inflexible and buggy to be usable in production-ready environments. See my answer for an alternative if you experience similar problems. – Alp Feb 25 '13 at 00:26
1

For real-time sync with UI, you can try HTML5 features. However it will not work in all browsers, I am posting this for your reference:

http://dev.w3.org/html5/websockets/

http://dev.w3.org/html5/eventsource/

GavinCattell
  • 3,863
  • 20
  • 22
littledev
  • 179
  • 3
  • 17
0

You will be interested in this answer: https://stackoverflow.com/a/10950702/675065

It's basically a wrap-up of how to use Websockets in Python. Software stack:

  1. SockJS (for clientside handling)
  2. Tornado (as sockjs server)
  3. Redis (for Pub/Sub)
Community
  • 1
  • 1
Alp
  • 29,274
  • 27
  • 120
  • 198