I develop a JavaScript based collaborative “bulletin board / pin board” web application. One User can create “sticky notes / post its ” in his app instance in the web browser and shares them with other users like in this mockup: enter image description here Note1 is shared with user1 and user2, but note2 is shared with user1 and user3. This means if user2 opens his bulletin board web app instance, he can only load the note 1 that is shared with him or create his own notes that he can then share with other users.

I have the following requirements for my realtime framework:

  • Every note must be identifiable with an ID and it must be possible to assign users in read/write/owner roles to the note.

  • It must be possible to load a note into an app instance when the id is porvided, given that the user has the right to access this note, therefore the framework should provide an authentication mechanism.

  • The content of the note is a String that can be collaboratively modified by using Operational Transforms. If user1 changes the text all other users that have the note loaded get notified and update their view.

  • It would be good if I have one collaborative Document/(JSON)Object for every sticky note instance.

I started with Google Drive realtime API and this API does basically everything I want except: If I want that several notes ( in googles case they call them realtime documents ) exist in my app I need one HTTP connection for every realtime document instance that is present which I cannot accept because it is not scalable. If I use one realtime document for the whole app => I cannot share single notes in this realtime document with a subset of users because one whole realtime document is always shared with all collaborative users.

Then I tried ShareDB ( former ShareJS ) but this uses node libaries on the client side that I have to include using broserify and I can only use plain JavaScript and not a build tool that gives me a bundle.js as a result.

I also tired TogetherJS which I cannot use because it does not support the manual process of creating and loading realtime objects.

I tired firebase but figgured out that they do not support OT out of the box.

There is also swellrt which works similar to googles realtime API and it is possible to access several realtime objects using one websocket connection but it is in the alpha state and crashes very often.

My Question is if anyone knows another stable ( open source / proprietary ) realtime Framework that I can try next ?

up vote 2 down vote accepted

You have mentioned several of the popular toolkits out there. A little bit more information on some of the projects you listed. You may or may not know SwellRT is considering merging with Apache Wave. There is a lot of activity going on in that community right now. I believe one or more of the Swell RT contributors has become a Wave contributor. TogetherJS is not very active right now, with the last code commit almost a year ago, so that is some what risky to built on top of. Also I believe together JS works at the presentation layer rather than at the model layer. It sounds like you want to work at the data model layer.

There are a few examples of doing OT on top of Firebase, but in these cases you are really just using Firebase for distributing messages in the system, so that seems like a bit of overkill.

There are several other simple JS libraries for doing OT. One of them is ot.js. However with these you need to build quite a bit of infrastructure around your application. (e.g. you need to build your own server infrastructure, communications channels, user management, access control, etc.). Several of these frameworks also focus on plain / rich text editing only, which is not sufficient if you want the entire app to be collaborative.

Also, as soon as you start having collaborative notes, you probably need things like shared-cursors, and selections to allow people to type together without stomping all over each other. Many of the frameworks out there would leave this up to you to build, which is nearly impossible, since things like cursor positions are relative to the document. Meaning when I type, I may be changing your cursor position in my document. If the mechanisms for shared cursor and selections are not integrated into the shared data framework it becomes very difficult, if not impossible to build correctly. So I would add that to your requirements list.

(Full disclosure, I am a founder at Convergence Labs). Convergence is another framework that allows for rapid development of real time apps. It is typically used in a hosted model which allows you to inject collaboration quickly without a lot of set up. You have full control over the document model and can look documents / notes up by Id if that is how you want to structure your data. Convergence also support sharing cursors and selections. Might be worth taking a look.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.