Check out what you can do with the new version of ShareJS!

133 views
Skip to first unread message

Joseph Gentle

unread,
May 9, 2013, 12:55:33 AM5/9/13
to sha...@googlegroups.com
ShareJS's awesome pro style rewrite is coming along. Live queries are
working now, and the document class has about a billion new features
(including multiple editing windows on a page working, but sadly not
including cursors yet).

Watch: http://www.youtube.com/watch?v=uDzME15UxVM

The branch is here:
https://github.com/josephg/sharejs/tree/rewrite
If you want to play with it, the API has changed a fair bit (and is
still in a state of flux). So your milage may vary, and you should
keep this code far, faaaar away from production. I'll document the API
changes closer to release.

Enjoy!
-Joseph

Collin Miller

unread,
May 9, 2013, 1:47:06 AM5/9/13
to sha...@googlegroups.com
Hot damn. Rather exciting work there on the queries.


-Joseph

--
You received this message because you are subscribed to the Google Groups "ShareJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharejs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



田传武

unread,
May 9, 2013, 2:32:49 AM5/9/13
to sha...@googlegroups.com
I am very curious about how to implement live queries, maybe the query result is a regular share document and should be persisted, right?
Can you outline some of the magic steps?


2013/5/9 Collin Miller <collin...@gmail.com>

Adrian Geană

unread,
May 9, 2013, 10:43:51 AM5/9/13
to sha...@googlegroups.com
Those live queries look neat. I'm curious on how it will scale on a large number of documents. 
I like the idea of using jsoneditor for JSON documents, but it would be great if changes are transformed to sub-document operations instead of full document replace operation. (I've noticed some p:[] ops in the console). 

Great work

Joseph Gentle

unread,
May 9, 2013, 11:48:52 AM5/9/13
to sha...@googlegroups.com


On May 9, 2013 7:43 AM, "Adrian Geană" <geana....@gmail.com> wrote:
>
> Those live queries look neat. I'm curious on how it will scale on a large number of documents. 

Me too, though there's a bunch of ways we can optimize it, at least for certain queries.

> I like the idea of using jsoneditor for JSON documents, but it would be great if changes are transformed to sub-document operations instead of full document replace operation. (I've noticed some p:[] ops in the console). 

:} yep I totally cheated. I need to make a few changes to jsoneditor to make it generate ops, but the old JSON api code is still a bit broken. Its on my list.

-J

> Great work
>
>
> On Thursday, May 9, 2013 7:55:33 AM UTC+3, Joseph Gentle wrote:
>>
>> ShareJS's awesome pro style rewrite is coming along. Live queries are
>> working now, and the document class has about a billion new features
>> (including multiple editing windows on a page working, but sadly not
>> including cursors yet).
>>
>> Watch: http://www.youtube.com/watch?v=uDzME15UxVM
>>
>> The branch is here:
>> https://github.com/josephg/sharejs/tree/rewrite
>> If you want to play with it, the API has changed a fair bit (and is
>> still in a state of flux). So your milage may vary, and you should
>> keep this code far, faaaar away from production. I'll document the API
>> changes closer to release.
>>
>> Enjoy!
>> -Joseph
>

Joseph Gentle

unread,
May 9, 2013, 11:54:46 AM5/9/13
to sha...@googlegroups.com

Its not a share document, and you don't want to persist it because you don't need to, and you don't want queries to show up in other queries.

Worst case, it reruns the query against the database when anything changes in the collection. But the server knows what op happened on what doc, so most queries can just be re-run against the particular doc that changed. By looking at the op itself, we can optimize for a bunch of standard cases as well (although limit queries will always have to hit the db I'm afraid)

I'm worried about how it'll scale, but its a good start.

-J

Vincent Woo

unread,
May 9, 2013, 2:19:46 PM5/9/13
to sha...@googlegroups.com
Do you have an ETA on metadata/cursor support? I await with baited breath.

Riley Dutton

unread,
May 16, 2013, 11:37:32 AM5/16/13
to sha...@googlegroups.com
What is the overall timeline do you think on the re-write? Is it a month or two from release or more like 6 months+?

Working on a new project and just curious if I should jump in or stick to ShareJS classic :-)

Joseph Gentle

unread,
May 16, 2013, 2:19:30 PM5/16/13
to sha...@googlegroups.com

It depends how much you care about reliability. It'll be in beta in a month or so (we're deploying it) though I want to do plenty of testing, debugging and optimization work before I consider it stable.

Use it for a toy, but not for anything production critical.

-J

--
Reply all
Reply to author
Forward
0 new messages