
Mozilla Labs: TogetherJS - pie
https://togetherjs.com
======
gbadman
This is a really cool and ambitious project. Although some mention ShareJS, I
would say that the OT portion more closely resembles that employed by Firebase
in their Firepad project [1] (in that no centralized server manages ordering
and history). Actually, this system has many of the features of Firebase in a
self-hosted package.

As a user of ShareJS (for the real-time collaboration on Plunker [2]), I can
see some interesting benefits offered by TogetherJS; the system has cursor and
presence features out of the box.

That being said, the main drawback that I see in TogetherJS is that it seems
to be tightly coupled in a way that it is hard to take smaller parts of the
overall system. It would be great if the P2P network system could be extracted
and plugged into a node.js Stream interface. That would allow the code to plug
into a whole ecosystem of interesting libraries [3].

I'm really excited by all the powerful libraries that Mozilla has been pumping
out these days. The web is a great place to be.

[1] [https://github.com/firebase/firepad](https://github.com/firebase/firepad)

[2]
[http://plnkr.co/edit/?p=streamer&s=TogetherJS](http://plnkr.co/edit/?p=streamer&s=TogetherJS)
(Demo)

[3] [https://github.com/substack/stream-
handbook#introduction](https://github.com/substack/stream-
handbook#introduction)

~~~
meowface
Does anyone know of something like this, but for Markdown?

So, like a collaborative Markdown document editor, as well as a simple way to
store those documents and choose them for reading/editing later.

~~~
mburns
[https://github.com/JohnMcLear/ep_markdown](https://github.com/JohnMcLear/ep_markdown)

~~~
rspeer
Wait, that's backwards. The point of Markdown is that you type the formatting
quickly, instead of clicking buttons on a toolbar.

That animation seems to be about clicking buttons on a toolbar that will
secretly generate Markdown formatting for you.

------
jkeesh
This looks fantastic. I just have a question for the author (+ Mozilla). Since
this is a hosted service, I'm a bit reluctant to integrate it, because I'm not
sure what we should expect from Mozilla on this project. Is this a cool open
source project that will get support for a little and then fade away? Is this
something that a team is really behind and is going to continue to support and
extend? Is it expected that most people will just host their own version?
(doesnt seem that hard to do, but there is a lot of appeal in not managing the
server for this at all)

If this was from a startup I would expect a free trial and then a pricing page
that told me what happened if I had X # of users or Y # of requests, but
without that info, it seems there is a lot of missing information. Does
Mozilla just plan to keep it hosted indefinitely? Or how do you plan to handle
users of different sizes? Our use case now is small, but in choosing to go
with this tool (vs. Firebase or something else), the switching costs down the
road are relevant.

I'm planning to try it out in a small test either way, I'm just curious about
more details on the mozilla-hosted version.

~~~
davidascher
The server is fairly trivial. It's mostly there to make it easy to try. If you
want to host the server, go ahead (source is on github).

------
zamalek
I gave this a go with a "thick-client-in-browser" app that we are writing here
[1]. I had to hack the code a bit (e.g. remove the clickable class check in
the event simulator) but I was shocked how well it dealt with this scenario
and how little effort I had to put in.

It's still a long way off from supporting this type of web page (e.g. dragging
does not work, and would love to submit a PR if I only had the time to dig in
more); but the almost-instant success with it was impressive. Good work
Mozilla.

[1]
[http://www.k2.com/displaycontent.aspx?id=5502](http://www.k2.com/displaycontent.aspx?id=5502)
/ [http://www.formsondata.com/](http://www.formsondata.com/)

------
aroberge
This is fantastic. I put two lines of code in my site designed to teach
javascript programming
[http://reeborg.ca/learn_js_together.html](http://reeborg.ca/learn_js_together.html)
and it appears to just work (based on a quick test which is all I could do for
now). Well, except for a bug: when the robot finishes a program, a pop-up
window normally appears to indicate if the task was done properly ... and it
does not appear when TogetherJS is activated. To compare the version without,
just remove "_together" from the URL.

~~~
aroberge
Actually, after testing some more, it does not work. jqueryUI dialogs are
prevented to open (for one thing). And, since I change the url hash, it likely
messes with the changes introduced by togetherJS ... which, currently,
prevents it from working collaboratively. Still, neat idea - especially if I
can get it to work.

~~~
davidascher
Please file github issues, this is the feedback the project needs.

~~~
aroberge
Done.

------
gourneau
Was this previously know as towtruck?

~~~
edtechdev
yes:
[https://twitter.com/mozlabs/status/380847329437159424](https://twitter.com/mozlabs/status/380847329437159424)

wonder if they might to add some kind of drawing/annotation tools

~~~
zvin
You can try [http://eatponies.com](http://eatponies.com) for persistent
drawing with other people.

------
pjgomez
Another great project from Mozilla, congratulations. I'll definitely give it a
try.

Sorry to blow my own horn, but a few months ago we launched a similar project
called Quolony [https://quolony.com](https://quolony.com) (we are a small
startup from Salamanca, Spain). Right now we are working as a free service and
we plan to publish it as open-source in the next few months. People can use it
individually using a browser extension or in whole sites including our
library. We have avatars, synchronized text selection, private and public
chats, persistence, cobrowsing, file transfers and a lot more.

Some samples:
[https://quolony.com/demos/photomess/](https://quolony.com/demos/photomess/)
(drag and drop)
[https://quolony.com/demos/quolony/developers/](https://quolony.com/demos/quolony/developers/)
(shared demo)

At the low level, we extend the browser event model to make it easier to use
it in existing applications.

I hope you guys can give it a try and tell me what you think.

Kudos mozilla!

[EDITED: fixed linked]

~~~
sequoia
Tried to enter as "guest"

    
    
        exception 'Q\Exception' with message 'Invalid auth provider' in /data/quolony/1.1.beta.1785/code/lib/Quolony/q.core.php:2444
        Stack trace:
        #0 [internal function]: Q\{closure}(Object(Q\Exception))
        #1 {main}

~~~
amoreton
Still working to solve this, meanwhile you can enter as guest at
[https://quolony.com](https://quolony.com) and then visit
[https://quolony.com/demos/photomess/](https://quolony.com/demos/photomess/)
or
[https://quolony.com/demos/quolony/developers/](https://quolony.com/demos/quolony/developers/)

------
Sir_Cmpwn
I'm getting pretty tired of people releasing js libraries and not telling you
that they depend on jQuery. You don't just add that script to your page, you
add that script _and_ jQuery to your page. Stop assuming everyone already has
jQuery, guys.

~~~
davidascher
File a bug?

------
mbreese
Does this require using Mozilla's servers on the backend? I've played with
ShareJS and a commercial hosted OT service, but they all required talking to
the server.

So, I assume this does too, but I haven't seen where I could install it on my
server.

~~~
AndyEth
Look here: [https://togetherjs.com/docs/contributing.html#hosting-the-
hu...](https://togetherjs.com/docs/contributing.html#hosting-the-hub-server)

~~~
mbreese
_Note that we haven 't really "finished" the story around self-hosting, so the
details of this are likely to change._

That's exactly what I was looking for - Thanks! It looks like they still have
some documentation to fill out, but at least it's coming.

~~~
ianb
[Team member here] We haven't been very focused on the hosting story, in part
because lots of people have their own requirements, and we can't predict what
they are. And maybe because predicting what they are is boring. I know some
hooks for New Relic have been added to the server. It's also a super-simple
server that only keeps things in memory, so it's pretty darn easy to handle.
Just one file:
[https://github.com/mozilla/togetherjs/blob/develop/hub/serve...](https://github.com/mozilla/togetherjs/blob/develop/hub/server.js)
(and only one dependency, for WebSockets).

------
zerop
I want to implement a real time Collaboration editor like google docs because
I want to keep data on my own servers.. Can anyone suggest me architectural
points to build that...what should be stack on server side, how to send edit
diffs etc..

~~~
deliminator
Have a look at this: [http://substance.io/](http://substance.io/)

I'm working on something similar:
[https://wikidocs.com](https://wikidocs.com). Although our's closed source at
the moment (can't say whether or not it will remain closed), we will provide a
downloadable package you can run yourself.

------
sequoia
Looks cool! I wonder how you'd negotiate authentication with this... both
users logged in presumably, you could record edit author as whoever clicked
the save button (or upon each action in a "real time" saving application).

~~~
ianb
Both people are accessing the website as themselves. If one person doesn't
have permission to see a page, for instance, then they won't see it. And yeah,
whoever hits save is the saver ;) Doing something richer than that requires
application-specific integration, which we want to support, but we also want
to take cues from developers about what that should actually look like. This
is one idea we have along these lines:
[https://github.com/mozilla/togetherjs/issues/372](https://github.com/mozilla/togetherjs/issues/372)

------
dshipper
This is very similar to what we do at Firefly
([http://usefirefly.com](http://usefirefly.com)), except we support all the
way back to IE 8. Kudos to these guys for putting this together - especially
if it works well. It's a lot harder than it looks.

------
FiloSottile
It seems to me that this could be wrapped in a bookmarklet, to be able to use
it on any website, no?

~~~
AUmrysh
Here's a bookmarklet I threw together. You can go to the link given by someone
else and then click the bookmarklet to join their session. It messes up if you
change pages, though. Maybe there's a way to fix that.

Pretty interesting that it maps reactive UI elements like bootstrap divs which
resize properly!

<a href="javascript:( function(){ var%20s=document.createElement('script');
s.setAttribute('src','[https://togetherjs.com/togetherjs-
min.js');](https://togetherjs.com/togetherjs-min.js'\);)
document.getElementsByTagName('body')[0].appendChild(s);
setTimeout(function(){ TogetherJS(this); }, 100); })();">LINK</a>

------
mqzaidi
Looks like this would be great for customer support, and could be a nice
alternative to olark. It can be configured to automatically post the invite
url to another dashboard, where one of the CS execs can pick up and walk the
user through.

------
kimar
We recently built openmic.io to add sound annotation to pictures & websites.
This pops up just as we started looking into real-time collaboration. I guess
it validates the need for better in-context collaboration tools.

------
infocollector
Used to be called Tow Truck.

------
AUmrysh
Does anyone know how this would handle an iframe? Could this potentially be
'injected' into a page using bookmarklets?

edit: so, it doesn't handle iframes. Bookmarklets work but are buggy.

------
itsbits
Video and Audio chat functionality are real advantages over other collab
tools...awesome work...i will surely check this out some time..BTW is IE11
will be providing WebRTC support??

~~~
ianb
IE10 has WebSockets:
[http://caniuse.com/websockets](http://caniuse.com/websockets) – but
TogetherJS doesn't support IE10 either (simply haven't been able to keep up
testing with IE in addition to other browsers).

~~~
itsbits
i know about websockets..actually i was asking about Web RTC which was used
for Video and Audio chat here :)

~~~
ianb
Oh yeah... we use WebRTC when it's available, but don't require it.

------
smoothpooper
I could see it being used when creating support websites or customer care
related websites. Anyone else has any ideas on where else can this be
leveraged?

------
morgante
The content sync is the really impressive feature here. Basically drop-in
multiuser support.

------
jonny_eh
Seems quite similar to GoInstant.

------
6ren
NB: unrelated to TogetherJ

------
ilaksh
Seems similar to ShareJS

------
Kiro
Can someone give me a use case for this?

