My favorites | Sign in
Google
                
Search
for
Updated May 26, 2009 by neil.fraser
Labels: Phase-Deploy
Installation  
Getting started with MobWrite.

Introduction

Synchronization and automatic conflict resolution are hard problems. Most web applications are consciously or unconsciously designed to separate users from each other, thus minimizing the number of collisions. MobWrite allows web applications to seamlessly connect users to each other. Just build your web application for a single user, add two lines of JavaScript and some appropriate IDs to the form elements, and you're done.

Client-side

Add the following JavaScript:

<SCRIPT SRC="http://mobwrite3.appspot.com/static/compressed_form.js"></SCRIPT>`
<SCRIPT>
  mobwrite.syncGateway = 'http://mobwrite3.appspot.com/scripts/q.py';
</SCRIPT>
<BODY ONLOAD="mobwrite.share('formid');">

Detailed instructions.

Note that MobWrite has no authentication. That's the job of the host application. MobWrite is simply a sharing pipe that the host application uses to connect forms with each other. To keep unwanted users out and to prevent collisions, it is recommended to use form element IDs that are eight-character random strings. If all users of a form are to be globally connected (as in the demos), then one can just hard-code random IDs. If the users are to be broken into groups, with data only syncing between members of the group, then the IDs must be generated so that members of the group all have the same IDs.

Server-side

There are three ways to setup a server.

1: MobWrite service

MobWrite is running on Google App Engine as mobwrite3.appspot.com. If your loads are relatively light, you are welcome to use this service. In this case you don't need to do anything.

2: App Engine

The next heavier step is to create your own account on Google App Engine and upload your own copy of MobWrite. This also allows you to customize MobWrite if needed. Detailed instructions.

3: Python Daemon

For heavy loads (did you just max-out your Google App Engine account?) you can download the MobWrite code and set it up as a Python daemon running on your own web server. Detailed instructions.


Comment by DrShynu, Apr 08, 2008

hello. nice job!

Comment by saran.pol, Apr 10, 2008

Great Idea

Comment by hedgie, Apr 17, 2008

neat

Comment by ninetyni...@yahoo.com, Jun 28, 2008

interesting

Comment by lars.bestbrains, Jul 04, 2008

had difficulty getting my first small client-side-only sample to run, but solved it by setting

mobwrite.syncGateway='http://mobwrite2.appspot.com/scripts/q.py';
before the call to mobwrite.share(...)

Comment by Gabriel.Pettier, Jan 24, 2009

this is powerfull, great job!

Comment by zepinto, Mar 25, 2009

Can this be integrated with GWT interfaces?

Comment by neil.fraser, Mar 25, 2009

Zepinto: Yes, all it needs is the ID of a form element or a form. GWT, Ruby Rails, whatever, doesn't matter.

Comment by Rojazz1999, May 12, 2009

cool!!!

Comment by dean.clatworthy, Aug 14, 2009

Great demo. I'll have to consider how this could be used :)


Sign in to add a comment