Have you looked at using server-side functions:

http://orientdb.com/docs/last/Functions.html

you can write them in Java and they execute within the OrientDb server.

Also consider using hooks (even more performant) 
: http://orientdb.com/docs/last/Java-Hooks.html



On Monday, May 2, 2016 at 8:08:51 AM UTC+1, Jean-Sebastien Lemay wrote:
>
> If client-side filtering is the issue, then I have another problem. I'll 
> need to rewrite my entire back-end, and a lot of my operations have a lot 
> of conditions, which makes it almost impossible.
>
> For example, consider this operation: a user connects to a channel.
> 1) Register a new connection edge between user and channel
> 2) If number of connections between user and channel jumped from 0 to 1, 
> user is now part of channel. If so, create an active user edge between user 
> and channel as well.
> 3) If user became an active user and user is a moderator of the channel, 
> the channel is now considered live (channel vertex update)
> etc.
>
> A lot of 'IFs' which are better suited to Java code than SQL code.
>
> What would you suggest for this situation?
>
> Best regards,
> Jean
>
>
>
> On Monday, May 2, 2016 at 2:40:12 PM UTC+8, l.garulli wrote:
>>
>> Are you using remote protocol, right? In this case all your filtering is 
>> happening at client side paying a lot in terms of latency. 
>>
>> WDYT about executing a query/command that do all your job at server side?
>>
>> Start with this query executed in graph.command( new 
>> OCommandSQL("<query>") );
>>
>> SELECT friendship.confirmed, inV( friendship ) FROM
>>   SELECT out('social').outE('friend') as friendship FROM Account WHERE 
>> uuid = 'blablablablablablablablabla'
>> )
>>
>>
>> Best Regards,
>>
>> Luca Garulli
>> Founder & CEO
>> OrientDB <http://orientdb.com/>
>>
>>
>> On 30 April 2016 at 21:43, 'scott molinari' via OrientDB <
>> [email protected]> wrote:
>>
>>> Ok. Sounds like you are right about the profiles. I hope the ODB guys 
>>> can help. I think I pulled enough of the right information out of you, so 
>>> they can help. Sorry, I am not more help.
>>>
>>> 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 [email protected].
>>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to