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

Stephen Mallette commented on TINKERPOP-2316:
---------------------------------------------

Hello - generally speaking we don't use JIRA for usage questions. These sorts 
of requests are best made on the gremlin-users mailing list or on 
Stackoverflow. As a quick answer to your question however, I don't believe that 
you should be constantly tearing the GremlinClient instance up and down. It 
should be re-used. If you can use the latest version of the driver you probably 
should however there is an issue with 3.4.4 and CosmosDB so if you use that 
graph system you might have problems with that version. Typically, you should 
use the version of the driver that matches the version of the server.

[~florianhockmann] anything to correct/add? anything be added to the 
documentation? 

> Best practices Gremlin client connection pool c#
> ------------------------------------------------
>
>                 Key: TINKERPOP-2316
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2316
>             Project: TinkerPop
>          Issue Type: Test
>          Components: build-release, documentation, dotnet, driver, server
>    Affects Versions: 3.4.0
>            Reporter: sabarish
>            Priority: Critical
>             Fix For: 3.4.4
>
>
> Hi, 
> I need a best practices to use the Gremlin Server, Client without any 
> connection issue. Now I am using germlin server to establish it in 
> constructor: 
> GremlinServer server = new GremlinServer(hostname, port, true, username, 
> password);
> where as I uses gremlin client on a separate method and calls on each query 
> execution. Meaning the gremlin client instance will be created each time on 
> SubmitQuery:
>  
> public ExecuteQuery(string query)
> {
> using (var client = new GremlinClient(server, new GraphSON2Reader(), new 
> GraphSON2Writer(), GremlinClient.GraphSON2MimeType))
>  {
> var task = client.SubmitAsync<dynamic>(query);
>  task.Wait();
> return task;
> } 
>  I want to know is we disposing & creating the Gremlin client each time? 
> And I am using Gremlin driver 3.4.0, should I need to upgrade to latest 
> version and why to update it? 
>  
> Please suggest the best practices to use the gremlin client & server. 



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

Reply via email to