Re: [orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-24 Thread Luigi Dell'Aquila
Hi Anthony,

Probably we will implement this in the future, but for now you have to do
the query on the comments and then manually traverse the relationship.

Current LiveQuery implementation still needs some optimizations, query
de-duplication is one of these ;-)

Thanks

Luigi


2016-10-19 21:37 GMT+02:00 Anthony :

> I suppose it would be difficult to track changes on comment updates, as
 there are no links from comments to posts. What if using a Graph model,
 with edges (regular or lightweight) connecting posts to comments -- in that
 case, presumably it would be easier to register changes on any connected
 posts, no? Would that currently work, or is it something that might be
 added in the future?

>>>
>>> That's right, using edges you can do the live query on the comment and
>>> then fetch the post navigating the edge backwards. It already works.
>>>
>>
>> Got it. That's good to know. I was actually thinking of going in the
>> opposite direction, though. So, you have a live query on posts, with
>> bidirectional edges to comments. When a comment is changed, it would
>> somehow trigger a "change" event on the linked post, and the live query on
>> posts would therefore register a change. In RethinkDB, this would be
>> equivalent to a changefeed on a join (which RethinkDB does not actually yet
>> support, though it is/was planned sometime in the next release or two).
>>
>
> @Luigi, not sure if you saw my final comment above. I take it it doesn't
> work that way now, but would it be feasible/desirable to implement
> something like that?
>
> One additional question -- does OrientDB de-duplicate live queries (i.e.,
> if multiple live queries are made with the same requested query, does
> OrientDB recognize that and process only one version, sending the changes
> to all subscribers)?
>
> Thanks.
>
> Anthony
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

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


