You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2021/10/25 12:17:00 UTC

[jira] [Closed] (TINKERPOP-2630) Clarify that a server cannot support Graphson1.0 over HTTP

     [ https://issues.apache.org/jira/browse/TINKERPOP-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Mallette closed TINKERPOP-2630.
---------------------------------------
    Fix Version/s: 3.5.2
                   3.4.13
                   3.6.0
         Assignee: Stephen Mallette
       Resolution: Done

The documentation for how to get 1.0 properly configured was mentioned way back in 3.3.0 upgrade docs when this change was first put in place:

https://tinkerpop.apache.org/docs/3.5.1/upgrade/#_changes_to_io

Considering that folk still seem to use 1.0 these days for http and find the current docs somewhat dated looking for GraphSON serialization configuration on the server, I've made some updates:

https://github.com/apache/tinkerpop/commit/7dccf9524ccb0d87fca3e46ee1b3b82110a42fae

Short story, you can configure both GraphSON 1.0 and 3.0 at the same time if you like. Serializer conflicts are resolved by the order in which they are parsed. So, the first serializer that binds to a particular mime type will be the one used. So if you put the 1.0 first it will grab "application/json" and be the default there.

> Clarify that a server cannot support Graphson1.0 over HTTP
> ----------------------------------------------------------
>
>                 Key: TINKERPOP-2630
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2630
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 3.4.12
>            Reporter: Divij Vaidya
>            Assignee: Stephen Mallette
>            Priority: Minor
>             Fix For: 3.6.0, 3.4.13, 3.5.2
>
>
> If a user sends an HTTP request to the server with MIME type for Graphson1.0 in the accept header, the server will always return an error, irrespective of the configured serializers. 
> This is because the only serializer which support MIME type `application/vnd.gremlin-v1.0+json` is `GraphSONMessageSerializerGremlinV1d0` and it will not work with HTTP requests because it's not a `MessageTextSerializer`
> We should clarify this somewhere in the docs. 
> Alternatively, we can support graphson v1.0 over HTTP by:
> 1. Register both `GraphSONMessageSerializerV1d0` and `GraphSONMessageSerializerGremlinV1d0` serializers with the server.
> 2. Add graphson v1.0 to supported mime types of `GraphSONMessageSerializerV1d0`
> 3. Change HttpEndpointHandler's chooseSerializer method to favour a MessageTextSerializer when two serializers are available for asme MIME type.
> Given that graphson 1.0 is on the path to deprecation, I would suggest that we just make a change to the documentation at this stage instead of alternative option.



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