[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2021-04-20 Thread Stephen Mallette (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17326060#comment-17326060
 ] 

Stephen Mallette commented on TINKERPOP-1886:
-

Fixed on TINKERPOP-2546

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Assignee: Stephen Mallette
>Priority: Major
> Fix For: 3.5.0
>
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2020-08-03 Thread Stephen Mallette (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170387#comment-17170387
 ] 

Stephen Mallette commented on TINKERPOP-1886:
-

i don't think "votes" is any representation of interest, but if you're moving 
on to other things, then that's cool. thanks for kicking some ideas around. 
perhaps they will inspire others.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2020-08-03 Thread Mark Br...e (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17170385#comment-17170385
 ] 

Mark Br...e commented on TINKERPOP-1886:


There's only one vote on this issue which makes me think there are more 
important problems.  As I have a new job starting in a few days I won't try and 
do what would be a fairly chunky refactoring at the same time.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2020-06-30 Thread Stephen Mallette (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148706#comment-17148706
 ] 

Stephen Mallette commented on TINKERPOP-1886:
-

Thanks for offering ideas here. The original design concept, as you noted, was 
to abstract Tornado, but I wonder if that ends up being useful these days. I've 
not really seen situations where that abstraction has yielded anything that 
folks have taken advantage of.  Personally, I think I'd be ok with that going 
away in favor of a more direct implementation. Since we no longer have to worry 
about Python 2.x on the master branch I think we're free to go to  "async and 
remove Tornado", but I'm not a Python expert so I suppose I'd look to those how 
are to say whether that is wise or not.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2020-06-30 Thread Mark Br...e (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17148613#comment-17148613
 ] 

Mark Br...e commented on TINKERPOP-1886:


I had a look at what would be needed to change gremlin-python to allow the 
built in websocket ping to work, i.e. having a long-running thread to own the 
IOLoop.  It'd be a significant restructuring, because as previously described 
the IOLoop is started & stopped for each request (and then again for the 
response) by whichever ThreadPoolExecutor thread happens to be handling the 
request. 

The current design does a pretty good job of abstracting Tornado so in theory 
something else could be plugged in (and I guess works with Python 2.7 and older 
versions of Tornado).  But it does use the IOLoop in a number of different 
threads which is perhaps against the spirit of IOLoop, although not the letter 
because the 
[docs|https://www.tornadoweb.org/en/branch5.1/ioloop.html#tornado.ioloop.IOLoop]
 say not to share them across _processes_.

We'd probably want to spawn a daemon thread to run a single IOLoop and use it 
for all the connections in the pool, while continuing to use ThreadPoolExecutor 
for the de/serialization.  Then we'd need to put 
[add_callback|https://www.tornadoweb.org/en/branch5.1/ioloop.html#tornado.ioloop.IOLoop.add_callback]
 calls in at the right places to make requests and responses happen.  I think 
this would tie the implementation more directly to Tornado.  Or, we could do it 
on 3.5 and just use native Python 3.7+ `async` and remove Tornado?  There might 
be a performance hit from extra context switching, as well.

This daemon thread wouldn't receive any CPU time in "serverless" environments 
like AWS Lambda so pings wouldn't work there, but otherwise making this change 
should get pings going.  If there's enough interest in terms of upvotes I may 
be able to have a stab at this.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2019-11-25 Thread Stephen Mallette (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16981484#comment-16981484
 ] 

Stephen Mallette commented on TINKERPOP-1886:
-

oh i see what you're saying. i've read that as an issue with the driver 
elsewhere i think and i never put those two things together. i wonder why it's 
implemented that way

anyway, thanks for explaining that. perhaps if we could improve the efficiency 
of the driver by re-using the loop we'd get the ping and better performance.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2019-11-24 Thread Gaurav Saini (Jira)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16981126#comment-16981126
 ] 

Gaurav Saini commented on TINKERPOP-1886:
-

[~spmallette], loop.run_sync executes the passed function and then it closes. 
The WebSocketClientConnection object which is returned by 
websocket.websocket_connect makes use of PeriodicCallback which in turn makes 
use of the IOLoop to schedule ping requests. Since your loop would close as 
soon as the WebSocketClientConnection object is returned, there are no pings 
scheduled.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2019-07-04 Thread stephen mallette (JIRA)


[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16878831#comment-16878831
 ] 

stephen mallette commented on TINKERPOP-1886:
-

Tried to implement the tornado ping.doesn't seem to work. Even 
stripped it down to it's most basic form and used a raw tornado websocket 
client directly and it wouldn't issue the pings. confirmed that the ping 
process was running:

{code}
from tornado import ioloop, websocket
loop = ioloop.IOLoop(make_current=False)
ws = loop.run_sync(lambda: 
websocket.websocket_connect("ws://localhost:8182/gremlin", ping_interval=0.3))
ws.protocol.ping_callback.is_running()
{code}

but it's almost like the ping function isn't getting called?! i can force a 
ping to be sent with {{ ws.protocol.write_ping(b'')}} so i know it works 
(Gremlin Server receives and it does return a pong) - it just won't get called 
in the background by tornado on an interval for some reason .  so weird. 

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2018-02-12 Thread stephen mallette (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360629#comment-16360629
 ] 

stephen mallette commented on TINKERPOP-1886:
-

i changed the priority and type as this issue does have a workaround - you can 
periodically send "do nothing" traversals/scripts to the server to keep the 
connection alive.

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python, server
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Major
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1886) Gremlin Python driver to periodically issue ping / heartbeat to gremlin server

2018-02-11 Thread Robert Dale (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16359909#comment-16359909
 ] 

Robert Dale commented on TINKERPOP-1886:


Looks like some versions of tornado have keep-alive - 
[http://www.tornadoweb.org/en/stable/_modules/tornado/websocket.html]

 

> Gremlin Python driver to periodically issue ping / heartbeat to gremlin server
> --
>
> Key: TINKERPOP-1886
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1886
> Project: TinkerPop
>  Issue Type: Bug
>  Components: python, server
>Affects Versions: 3.3.1
>Reporter: Harshvardhan
>Priority: Critical
>
> Gremlin Python driver currently  does not send any ping request to the 
> gremlin server. As a result, the websocket channel gets closed by the HAProxy 
> load balancer after a period of inactivity.
>  
> Workarounds have been suggested in the discussion listed below.
> Link to google groups discussion: 
> https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/gremlin-users/bMs3OUPlBQI/q3fYU-9BBAAJ



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)