Re: [orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-19 Thread Anthony

>
> I suppose it would be difficult to track changes on comment updates, as 
>>> there are no links from comments to posts. What if using a Graph model, 
>>> with edges (regular or lightweight) connecting posts to comments -- in that 
>>> case, presumably it would be easier to register changes on any connected 
>>> posts, no? Would that currently work, or is it something that might be 
>>> added in the future?
>>>
>>
>> That's right, using edges you can do the live query on the comment and 
>> then fetch the post navigating the edge backwards. It already works.
>>
>
> Got it. That's good to know. I was actually thinking of going in the 
> opposite direction, though. So, you have a live query on posts, with 
> bidirectional edges to comments. When a comment is changed, it would 
> somehow trigger a "change" event on the linked post, and the live query on 
> posts would therefore register a change. In RethinkDB, this would be 
> equivalent to a changefeed on a join (which RethinkDB does not actually yet 
> support, though it is/was planned sometime in the next release or two).
>

@Luigi, not sure if you saw my final comment above. I take it it doesn't 
work that way now, but would it be feasible/desirable to implement 
something like that?

One additional question -- does OrientDB de-duplicate live queries (i.e., 
if multiple live queries are made with the same requested query, does 
OrientDB recognize that and process only one version, sending the changes 
to all subscribers)?

Thanks.

Anthony 

-- 

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


Re: [orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-13 Thread Anthony

>
>
>- More specifically, does LiveQuery work on queries involving 
>links? For example, suppose you have a query that retrieves a set of 
> blog 
>posts and their linked comments -- does the LiveQuery send a change 
>notification when a linked comment is inserted/updated/deleted in the 
>LINKLIST?
>
> The query mechanism is triggered by the change of the target object, 
>>> so the short answer is YES for insert/delete of elements in the linklist, 
>>> but NO for the update of the internal status of linked objects (eg. if you 
>>> change a comment's text)
>>>
>>
>> I suppose it would be difficult to track changes on comment updates, as 
>> there are no links from comments to posts. What if using a Graph model, 
>> with edges (regular or lightweight) connecting posts to comments -- in that 
>> case, presumably it would be easier to register changes on any connected 
>> posts, no? Would that currently work, or is it something that might be 
>> added in the future?
>>
>
> That's right, using edges you can do the live query on the comment and 
> then fetch the post navigating the edge backwards. It already works.
>

Got it. That's good to know. I was actually thinking of going in the 
opposite direction, though. So, you have a live query on posts, with 
bidirectional edges to comments. When a comment is changed, it would 
somehow trigger a "change" event on the linked post, and the live query on 
posts would therefore register a change. In RethinkDB, this would be 
equivalent to a changefeed on a join (which RethinkDB does not actually yet 
support, though it is/was planned sometime in the next release or two).

Anthony

-- 

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


Re: [orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-13 Thread Luigi Dell'Aquila
Hi Anthony,



2016-10-12 19:46 GMT+02:00 Anthony :

> @Luigi, thanks so much for your detailed response. Overall, these are
> encouraging comments. A few follow-up queries, if I may:
>
>>
- Are there any limitations on the types of queries with which
LiveQuery works? Can you put "LIVE" in front of any "SELECT" command and
get a working LiveQuery?

 Not actually, current LiveQuery implementation only supports
>> non-aggregate queries (eg. max() + GROUP BY) and does not allow ORDER BY.
>>
>
> Is support for aggregates and orderby (which presumably would have to be
> accompanied by a limit, as in RethinkDB) planned?
>

Yes, it's planned, but I cannot give you a specific ETA. I think it will be
in the 3.0 just because it's a new feature and 2.2.x is in hotfix process.

>
- More specifically, does LiveQuery work on queries involving
links? For example, suppose you have a query that retrieves a set of 
 blog
posts and their linked comments -- does the LiveQuery send a change
notification when a linked comment is inserted/updated/deleted in the
LINKLIST?

 The query mechanism is triggered by the change of the target object, so
>> the short answer is YES for insert/delete of elements in the linklist, but
>> NO for the update of the internal status of linked objects (eg. if you
>> change a comment's text)
>>
>
> I suppose it would be difficult to track changes on comment updates, as
> there are no links from comments to posts. What if using a Graph model,
> with edges (regular or lightweight) connecting posts to comments -- in that
> case, presumably it would be easier to register changes on any connected
> posts, no? Would that currently work, or is it something that might be
> added in the future?
>

That's right, using edges you can do the live query on the comment and then
fetch the post navigating the edge backwards. It already works.

>
- In RethinkDB, changefeeds involving orderby and limit can be
configured to send the old and new offset of each change (via the
include_offsets option) so you can easily insert the change into the 
 proper
place within the previously returned set of records. Is this possible 
 with
LiveQuery, or do you have to manage the ordering manually on the client?

 Not yet, but it's in our todo list
>>
>
> Just to clarify, are you saying it already supports orderby/limit, and 
> *providing
> the offsets* is on the todo list, or that you still need to add
> order/limit support (which will include an offset option)?
>
>

No, unfortunately it's all to be implemented. The LiveQuery result sends
back single records, so it just lacks the information about the position in
the sorted result. We have to do some little changes on that.


> Thanks.
>
> Anthony
>
>
Thanks

Luigi


> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to orient-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

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


Re: [orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-12 Thread Anthony
@Luigi, thanks so much for your detailed response. Overall, these are 
encouraging comments. A few follow-up queries, if I may: 

>
>>>- Are there any limitations on the types of queries with which 
>>>LiveQuery works? Can you put "LIVE" in front of any "SELECT" command and 
>>>get a working LiveQuery?
>>>
>>> Not actually, current LiveQuery implementation only supports 
> non-aggregate queries (eg. max() + GROUP BY) and does not allow ORDER BY.
>

Is support for aggregates and orderby (which presumably would have to be 
accompanied by a limit, as in RethinkDB) planned?

>
>>>- More specifically, does LiveQuery work on queries involving links? 
>>>For example, suppose you have a query that retrieves a set of blog posts 
>>>and their linked comments -- does the LiveQuery send a change 
>>> notification 
>>>when a linked comment is inserted/updated/deleted in the LINKLIST?
>>>
>>> The query mechanism is triggered by the change of the target object, so 
> the short answer is YES for insert/delete of elements in the linklist, but 
> NO for the update of the internal status of linked objects (eg. if you 
> change a comment's text)
>

I suppose it would be difficult to track changes on comment updates, as 
there are no links from comments to posts. What if using a Graph model, 
with edges (regular or lightweight) connecting posts to comments -- in that 
case, presumably it would be easier to register changes on any connected 
posts, no? Would that currently work, or is it something that might be 
added in the future?

>
>>>- In RethinkDB, changefeeds involving orderby and limit can be 
>>>configured to send the old and new offset of each change (via the 
>>>include_offsets option) so you can easily insert the change into the 
>>> proper 
>>>place within the previously returned set of records. Is this possible 
>>> with 
>>>LiveQuery, or do you have to manage the ordering manually on the client?
>>>
>>> Not yet, but it's in our todo list 
>

Just to clarify, are you saying it already supports orderby/limit, and 
*providing 
the offsets* is on the todo list, or that you still need to add order/limit 
support (which will include an offset option)?
 
Thanks.

Anthony

-- 

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


[orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-12 Thread Eric24
Hi @Luigi: Good to hear that you are planning ongoing improvements to 
LiveQuery. Among all of the other compelling features of OrientDB, this one 
is very relevant to us (and I think to an ever-increasing audience, as more 
and more applications are moving from polled or user-initiated updates to 
real-time updates).
--Eric

On Wednesday, October 12, 2016 at 3:42:36 AM UTC-5, scott molinari wrote:
>
> Great thread Anthony. Welcome to ODB!
>
> And thanks Luigi for the detailed answer. I learned a lot. 
>
> Scott
>

-- 

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


[orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-12 Thread 'scott molinari' via OrientDB
Great thread Anthony. Welcome to ODB!

And thanks Luigi for the detailed answer. I learned a lot. 

Scott

-- 

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


Re: [orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-12 Thread Luigi Dell'Aquila
Hi Anthony,

As Luca mentioned above, LiveQuery is a new feature, so it has some
limitations, but on the other hand you can expect important improvements in
the near future.
The fact that RethinkDB did not manage to survive as a company IMHO depends
on the business model, not on the product concepts and ideas.
We know that the reactive paradigm had a big upward trend and we strongly
believe that it will continue, so we are actively investing on LiveQuery.

Please find my specific answers below:


2016-10-12 6:39 GMT+02:00 Anthony :

> I should mention I am specifically interested in accessing OrientDB and
> LiveQuery via Node.js.
>
> Also, I'm just noticing that according to the docs, distributed support in
> Node.js is experimental and not recommended for production. Are there plans
> for full support soon, including load balancing? Are there other
> limitations within Node.js (e.g., are lightweight edges available)?
>
>
There are no specific limitations in terms of domain model. About
distributed load balancing, we already did some important steps forward on
this and we are working to improve it.


> Thank you.
>
> Anthony
>
>
> On Tuesday, October 11, 2016 at 5:47:04 PM UTC-4, Anthony wrote:
>>
>> Now that RethinkDB is shutting down, I have been looking at OrientDB,
>> particularly its LiveQuery feature. I am interested in the extent to which
>> LiveQuery is comparable to RethinkDB Changefeeds. In particular:
>>
>>- Are there any limitations on the types of queries with which
>>LiveQuery works? Can you put "LIVE" in front of any "SELECT" command and
>>get a working LiveQuery?
>>
>> Not actually, current LiveQuery implementation only supports
non-aggregate queries (eg. max() + GROUP BY) and does not allow ORDER BY.

>
>>- More specifically, does LiveQuery work on queries involving links?
>>For example, suppose you have a query that retrieves a set of blog posts
>>and their linked comments -- does the LiveQuery send a change notification
>>when a linked comment is inserted/updated/deleted in the LINKLIST?
>>
>> The query mechanism is triggered by the change of the target object, so
the short answer is YES for insert/delete of elements in the linklist, but
NO for the update of the internal status of linked objects (eg. if you
change a comment's text)



>>- In RethinkDB, changefeeds involving orderby and limit can be
>>configured to send the old and new offset of each change (via the
>>include_offsets option) so you can easily insert the change into the 
>> proper
>>place within the previously returned set of records. Is this possible with
>>LiveQuery, or do you have to manage the ordering manually on the client?
>>
>> Not yet, but it's in our todo list

>
>>- If you want the initial set of records followed by any subsequent
>>changes, do you have to issue an initial SELECT followed by a LIVE SELECT?
>>If so, is there any way to ensure you don't miss any changes between the
>>two (RethinkDB achieves this with its include_initial option).
>>
>> The best way is to do the live query before the normal SELECT and rely on
@version attribute to make sure that you have the last version when you mix
the results.

>
>>- Can OrientDB do filtering on the changes themselves? For example,
>>in RethinkDB, you can do:
>>
>>
>> r.table('test').changes().filter{ |row|
>>   row['new_val']['score'] > row['old_val']['score']
>> }
>>
>> The above changefeed will only return changes where the new score is
>> greater than the old score. Is this possible with live queries?
>>
>
Not yet, but it's in our todo list as well

>
>>- Does LiveQuery have anything similar to the RethinkDB "squash"
>>option, which can be set to squash a set of changes that happen within a
>>particular timespan into just a single change?
>>
>> Right now the behavior is the same as with the squash in RethinkDB, but
we are thinking about supporting the option.

>
>>- How scalable are live queries? If you have a web application with
>>tens or hundreds of thousands of connected users, each user with several 
>> of
>>their own unique live queries, will OrientDB be able to handle that. The
>>RethinkDB Horizon docs claim it is "designed to support millions of
>>realtime feeds" (with proper horizontal scaling of the database). Is
>>OrientDB in the same league? What kind of load would be realistic for a
>>single server, and is there any bottleneck that would inhibit horizontal
>>scaling to support more and more live queries?
>>
>> you should be able to handle thousands of active live queries on a
server, but it depends a lot on the query complexity and on the
record/resultset size.
You can expect improvements on this, as LiveQuery is a new component and
there is room for optimization.

>
>>- Any other notable differences from RethinkDB changefeeds?
>>
>> The only notable difference (apart from what I mentioned above) is that

[orientdb] Re: LiveQuery vs. RethinkDB Changefeeds

2016-10-11 Thread Anthony
I should mention I am specifically interested in accessing OrientDB and 
LiveQuery via Node.js.

Also, I'm just noticing that according to the docs, distributed support in 
Node.js is experimental and not recommended for production. Are there plans 
for full support soon, including load balancing? Are there other 
limitations within Node.js (e.g., are lightweight edges available)?

Thank you.

Anthony

On Tuesday, October 11, 2016 at 5:47:04 PM UTC-4, Anthony wrote:
>
> Now that RethinkDB is shutting down, I have been looking at OrientDB, 
> particularly its LiveQuery feature. I am interested in the extent to which 
> LiveQuery is comparable to RethinkDB Changefeeds. In particular:
>
>- Are there any limitations on the types of queries with which 
>LiveQuery works? Can you put "LIVE" in front of any "SELECT" command and 
>get a working LiveQuery?
>- More specifically, does LiveQuery work on queries involving links? 
>For example, suppose you have a query that retrieves a set of blog posts 
>and their linked comments -- does the LiveQuery send a change notification 
>when a linked comment is inserted/updated/deleted in the LINKLIST?
>- In RethinkDB, changefeeds involving orderby and limit can be 
>configured to send the old and new offset of each change (via the 
>include_offsets option) so you can easily insert the change into the 
> proper 
>place within the previously returned set of records. Is this possible with 
>LiveQuery, or do you have to manage the ordering manually on the client?
>- If you want the initial set of records followed by any subsequent 
>changes, do you have to issue an initial SELECT followed by a LIVE SELECT? 
>If so, is there any way to ensure you don't miss any changes between the 
>two (RethinkDB achieves this with its include_initial option).
>- Can OrientDB do filtering on the changes themselves? For example, in 
>RethinkDB, you can do:
>
>
> r.table('test').changes().filter{ |row|
>   row['new_val']['score'] > row['old_val']['score']
> }
>
> The above changefeed will only return changes where the new score is 
> greater than the old score. Is this possible with live queries?
>
>- Does LiveQuery have anything similar to the RethinkDB "squash" 
>option, which can be set to squash a set of changes that happen within a 
>particular timespan into just a single change?
>- How scalable are live queries? If you have a web application with 
>tens or hundreds of thousands of connected users, each user with several 
> of 
>their own unique live queries, will OrientDB be able to handle that. The 
>RethinkDB Horizon docs claim it is "designed to support millions of 
>realtime feeds" (with proper horizontal scaling of the database). Is 
>OrientDB in the same league? What kind of load would be realistic for a 
>single server, and is there any bottleneck that would inhibit horizontal 
>scaling to support more and more live queries?
>- Any other notable differences from RethinkDB changefeeds?
>
> More generally, what is OrientDB's commitment to developing and promoting 
> the LiveQuery feature? RethinkDB promotes its changefeeds as its primary 
> distinguishing feature ("The open-source database for the realtime web"). 
> However, it does not appear that LiveQuery is mentioned *anywhere *on the 
> marketing parts of the OrientDB website (except for a single year-old blog 
> post), and you have to dig fairly deep in the documentation to discover the 
> feature even exists. Is this feature a priority for OrientDB?
>
> Finally, given RethinkDB's recent fate, it would be nice to know more 
> about the health of OrientDB LTD. Is the company profitable and poised to 
> be around for a while?
>
> Thank you.
>
> Anthony
>

-- 

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