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

stephen mallette commented on TINKERPOP3-912:
---------------------------------------------

{{ServerGremlinExecutor}} seems like it was an ill-conceived idea.  It really 
doesn't open up much opportunity to get a lot of re-use in the thread pools for 
embedding purposes because you can't use a generic pool - it is bound to Netty 
(if you don't bind to Netty you end up with extra pools!).  This might not 
actually have been ill-conceived actually - but perhaps incomplete.  It does 
provide a nice way to access the thread pools for re-use elsewhere if needed.  

I think that deprecating the {{GremlinServer}} constructor that takes the 
{{ServerGremlinExecutor}} is probably a good start to getting rid of the idea 
of pushing thread pools into Gremlin Server.  I can add a 
{{GremlinServer.getServerGremlinExecutor()}} for folks who want to access the 
thread pools for some reason.  That seems a far more useful capability that 
what this class is being used for now.

{{ServerGremlinExecutor}} can become the conduit for solving the 
{{Channelizer}} issue by making it so that an hosting class, could allow the 
embedder to provide a {{Supplier<Map>}} which could be called from a 
{{Channelizer}} (or classes instantiated from the {{Channelizer}}) from its 
{{init()}} method to provide it objects from the host.



> Improve the ability to embed Gremlin Server with Channelizer injection
> ----------------------------------------------------------------------
>
>                 Key: TINKERPOP3-912
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-912
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.0.2-incubating
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>             Fix For: 3.1.1-incubating
>
>
> The {{Channelizer}} for Gremlin Server is instantiated by reflection from 
> {{Settings}}.  The problem for those embedding Gremlin Server is that they 
> can't easily inject their own objects into custom {{Channelizer}} 
> implementations.  This typically means that sharing objects between the host 
> application and the Gremlin Server instantiated {{Channelizer}} is restricted 
> to static global variables which isn't so nice.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to