You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/12/23 13:36:02 UTC

[17/23] tinkerpop git commit: TINKERPOP-1130 Get the basics of Gryo 3.0 in place.

TINKERPOP-1130 Get the basics of Gryo 3.0 in place.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/436b1fd5
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/436b1fd5
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/436b1fd5

Branch: refs/heads/TINKERPOP-1130
Commit: 436b1fd5142d7c427fda93a1723b281b5a191ad5
Parents: 7191f80
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 21 15:35:23 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Dec 23 07:47:35 2016 -0500

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   2 +
 docs/src/upgrade/release-3.3.x.asciidoc         |  10 +-
 .../gremlin/structure/io/gryo/GryoVersion.java  | 196 ++++++++++++-
 .../structure/io/gryo/kryoshim/InputShim.java   |   4 +-
 .../kryoshim/shaded/ShadedInputAdapter.java     |  13 +-
 .../ser/AbstractGryoMessageSerializerV3d0.java  | 278 +++++++++++++++++++
 .../ser/RequestMessageGryoSerializer.java       |  57 ++++
 .../ser/ResponseMessageGryoSerializer.java      |  67 +++++
 .../ser/GryoBaseMessageSerializerV1d0Test.java  |   2 +-
 gremlin-tools/gremlin-io-test/pom.xml           |  50 ++--
 .../tinkerpop/gremlin/structure/io/Model.java   |  37 ++-
 .../structure/io/gryo/GryoCompatibility.java    |   1 +
 .../io/AbstractTypedCompatibilityTest.java      | 195 +++++++------
 .../io/gryo/GryoCompatibilityTest.java          |   4 -
 .../_3_3_0/authenticationchallenge-v3d0.kryo    | Bin 0 -> 26 bytes
 .../_3_3_0/authenticationresponse-v3d0.kryo     |   1 +
 .../structure/io/gryo/_3_3_0/barrier-v3d0.kryo  |   1 +
 .../io/gryo/_3_3_0/bigdecimal-v3d0.kryo         | Bin 0 -> 18 bytes
 .../io/gryo/_3_3_0/biginteger-v3d0.kryo         |   1 +
 .../structure/io/gryo/_3_3_0/binding-v3d0.kryo  |   1 +
 .../structure/io/gryo/_3_3_0/byte-v3d0.kryo     |   1 +
 .../io/gryo/_3_3_0/bytebuffer-v1d0.kryo         | Bin 0 -> 23 bytes
 .../io/gryo/_3_3_0/bytebuffer-v3d0.kryo         | Bin 0 -> 5 bytes
 .../structure/io/gryo/_3_3_0/bytecode-v3d0.kryo | Bin 0 -> 43 bytes
 .../io/gryo/_3_3_0/cardinality-v3d0.kryo        |   1 +
 .../structure/io/gryo/_3_3_0/char-v3d0.kryo     | Bin 0 -> 2 bytes
 .../structure/io/gryo/_3_3_0/class-v1d0.kryo    |   1 +
 .../structure/io/gryo/_3_3_0/class-v3d0.kryo    |   1 +
 .../structure/io/gryo/_3_3_0/column-v3d0.kryo   |   1 +
 .../structure/io/gryo/_3_3_0/date-v3d0.kryo     |   1 +
 .../io/gryo/_3_3_0/direction-v3d0.kryo          |   1 +
 .../structure/io/gryo/_3_3_0/double-v3d0.kryo   | Bin 0 -> 8 bytes
 .../structure/io/gryo/_3_3_0/duration-v3d0.kryo | Bin 0 -> 9 bytes
 .../structure/io/gryo/_3_3_0/edge-v3d0.kryo     | Bin 0 -> 57 bytes
 .../structure/io/gryo/_3_3_0/float-v3d0.kryo    | Bin 0 -> 4 bytes
 .../io/gryo/_3_3_0/inetaddress-v1d0.kryo        |   1 +
 .../io/gryo/_3_3_0/inetaddress-v3d0.kryo        |   1 +
 .../structure/io/gryo/_3_3_0/instant-v3d0.kryo  | Bin 0 -> 13 bytes
 .../structure/io/gryo/_3_3_0/integer-v3d0.kryo  |   1 +
 .../structure/io/gryo/_3_3_0/lambda-v3d0.kryo   | Bin 0 -> 31 bytes
 .../io/gryo/_3_3_0/localdate-v3d0.kryo          | Bin 0 -> 9 bytes
 .../io/gryo/_3_3_0/localdatetime-v3d0.kryo      | Bin 0 -> 29 bytes
 .../io/gryo/_3_3_0/localtime-v3d0.kryo          | Bin 0 -> 9 bytes
 .../structure/io/gryo/_3_3_0/long-v3d0.kryo     |   1 +
 .../structure/io/gryo/_3_3_0/metrics-v3d0.kryo  | Bin 0 -> 187 bytes
 .../structure/io/gryo/_3_3_0/monthday-v3d0.kryo | Bin 0 -> 9 bytes
 .../io/gryo/_3_3_0/offsetdatetime-v3d0.kryo     | Bin 0 -> 37 bytes
 .../io/gryo/_3_3_0/offsettime-v3d0.kryo         | Bin 0 -> 17 bytes
 .../structure/io/gryo/_3_3_0/operator-v3d0.kryo |   1 +
 .../structure/io/gryo/_3_3_0/order-v3d0.kryo    |   1 +
 .../structure/io/gryo/_3_3_0/p-v3d0.kryo        | Bin 0 -> 6 bytes
 .../structure/io/gryo/_3_3_0/path-v3d0.kryo     | Bin 0 -> 50 bytes
 .../structure/io/gryo/_3_3_0/period-v3d0.kryo   | Bin 0 -> 13 bytes
 .../structure/io/gryo/_3_3_0/pick-v3d0.kryo     |   1 +
 .../structure/io/gryo/_3_3_0/pop-v3d0.kryo      |   1 +
 .../structure/io/gryo/_3_3_0/property-v3d0.kryo |   1 +
 .../structure/io/gryo/_3_3_0/scope-v3d0.kryo    |   1 +
 .../io/gryo/_3_3_0/sessionclose-v3d0.kryo       |   1 +
 .../io/gryo/_3_3_0/sessioneval-v3d0.kryo        |   1 +
 .../io/gryo/_3_3_0/sessionevalaliased-v3d0.kryo |   1 +
 .../io/gryo/_3_3_0/sessionlesseval-v3d0.kryo    |   1 +
 .../_3_3_0/sessionlessevalaliased-v3d0.kryo     |   1 +
 .../structure/io/gryo/_3_3_0/short-v3d0.kryo    | Bin 0 -> 2 bytes
 .../io/gryo/_3_3_0/standardresult-v3d0.kryo     | Bin 0 -> 230 bytes
 .../io/gryo/_3_3_0/stargraph-v3d0.kryo          | Bin 0 -> 247 bytes
 .../structure/io/gryo/_3_3_0/t-v3d0.kryo        |   1 +
 .../io/gryo/_3_3_0/timestamp-v1d0.kryo          |   1 +
 .../io/gryo/_3_3_0/timestamp-v3d0.kryo          |   1 +
 .../io/gryo/_3_3_0/traversalmetrics-v3d0.kryo   | Bin 0 -> 294 bytes
 .../io/gryo/_3_3_0/traverser-v3d0.kryo          | Bin 0 -> 211 bytes
 .../structure/io/gryo/_3_3_0/tree-v3d0.kryo     | Bin 0 -> 762 bytes
 .../structure/io/gryo/_3_3_0/uuid-v3d0.kryo     |   1 +
 .../structure/io/gryo/_3_3_0/vertex-v3d0.kryo   | Bin 0 -> 202 bytes
 .../io/gryo/_3_3_0/vertexproperty-v3d0.kryo     | Bin 0 -> 18 bytes
 .../structure/io/gryo/_3_3_0/year-v3d0.kryo     | Bin 0 -> 5 bytes
 .../io/gryo/_3_3_0/yearmonth-v3d0.kryo          | Bin 0 -> 9 bytes
 .../io/gryo/_3_3_0/zoneddatetime-v3d0.kryo      | Bin 0 -> 38 bytes
 .../io/gryo/_3_3_0/zoneoffset-v3d0.kryo         |   1 +
 .../TinkerGraphGraphSONSerializerV2d0Test.java  |   2 +-
 79 files changed, 798 insertions(+), 151 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d3d88e6..e4e178a 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -36,6 +36,8 @@ TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 * Moved `NumberHelper` into the `org.apache.tinkerpop.gremlin.util` package.
 * Added `Pop.mixed` instead of using `null` to represent such semantics.
 * `select()`-step now defaults to using `Pop.last` instead of `Pop.mixed`.
+* Added `gremlin-io-test` module to validate IO formats.
+* `RequestMessage` and `ResponseMessage` are now registered with `GryoMapper` as part of the TinkerPop range of type identifiers.
 * Removed previously deprecated `Console` constructor that took a `String` as an argument from `gremlin-console`.
 * Removed previously deprecated `ConcurrentBindings` from `gremlin-groovy`.
 * Removed previously deprecated `ScriptExecutor` from `gremlin-groovy`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index 542ff89..f596d76 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -40,9 +40,17 @@ intermediate method for flattening `Object[]` arguments and thus, yielding a non
 and `Bytecode`. This has been remedied. Most users will not notice this change. Perhaps only some users that may use
 Java reflection over `GraphTraversal` might have a simple problem.
 
-
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1520[TINKERPOP-1520]
 
+Changes to IO
+^^^^^^^^^^^^^
+
+*WILL NEED TO WRITE SOMETHING MORE COHESIVE HERE - JUST LISTING STUFF FOR RIGHT NOW*
+
+* Gryo incompatibilities with 3.2.x:
+** `RequestMessage`
+** `ResponseMessage`
+
 SelectStep Defaults to Pop.last
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
index 7e617ea..26ea1d0 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
@@ -100,6 +100,7 @@ import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertex;
 import org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertexProperty;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraphSerializer;
+import org.apache.tinkerpop.gremlin.util.function.FunctionUtils;
 import org.apache.tinkerpop.gremlin.util.function.HashSetSupplier;
 import org.apache.tinkerpop.gremlin.util.function.Lambda;
 import org.apache.tinkerpop.shaded.kryo.KryoSerializable;
@@ -140,6 +141,7 @@ import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
+import java.util.Optional;
 import java.util.TimeZone;
 import java.util.TreeMap;
 import java.util.TreeSet;
@@ -150,7 +152,8 @@ import java.util.concurrent.atomic.AtomicLong;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public enum GryoVersion {
-    V1_0("1.0", initV1d0Registrations());
+    V1_0("1.0", initV1d0Registrations()),
+    V3_0("3.0", initV3d0Registrations());
 
     private final String versionNumber;
     private final List<TypeRegistration<?>> registrations;
@@ -186,6 +189,178 @@ public enum GryoVersion {
         return versionNumber;
     }
 
+    public static List<TypeRegistration<?>> initV3d0Registrations() {
+        return new ArrayList<TypeRegistration<?>>() {{
+            add(GryoTypeReg.of(byte[].class, 25));
+            add(GryoTypeReg.of(char[].class, 26));
+            add(GryoTypeReg.of(short[].class, 27));
+            add(GryoTypeReg.of(int[].class, 28));
+            add(GryoTypeReg.of(long[].class, 29));
+            add(GryoTypeReg.of(float[].class, 30));
+            add(GryoTypeReg.of(double[].class, 31));
+            add(GryoTypeReg.of(String[].class, 32));
+            add(GryoTypeReg.of(Object[].class, 33));
+            add(GryoTypeReg.of(ArrayList.class, 10));
+            add(GryoTypeReg.of(Types.ARRAYS_AS_LIST, 134, new UtilSerializers.ArraysAsListSerializer()));
+            add(GryoTypeReg.of(BigInteger.class, 34));
+            add(GryoTypeReg.of(BigDecimal.class, 35));
+            add(GryoTypeReg.of(Calendar.class, 39));
+            add(GryoTypeReg.of(Class.class, 41, new UtilSerializers.ClassSerializer()));
+            add(GryoTypeReg.of(Collection.class, 37));
+            add(GryoTypeReg.of(Collections.EMPTY_LIST.getClass(), 51));
+            add(GryoTypeReg.of(Collections.EMPTY_MAP.getClass(), 52));
+            add(GryoTypeReg.of(Collections.EMPTY_SET.getClass(), 53));
+            add(GryoTypeReg.of(Collections.singleton(null).getClass(), 54));
+            add(GryoTypeReg.of(Collections.singletonList(null).getClass(), 24));
+            add(GryoTypeReg.of(Collections.singletonMap(null, null).getClass(), 23));
+            add(GryoTypeReg.of(Contains.class, 49));
+            add(GryoTypeReg.of(Currency.class, 40));
+            add(GryoTypeReg.of(Date.class, 38));
+            add(GryoTypeReg.of(Direction.class, 12));
+            add(GryoTypeReg.of(DetachedEdge.class, 21));
+            add(GryoTypeReg.of(DetachedVertexProperty.class, 20));
+            add(GryoTypeReg.of(DetachedProperty.class, 18));
+            add(GryoTypeReg.of(DetachedVertex.class, 19));
+            add(GryoTypeReg.of(DetachedPath.class, 60));
+            // skip 14
+            add(GryoTypeReg.of(EnumSet.class, 46));
+            add(GryoTypeReg.of(HashMap.class, 11));
+            add(GryoTypeReg.of(HashMap.Entry.class, 16));
+            add(GryoTypeReg.of(Types.HASH_MAP_NODE, 92));
+            add(GryoTypeReg.of(KryoSerializable.class, 36));
+            add(GryoTypeReg.of(LinkedHashMap.class, 47));
+            add(GryoTypeReg.of(LinkedHashSet.class, 71));
+            add(GryoTypeReg.of(LinkedList.class, 116));
+            add(GryoTypeReg.of(Types.LINKED_HASH_MAP_ENTRY_CLASS, 15));
+            add(GryoTypeReg.of(Locale.class, 22));
+            add(GryoTypeReg.of(StringBuffer.class, 43));
+            add(GryoTypeReg.of(StringBuilder.class, 44));
+            add(GryoTypeReg.of(T.class, 48));
+            add(GryoTypeReg.of(TimeZone.class, 42));
+            add(GryoTypeReg.of(TreeMap.class, 45));
+            add(GryoTypeReg.of(TreeSet.class, 50));
+            add(GryoTypeReg.of(UUID.class, 17, new UtilSerializers.UUIDSerializer()));
+            add(GryoTypeReg.of(URI.class, 72, new UtilSerializers.URISerializer()));
+            add(GryoTypeReg.of(VertexTerminator.class, 13));
+            add(GryoTypeReg.of(AbstractMap.SimpleEntry.class, 120));
+            add(GryoTypeReg.of(AbstractMap.SimpleImmutableEntry.class, 121));
+            add(GryoTypeReg.of(java.sql.Timestamp.class, 161));
+            add(GryoTypeReg.of(InetAddress.class, 162, new UtilSerializers.InetAddressSerializer()));
+            add(GryoTypeReg.of(ByteBuffer.class, 163, new UtilSerializers.ByteBufferSerializer()));
+
+            add(GryoTypeReg.of(ReferenceEdge.class, 81));
+            add(GryoTypeReg.of(ReferenceVertexProperty.class, 82));
+            add(GryoTypeReg.of(ReferenceProperty.class, 83));
+            add(GryoTypeReg.of(ReferenceVertex.class, 84));
+            add(GryoTypeReg.of(ReferencePath.class, 85));
+
+            add(GryoTypeReg.of(StarGraph.class, 86, new StarGraphSerializer(Direction.BOTH, new GraphFilter())));
+
+            add(GryoTypeReg.of(Edge.class, 65, new GryoSerializers.EdgeSerializer()));
+            add(GryoTypeReg.of(Vertex.class, 66, new GryoSerializers.VertexSerializer()));
+            add(GryoTypeReg.of(Property.class, 67, new GryoSerializers.PropertySerializer()));
+            add(GryoTypeReg.of(VertexProperty.class, 68, new GryoSerializers.VertexPropertySerializer()));
+            add(GryoTypeReg.of(Path.class, 59, new GryoSerializers.PathSerializer()));
+            // skip 55
+            add(GryoTypeReg.of(B_O_Traverser.class, 75));
+            add(GryoTypeReg.of(O_Traverser.class, 76));
+            add(GryoTypeReg.of(B_LP_O_P_S_SE_SL_Traverser.class, 77));
+            add(GryoTypeReg.of(B_O_S_SE_SL_Traverser.class, 78));
+            add(GryoTypeReg.of(B_LP_O_S_SE_SL_Traverser.class, 87));
+            add(GryoTypeReg.of(O_OB_S_SE_SL_Traverser.class, 89));
+            add(GryoTypeReg.of(LP_O_OB_S_SE_SL_Traverser.class, 90));
+            add(GryoTypeReg.of(LP_O_OB_P_S_SE_SL_Traverser.class, 91));
+            add(GryoTypeReg.of(DefaultRemoteTraverser.class, 123, new GryoSerializers.DefaultRemoteTraverserSerializer()));
+
+            add(GryoTypeReg.of(Bytecode.class, 122, new GryoSerializers.BytecodeSerializer()));
+            add(GryoTypeReg.of(P.class, 124, new GryoSerializers.PSerializer()));
+            add(GryoTypeReg.of(Lambda.class, 125, new GryoSerializers.LambdaSerializer()));
+            add(GryoTypeReg.of(Bytecode.Binding.class, 126, new GryoSerializers.BindingSerializer()));
+            add(GryoTypeReg.of(Order.class, 127));
+            add(GryoTypeReg.of(Scope.class, 128));
+            add(GryoTypeReg.of(AndP.class, 129, new GryoSerializers.AndPSerializer()));
+            add(GryoTypeReg.of(OrP.class, 130, new GryoSerializers.OrPSerializer()));
+            add(GryoTypeReg.of(VertexProperty.Cardinality.class, 131));
+            add(GryoTypeReg.of(Column.class, 132));
+            add(GryoTypeReg.of(Pop.class, 133));
+            add(GryoTypeReg.of(SackFunctions.Barrier.class, 135));
+            add(GryoTypeReg.of(TraversalOptionParent.Pick.class, 137));
+            add(GryoTypeReg.of(HashSetSupplier.class, 136, new UtilSerializers.HashSetSupplierSerializer()));
+
+            add(GryoTypeReg.of(ConnectiveStrategy.class, 138));
+            add(GryoTypeReg.of(HaltedTraverserStrategy.class, 139));
+            add(GryoTypeReg.of(PartitionStrategy.class, 140, new JavaSerializer()));
+            add(GryoTypeReg.of(SubgraphStrategy.class, 141, new JavaSerializer()));
+            add(GryoTypeReg.of(VertexProgramStrategy.class, 142, new JavaSerializer()));
+            add(GryoTypeReg.of(MatchAlgorithmStrategy.class, 143));
+            add(GryoTypeReg.of(MatchStep.GreedyMatchAlgorithm.class, 144));
+            add(GryoTypeReg.of(AdjacentToIncidentStrategy.class, 145));
+            add(GryoTypeReg.of(FilterRankingStrategy.class, 146));
+            add(GryoTypeReg.of(IdentityRemovalStrategy.class, 147));
+            add(GryoTypeReg.of(IncidentToAdjacentStrategy.class, 148));
+            add(GryoTypeReg.of(InlineFilterStrategy.class, 149));
+            add(GryoTypeReg.of(LazyBarrierStrategy.class, 150));
+            add(GryoTypeReg.of(MatchPredicateStrategy.class, 151));
+            add(GryoTypeReg.of(OrderLimitStrategy.class, 152));
+            add(GryoTypeReg.of(PathProcessorStrategy.class, 153));
+            add(GryoTypeReg.of(PathRetractionStrategy.class, 154));
+            add(GryoTypeReg.of(RangeByIsCountStrategy.class, 155));
+            add(GryoTypeReg.of(RepeatUnrollStrategy.class, 156));
+            add(GryoTypeReg.of(GraphFilterStrategy.class, 157));
+            add(GryoTypeReg.of(LambdaRestrictionStrategy.class, 158));
+            add(GryoTypeReg.of(ReadOnlyStrategy.class, 159));
+            add(GryoTypeReg.of(MatchStep.CountMatchAlgorithm.class, 160));
+            add(GryoTypeReg.of(MatchStep.GreedyMatchAlgorithm.class, 164));
+
+            add(GryoTypeReg.of(TraverserSet.class, 58));
+            add(GryoTypeReg.of(Tree.class, 61));
+            add(GryoTypeReg.of(HashSet.class, 62));
+            add(GryoTypeReg.of(BulkSet.class, 64));
+            add(GryoTypeReg.of(MutableMetrics.class, 69));
+            add(GryoTypeReg.of(ImmutableMetrics.class, 115));
+            add(GryoTypeReg.of(DefaultTraversalMetrics.class, 70));
+            add(GryoTypeReg.of(MapMemory.class, 73));
+            add(GryoTypeReg.of(MapReduce.NullObject.class, 74));
+            add(GryoTypeReg.of(AtomicLong.class, 79));
+            add(GryoTypeReg.of(Pair.class, 88, new UtilSerializers.PairSerializer()));
+            add(GryoTypeReg.of(TraversalExplanation.class, 106, new JavaSerializer()));
+
+            add(GryoTypeReg.of(Duration.class, 93, new JavaTimeSerializers.DurationSerializer()));
+            add(GryoTypeReg.of(Instant.class, 94, new JavaTimeSerializers.InstantSerializer()));
+            add(GryoTypeReg.of(LocalDate.class, 95, new JavaTimeSerializers.LocalDateSerializer()));
+            add(GryoTypeReg.of(LocalDateTime.class, 96, new JavaTimeSerializers.LocalDateTimeSerializer()));
+            add(GryoTypeReg.of(LocalTime.class, 97, new JavaTimeSerializers.LocalTimeSerializer()));
+            add(GryoTypeReg.of(MonthDay.class, 98, new JavaTimeSerializers.MonthDaySerializer()));
+            add(GryoTypeReg.of(OffsetDateTime.class, 99, new JavaTimeSerializers.OffsetDateTimeSerializer()));
+            add(GryoTypeReg.of(OffsetTime.class, 100, new JavaTimeSerializers.OffsetTimeSerializer()));
+            add(GryoTypeReg.of(Period.class, 101, new JavaTimeSerializers.PeriodSerializer()));
+            add(GryoTypeReg.of(Year.class, 102, new JavaTimeSerializers.YearSerializer()));
+            add(GryoTypeReg.of(YearMonth.class, 103, new JavaTimeSerializers.YearMonthSerializer()));
+            add(GryoTypeReg.of(ZonedDateTime.class, 104, new JavaTimeSerializers.ZonedDateTimeSerializer()));
+            add(GryoTypeReg.of(ZoneOffset.class, 105, new JavaTimeSerializers.ZoneOffsetSerializer()));
+
+            add(GryoTypeReg.of(Operator.class, 107));
+            add(GryoTypeReg.of(FoldStep.FoldBiOperator.class, 108));
+            add(GryoTypeReg.of(GroupCountStep.GroupCountBiOperator.class, 109));
+            add(GryoTypeReg.of(GroupStep.GroupBiOperator.class, 117, new JavaSerializer())); // because they contain traversals
+            add(GryoTypeReg.of(MeanGlobalStep.MeanGlobalBiOperator.class, 110));
+            add(GryoTypeReg.of(MeanGlobalStep.MeanNumber.class, 111));
+            add(GryoTypeReg.of(TreeStep.TreeBiOperator.class, 112));
+            add(GryoTypeReg.of(GroupStepV3d0.GroupBiOperatorV3d0.class, 113));
+            add(GryoTypeReg.of(RangeGlobalStep.RangeBiOperator.class, 114));
+            add(GryoTypeReg.of(OrderGlobalStep.OrderBiOperator.class, 118, new JavaSerializer())); // because they contain traversals
+            add(GryoTypeReg.of(ProfileStep.ProfileBiOperator.class, 119));
+
+            // placeholder serializers for classes that don't live here in core. this will allow them to be used if
+            // present  or ignored if the class isn't available. either way the registration numbers are held as
+            // placeholders so that the format stays stable
+            tryAddDynamicType(this, "org.apache.tinkerpop.gremlin.driver.message.RequestMessage",
+                    "org.apache.tinkerpop.gremlin.driver.ser.RequestMessageGryoSerializer", 165);
+            tryAddDynamicType(this, "org.apache.tinkerpop.gremlin.driver.message.ResponseMessage",
+                    "org.apache.tinkerpop.gremlin.driver.ser.ResponseMessageGryoSerializer", 166);  // ### LAST_ID
+        }};
+    }
+
     public static List<TypeRegistration<?>> initV1d0Registrations() {
         return new ArrayList<TypeRegistration<?>>() {{
             add(GryoTypeReg.of(byte[].class, 25));
@@ -348,6 +523,23 @@ public enum GryoVersion {
         }};
     }
 
+    private static void tryAddDynamicType(final List<TypeRegistration<?>> types, final String type,
+                                            final String serializer, final int registrationId) {
+        try {
+            final Class typeClass = Class.forName(type);
+            final Optional<SerializerShim<?>> serializerInstance = Optional.of(serializer)
+                    .map(FunctionUtils.wrapFunction(Class::forName))
+                    .map(FunctionUtils.wrapFunction(c -> (SerializerShim<?>) c.getConstructor().newInstance()));
+            if (serializerInstance.isPresent()) {
+                types.add(GryoTypeReg.of(typeClass, registrationId, serializerInstance.get()));
+            } else {
+                types.add(GryoTypeReg.of(typeClass, registrationId));
+            }
+        } catch (Exception ignored) {
+            // if the class isn't here - no worries
+        }
+    }
+
     private static final class Types {
         /**
          * Map with one entry that is used so that it is possible to get the class of LinkedHashMap.Entry.
@@ -375,5 +567,7 @@ public enum GryoVersion {
                 throw new RuntimeException("Could not access " + className, ex);
             }
         }
+
+        private Types() {}
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/InputShim.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/InputShim.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/InputShim.java
index 246fc7f..d6ba06d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/InputShim.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/InputShim.java
@@ -30,11 +30,11 @@ public interface InputShim {
 
     public String readString();
 
+    public short readShort();
+
     public long readLong();
 
     public int readInt();
 
-    public short readShort();
-
     public double readDouble();
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/shaded/ShadedInputAdapter.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/shaded/ShadedInputAdapter.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/shaded/ShadedInputAdapter.java
index 0647e0b..22a45ee 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/shaded/ShadedInputAdapter.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/kryoshim/shaded/ShadedInputAdapter.java
@@ -34,8 +34,12 @@ public class ShadedInputAdapter implements InputShim {
     }
 
     @Override
-    public byte readByte()
-    {
+    public short readShort() {
+        return shadedInput.readShort();
+    }
+
+    @Override
+    public byte readByte() {
         return shadedInput.readByte();
     }
 
@@ -60,11 +64,6 @@ public class ShadedInputAdapter implements InputShim {
     }
 
     @Override
-    public short readShort() {
-        return shadedInput.readShort();
-    }
-
-    @Override
     public double readDouble() {
         return shadedInput.readDouble();
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV3d0.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV3d0.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV3d0.java
new file mode 100644
index 0000000..36c9a11
--- /dev/null
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGryoMessageSerializerV3d0.java
@@ -0,0 +1,278 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.ser;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.ByteBufAllocator;
+import io.netty.util.ReferenceCountUtil;
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
+import org.apache.tinkerpop.shaded.kryo.ClassResolver;
+import org.apache.tinkerpop.shaded.kryo.Kryo;
+import org.apache.tinkerpop.shaded.kryo.Serializer;
+import org.apache.tinkerpop.shaded.kryo.io.Input;
+import org.apache.tinkerpop.shaded.kryo.io.Output;
+
+import java.io.ByteArrayOutputStream;
+import java.lang.reflect.Method;
+import java.nio.charset.Charset;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public abstract class AbstractGryoMessageSerializerV3d0 extends AbstractMessageSerializer {
+    private GryoMapper gryoMapper;
+    private ThreadLocal<Kryo> kryoThreadLocal = new ThreadLocal<Kryo>() {
+        @Override
+        protected Kryo initialValue() {
+            return gryoMapper.createMapper();
+        }
+    };
+
+    private static final Charset UTF8 = Charset.forName("UTF-8");
+
+    public static final String TOKEN_CUSTOM = "custom";
+    public static final String TOKEN_SERIALIZE_RESULT_TO_STRING = "serializeResultToString";
+    public static final String TOKEN_USE_MAPPER_FROM_GRAPH = "useMapperFromGraph";
+    public static final String TOKEN_BUFFER_SIZE = "bufferSize";
+    public static final String TOKEN_CLASS_RESOLVER_SUPPLIER = "classResolverSupplier";
+
+    protected boolean serializeToString = false;
+    private int bufferSize = 4096;
+
+    /**
+     * Creates an instance with a provided mapper configured {@link GryoMapper} instance. Note that this instance
+     * will be overridden by {@link #configure} is called.
+     */
+    public AbstractGryoMessageSerializerV3d0(final GryoMapper kryo) {
+        this.gryoMapper = kryo;
+    }
+
+    /**
+     * Called from the {@link #configure(Map, Map)} method right before the call to create the builder. Sub-classes
+     * can choose to alter the builder or completely replace it.
+     */
+    GryoMapper.Builder configureBuilder(final GryoMapper.Builder builder, final Map<String, Object> config,
+                                        final Map<String, Graph> graphs) {
+        return builder;
+    }
+
+    @Override
+    public final void configure(final Map<String, Object> config, final Map<String, Graph> graphs) {
+        final GryoMapper.Builder builder;
+        final Object graphToUseForMapper = config.get(TOKEN_USE_MAPPER_FROM_GRAPH);
+        if (graphToUseForMapper != null) {
+            if (null == graphs) throw new IllegalStateException(String.format(
+                    "No graphs have been provided to the serializer and therefore %s is not a valid configuration", TOKEN_USE_MAPPER_FROM_GRAPH));
+
+            final Graph g = graphs.get(graphToUseForMapper.toString());
+            if (null == g) throw new IllegalStateException(String.format(
+                    "There is no graph named [%s] configured to be used in the %s setting",
+                    graphToUseForMapper, TOKEN_USE_MAPPER_FROM_GRAPH));
+
+            // a graph was found so use the mapper it constructs.  this allows gryo to be auto-configured with any
+            // custom classes that the implementation allows for
+            builder = g.io(GryoIo.build()).mapper();
+        } else {
+            // no graph was supplied so just use the default - this will likely be the case when using a graph
+            // with no custom classes or a situation where the user needs complete control like when using two
+            // distinct implementations each with their own custom classes.
+            builder = GryoMapper.build();
+        }
+
+        addIoRegistries(config, builder);
+        addClassResolverSupplier(config, builder);
+        addCustomClasses(config, builder);
+
+        this.serializeToString = Boolean.parseBoolean(config.getOrDefault(TOKEN_SERIALIZE_RESULT_TO_STRING, "false").toString());
+        this.bufferSize = Integer.parseInt(config.getOrDefault(TOKEN_BUFFER_SIZE, "4096").toString());
+
+        this.gryoMapper = configureBuilder(builder, config, graphs).create();
+    }
+
+    private void addClassResolverSupplier(final Map<String, Object> config, final GryoMapper.Builder builder) {
+        final String className = (String) config.getOrDefault(TOKEN_CLASS_RESOLVER_SUPPLIER, null);
+        if (className != null && !className.isEmpty()) {
+            try {
+                final Class<?> clazz = Class.forName(className);
+                try {
+                    final Method instanceMethod = tryInstanceMethod(clazz);
+                    builder.classResolver((Supplier<ClassResolver>) instanceMethod.invoke(null));
+                } catch (Exception methodex) {
+                    // tried instance() and that failed so try newInstance() no-arg constructor
+                    builder.classResolver((Supplier<ClassResolver>) clazz.newInstance());
+                }
+            } catch (Exception ex) {
+                throw new IllegalStateException(ex);
+            }
+        }
+    }
+
+    private void addCustomClasses(final Map<String, Object> config, final GryoMapper.Builder builder) {
+        final List<String> classNameList = getListStringFromConfig(TOKEN_CUSTOM, config);
+
+        classNameList.stream().forEach(serializerDefinition -> {
+            String className;
+            Optional<String> serializerName;
+            if (serializerDefinition.contains(";")) {
+                final String[] split = serializerDefinition.split(";");
+                if (split.length != 2)
+                    throw new IllegalStateException(String.format("Invalid format for serializer definition [%s] - expected <class>;<serializer-class>", serializerDefinition));
+
+                className = split[0];
+                serializerName = Optional.of(split[1]);
+            } else {
+                serializerName = Optional.empty();
+                className = serializerDefinition;
+            }
+
+            try {
+                final Class clazz = Class.forName(className);
+                final Serializer serializer;
+                if (serializerName.isPresent()) {
+                    final Class serializerClazz = Class.forName(serializerName.get());
+                    serializer = (Serializer) serializerClazz.newInstance();
+                    builder.addCustom(clazz, kryo -> serializer);
+                } else
+                    builder.addCustom(clazz);
+            } catch (Exception ex) {
+                throw new IllegalStateException("Class could not be found", ex);
+            }
+        });
+    }
+
+    @Override
+    public ResponseMessage deserializeResponse(final ByteBuf msg) throws SerializationException {
+        try {
+            final Kryo kryo = kryoThreadLocal.get();
+            final byte[] payload = new byte[msg.capacity()];
+            msg.readBytes(payload);
+            try (final Input input = new Input(payload)) {
+                return kryo.readObject(input, ResponseMessage.class);
+            }
+        } catch (Exception ex) {
+            logger.warn("Response [{}] could not be deserialized by {}.", msg, GryoMessageSerializerV1d0.class.getName());
+            throw new SerializationException(ex);
+        }
+    }
+
+    @Override
+    public ByteBuf serializeResponseAsBinary(final ResponseMessage responseMessage, final ByteBufAllocator allocator) throws SerializationException {
+        ByteBuf encodedMessage = null;
+        try {
+            final Kryo kryo = kryoThreadLocal.get();
+            try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+                final Output output = new Output(baos, bufferSize);
+                final ResponseMessage msgToWrite = !serializeToString ? responseMessage :
+                        ResponseMessage.build(responseMessage.getRequestId())
+                            .code(responseMessage.getStatus().getCode())
+                            .statusAttributes(responseMessage.getStatus().getAttributes())
+                            .responseMetaData(responseMessage.getResult().getMeta())
+                            .result(serializeResultToString(responseMessage))
+                            .statusMessage(responseMessage.getStatus().getMessage()).create();
+                kryo.writeObject(output, msgToWrite);
+
+                final long size = output.total();
+                if (size > Integer.MAX_VALUE)
+                    throw new SerializationException(String.format("Message size of %s exceeds allocatable space", size));
+
+                output.flush();
+                encodedMessage = allocator.buffer((int) size);
+                encodedMessage.writeBytes(baos.toByteArray());
+            }
+
+            return encodedMessage;
+        } catch (Exception ex) {
+            if (encodedMessage != null) ReferenceCountUtil.release(encodedMessage);
+
+            logger.warn("Response [{}] could not be serialized by {}.", responseMessage.toString(), GryoMessageSerializerV1d0.class.getName());
+            throw new SerializationException(ex);
+        }
+    }
+
+    @Override
+    public RequestMessage deserializeRequest(final ByteBuf msg) throws SerializationException {
+        try {
+            final Kryo kryo = kryoThreadLocal.get();
+            final byte[] payload = new byte[msg.readableBytes()];
+            msg.readBytes(payload);
+            try (final Input input = new Input(payload)) {
+                // by the time the message gets here, the mime length/type have been already read, so this part just
+                // needs to process the payload.
+                return kryo.readObject(input, RequestMessage.class);
+            }
+        } catch (Exception ex) {
+            logger.warn("Request [{}] could not be deserialized by {}.", msg, GryoMessageSerializerV1d0.class.getName());
+            throw new SerializationException(ex);
+        }
+    }
+
+    @Override
+    public ByteBuf serializeRequestAsBinary(final RequestMessage requestMessage, final ByteBufAllocator allocator) throws SerializationException {
+        ByteBuf encodedMessage = null;
+        try {
+            final Kryo kryo = kryoThreadLocal.get();
+            try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+                final Output output = new Output(baos, bufferSize);
+                final String mimeType = mimeTypesSupported()[0];
+                output.writeByte(mimeType.length());
+                output.write(mimeType.getBytes(UTF8));
+
+                kryo.writeObject(output, requestMessage);
+
+                final long size = output.total();
+                if (size > Integer.MAX_VALUE)
+                    throw new SerializationException(String.format("Message size of %s exceeds allocatable space", size));
+
+                output.flush();
+                encodedMessage = allocator.buffer((int) size);
+                encodedMessage.writeBytes(baos.toByteArray());
+            }
+
+            return encodedMessage;
+        } catch (Exception ex) {
+            if (encodedMessage != null) ReferenceCountUtil.release(encodedMessage);
+
+            logger.warn("Request [{}] could not be serialized by {}.", requestMessage.toString(), GryoMessageSerializerV1d0.class.getName());
+            throw new SerializationException(ex);
+        }
+    }
+
+    private Object serializeResultToString(final ResponseMessage msg) {
+        if (msg.getResult() == null) return "null";
+        if (msg.getResult().getData() == null) return "null";
+
+        // the IteratorHandler should return a collection so keep it as such
+        final Object o = msg.getResult().getData();
+        if (o instanceof Collection) {
+            return ((Collection) o).stream().map(d -> null == d ? "null" : d.toString()).collect(Collectors.toList());
+        } else {
+            return o.toString();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java
new file mode 100644
index 0000000..6622dca
--- /dev/null
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.ser;
+
+import org.apache.tinkerpop.gremlin.driver.message.RequestMessage;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.InputShim;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.KryoShim;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.OutputShim;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.SerializerShim;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class RequestMessageGryoSerializer implements SerializerShim<RequestMessage> {
+    @Override
+    public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final RequestMessage requestMessage) {
+        kryo.writeObject(output, requestMessage.getRequestId());
+        output.writeString(requestMessage.getProcessor());
+        output.writeString(requestMessage.getOp());
+        kryo.writeObject(output, requestMessage.getArgs());
+    }
+
+    @Override
+    public <I extends InputShim> RequestMessage read(final KryoShim<I, ?> kryo, final I input, final Class<RequestMessage> aClass) {
+        final UUID id = kryo.readObject(input, UUID.class);
+        final String processor = input.readString();
+        final String op = input.readString();
+
+        final RequestMessage.Builder builder = RequestMessage.build(op)
+                .overrideRequestId(id)
+                .processor(processor);
+
+        final Map<String, Object> args = kryo.readObject(input, HashMap.class);
+        args.forEach(builder::addArg);
+        return builder.create();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java
new file mode 100644
index 0000000..8e02982
--- /dev/null
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.ser;
+
+import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage;
+import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.InputShim;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.KryoShim;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.OutputShim;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.kryoshim.SerializerShim;
+
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ResponseMessageGryoSerializer implements SerializerShim<ResponseMessage> {
+    @Override
+    public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final ResponseMessage responseMessage) {
+        kryo.writeObjectOrNull(output, responseMessage.getRequestId() != null ? responseMessage.getRequestId() : null, UUID.class);
+
+        // status
+        output.writeShort((short) responseMessage.getStatus().getCode().getValue());
+        output.writeString(responseMessage.getStatus().getMessage());
+        kryo.writeClassAndObject(output, responseMessage.getStatus().getAttributes());
+
+        // result
+        kryo.writeClassAndObject(output, responseMessage.getResult().getData());
+        kryo.writeClassAndObject(output, responseMessage.getResult().getMeta());
+
+    }
+
+    @Override
+    public <I extends InputShim> ResponseMessage read(final KryoShim<I, ?> kryo, final I input, final Class<ResponseMessage> clazz) {
+        final UUID requestId = kryo.readObjectOrNull(input, UUID.class);
+        final int status = input.readShort();
+        final String statusMsg = input.readString();
+        final Map<String,Object> statusAttributes = (Map<String,Object>) kryo.readClassAndObject(input);
+        final Object result = kryo.readClassAndObject(input);
+        final Map<String,Object> metaAttributes = (Map<String,Object>) kryo.readClassAndObject(input);
+
+        return ResponseMessage.build(requestId)
+                .code(ResponseStatusCode.getFromValue(status))
+                .statusMessage(statusMsg)
+                .statusAttributes(statusAttributes)
+                .result(result)
+                .responseMetaData(metaAttributes)
+                .create();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoBaseMessageSerializerV1d0Test.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoBaseMessageSerializerV1d0Test.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoBaseMessageSerializerV1d0Test.java
index 4a63d65..1929dbf 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoBaseMessageSerializerV1d0Test.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GryoBaseMessageSerializerV1d0Test.java
@@ -434,7 +434,7 @@ public class GryoBaseMessageSerializerV1d0Test {
         }};
         binarySerializerWithSmallBuffer.configure(configWithSmallBuffer, null);
 
-        ByteBuf buf = binarySerializerWithSmallBuffer.serializeResponseAsBinary(response, allocator);
+        final ByteBuf buf = binarySerializerWithSmallBuffer.serializeResponseAsBinary(response, allocator);
         assertTrue(buf.isReadable());
         assertEquals(82, buf.readableBytes());
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/pom.xml b/gremlin-tools/gremlin-io-test/pom.xml
index 549afd1..ddac98f 100644
--- a/gremlin-tools/gremlin-io-test/pom.xml
+++ b/gremlin-tools/gremlin-io-test/pom.xml
@@ -286,20 +286,14 @@ new File("${project.build.directory}/test-case-data/io/graphson/").listFiles().e
                                     <scripts>
                                         <script>
                                             <![CDATA[
-import org.apache.tinkerpop.shaded.kryo.io.Output
-
 import java.time.*
 import java.nio.file.*
-import org.apache.tinkerpop.gremlin.driver.ser.*
-import org.apache.tinkerpop.gremlin.process.traversal.*
+import org.apache.tinkerpop.shaded.kryo.io.Output
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.*
 import org.apache.tinkerpop.gremlin.structure.*
-import org.apache.tinkerpop.gremlin.structure.io.graphson.*
-import org.apache.tinkerpop.gremlin.driver.message.*
-import org.apache.tinkerpop.gremlin.process.traversal.step.*
-import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent.Pick
 import org.apache.tinkerpop.gremlin.structure.io.gryo.*
 import org.apache.tinkerpop.gremlin.structure.io.*
+import org.apache.tinkerpop.gremlin.process.traversal.*
 
 new File("${project.build.directory}/dev-docs/").mkdirs()
 new File("${project.build.directory}/test-case-data/io/gryo").mkdirs()
@@ -310,30 +304,52 @@ g = graph.traversal()
 model = Model.instance()
 
 toGryo = { o, type, mapper, suffix = "" ->
-  def fileToWriteTo = new File("${project.build.directory}/test-case-data/io/gryo/" + type.toLowerCase().replace(" ","") + "-" + suffix + ".kryo")
+  def fileToWriteTo = new File("${project.build.directory}/test-case-data/io/gryo/" + type.title.toLowerCase().replace(" ","") + "-" + suffix + ".kryo")
   if (fileToWriteTo.exists()) fileToWriteTo.delete()
-  final Output out = new Output(new FileOutputStream(fileToWriteTo))
-  mapper.writeObject(out, o)
-  out.close()
+  try {
+    final Output out = new Output(new FileOutputStream(fileToWriteTo))
+    mapper.writeObject(out, o)
+    out.close()
+  } catch (Exception ex) {
+    // some v1 gryo is not easily testable (i.e. RequestMessage) because it is has external serializers that
+    // don' get registered with GryoMapper. those cases can be ignored.
+    if (type.isCompatibleWith(GryoCompatibility.V1D0_3_3_0))
+      throw ex
+    else
+      fileToWriteTo.delete()
+  }
 }
 
 toGryoV1d0 = { o, type, mapper ->
   toGryo(o, type, mapper, "v1d0")
 }
 
+toGryoV3d0 = { o, type, mapper ->
+  toGryo(o, type, mapper, "v3d0")
+}
+
 writeSupportedObjects = { mapper, toGryoFunction ->
   model.entries().findAll{it.hasGryoCompatibility()}.each {
-    if (it.getObject() instanceof Traversal)
-      toGryoFunction(it.getObject().bytecode, it.getTitle(), mapper)
-    else
-      toGryoFunction(it.getObject(), it.getTitle(), mapper)
+    toGryoFunction(it.getObject(), it, mapper)
   }
 }
 
-mapper = GryoMapper.build().addRegistry(TinkerIoRegistryV2d0.getInstance()).create().createMapper()
+mapper = GryoMapper.build().
+                    version(GryoVersion.V1_0).
+                    addRegistry(TinkerIoRegistryV2d0.getInstance()).
+                    create().createMapper()
 
+println "1.0*************************"
 writeSupportedObjects(mapper, toGryoV1d0)
 
+println "3.0*************************"
+mapper = GryoMapper.build().
+                    version(GryoVersion.V3_0).
+                    addRegistry(TinkerIoRegistryV2d0.getInstance()).
+                    create().createMapper()
+
+writeSupportedObjects(mapper, toGryoV3d0)
+
 def ver = "_" + "${project.version}".replace(".","_").replace("-SNAPSHOT","")
 def target = "${project.basedir}/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/" + ver
 def targetDir = new File(target)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
index 1123e89..99d6d4c 100644
--- a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
+++ b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
@@ -153,46 +153,53 @@ public class Model {
         addGraphProcessEntry(createStaticTraversalMetrics(), "TraversalMetrics");
         addGraphProcessEntry(g.V().hasLabel("person").asAdmin().nextTraverser(), "Traverser");
 
-        final Map<String,Object> requestBindings = new HashMap<String,Object>(){{
-            put("x", 1);
-        }};
-        final Map<String,Object> requestAliases = new HashMap<String,Object>(){{
-            put("g", "social");
-        }};
+        final Map<String,Object> requestBindings = new HashMap<>();
+        requestBindings.put("x", 1);
+
+        final Map<String,Object> requestAliases = new HashMap<>();
+        requestAliases.put("g", "social");
+
         RequestMessage requestMessage;
         requestMessage = RequestMessage.build("authentication").
                 overrideRequestId(UUID.fromString("cb682578-9d92-4499-9ebc-5c6aa73c5397")).
                 add("saslMechanism", "PLAIN", "sasl", "AHN0ZXBocGhlbgBwYXNzd29yZA==").create();
         addRequestMessageEntry(requestMessage, "Authentication Response", "The following `RequestMessage` is an example of the response that should be made to a SASL-based authentication challenge.",
-                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GraphSONCompatibility.V2D0_PARTIAL_3_3_0, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         requestMessage = RequestMessage.build("eval").processor("session").
                 overrideRequestId(UUID.fromString("cb682578-9d92-4499-9ebc-5c6aa73c5397")).
-                add("gremlin", "g.V(x)", "bindings", requestBindings, "language", "gremlin-groovy", "session", UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")).create() ;
-        addRequestMessageEntry(requestMessage, "Session Eval", "The following `RequestMessage` is an example of a simple session request for a script evaluation with parameters.");
+                add("gremlin", "g.V(x)", "bindings", requestBindings, "language", "gremlin-groovy", "session", UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")).create();
+        addRequestMessageEntry(requestMessage, "Session Eval", "The following `RequestMessage` is an example of a simple session request for a script evaluation with parameters.",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         requestMessage = RequestMessage.build("eval").processor("session").
                 overrideRequestId(UUID.fromString("cb682578-9d92-4499-9ebc-5c6aa73c5397")).
                 add("gremlin", "social.V(x)", "bindings", requestBindings, "language", "gremlin-groovy", "aliases", requestAliases, "session", UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")).create();
-        addRequestMessageEntry(requestMessage, "Session Eval Aliased", "The following `RequestMessage` is an example of a session request for a script evaluation with an alias that binds the `TraversalSource` of \"g\" to \"social\".");
+        addRequestMessageEntry(requestMessage, "Session Eval Aliased", "The following `RequestMessage` is an example of a session request for a script evaluation with an alias that binds the `TraversalSource` of \"g\" to \"social\".",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         requestMessage = RequestMessage.build("close").processor("session").
                 overrideRequestId(UUID.fromString("cb682578-9d92-4499-9ebc-5c6aa73c5397")).
                 add("session", UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")).create();
-        addRequestMessageEntry(requestMessage, "Session Close", "The following `RequestMessage` is an example of a request to close a session.");
+        addRequestMessageEntry(requestMessage, "Session Close", "The following `RequestMessage` is an example of a request to close a session.",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         requestMessage = RequestMessage.build("eval").
                 overrideRequestId(UUID.fromString("cb682578-9d92-4499-9ebc-5c6aa73c5397")).
                 add("gremlin", "g.V(x)", "bindings", requestBindings, "language", "gremlin-groovy").create();
-        addRequestMessageEntry(requestMessage, "Sessionless Eval", "The following `RequestMessage` is an example of a simple sessionless request for a script evaluation with parameters.");
+        addRequestMessageEntry(requestMessage, "Sessionless Eval", "The following `RequestMessage` is an example of a simple sessionless request for a script evaluation with parameters.",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         requestMessage = RequestMessage.build("eval").
                 overrideRequestId(UUID.fromString("cb682578-9d92-4499-9ebc-5c6aa73c5397")).
                 add("gremlin", "social.V(x)", "bindings", requestBindings, "language", "gremlin-groovy", "aliases", requestAliases).create();
-        addRequestMessageEntry(requestMessage, "Sessionless Eval Aliased", "The following `RequestMessage` is an example of a sessionless request for a script evaluation with an alias that binds the `TraversalSource` of \"g\" to \"social\".");
+        addRequestMessageEntry(requestMessage, "Sessionless Eval Aliased", "The following `RequestMessage` is an example of a sessionless request for a script evaluation with an alias that binds the `TraversalSource` of \"g\" to \"social\".",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
 
         ResponseMessage responseMessage = ResponseMessage.build(UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")).
                 code(org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode.AUTHENTICATE).create();
-        addResponseMessageEntry(responseMessage, "Authentication Challenge", "When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server).", ALL.toArray(new Compatibility[ALL.size()]));
+        addResponseMessageEntry(responseMessage, "Authentication Challenge", "When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different depending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server).",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GraphSONCompatibility.V2D0_PARTIAL_3_3_0, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         responseMessage = ResponseMessage.build(UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")).
                 code(org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode.SUCCESS).
                 result(Collections.singletonList(graph.vertices().next())).create();
-        addResponseMessageEntry(responseMessage, "Standard Result", "The following `ResponseMessage` is a typical example of the typical successful response Gremlin Server will return when returning results from a script.", ALL.toArray(new Compatibility[ALL.size()]));
+        addResponseMessageEntry(responseMessage, "Standard Result", "The following `ResponseMessage` is a typical example of the typical successful response Gremlin Server will return when returning results from a script.",
+                GraphSONCompatibility.V2D0_PARTIAL_3_2_3, GraphSONCompatibility.V2D0_PARTIAL_3_3_0, GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_3_0);
         
         addExtendedEntry(new BigDecimal(new java.math.BigInteger("123456789987654321123456789987654321")), "BigDecimal", "", UNTYPED_GRAPHSON_ONLY.toArray(new Compatibility[UNTYPED_GRAPHSON_ONLY.size()]));
         addExtendedEntry(new BigInteger("123456789987654321123456789987654321"), "BigInteger", "", UNTYPED_GRAPHSON_ONLY.toArray(new Compatibility[UNTYPED_GRAPHSON_ONLY.size()]));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibility.java
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibility.java b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibility.java
index 09faf87..16902df 100644
--- a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibility.java
+++ b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibility.java
@@ -45,6 +45,7 @@ import java.io.IOException;
  */
 public enum GryoCompatibility implements Compatibility {
     V1D0_3_2_3("3.2.3", "1.0", "v1d0"),
+    V3D0_3_3_0("3.3.0", "3.0", "v3d0"),
     V1D0_3_3_0("3.3.0", "1.0", "v1d0");
 
     private static final String SEP = File.separator;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
index 89275c0..77bd40f 100644
--- a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
+++ b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractTypedCompatibilityTest.java
@@ -39,7 +39,6 @@ import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
 import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
 import org.apache.tinkerpop.gremlin.util.function.Lambda;
@@ -67,13 +66,10 @@ import java.time.ZonedDateTime;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
 
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotSame;
 
@@ -92,13 +88,10 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final ResponseMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final ResponseMessage fromStatic = read(getCompatibility().readFromResource(resourceName), ResponseMessage.class);
+        final ResponseMessage recycled = read(write(fromStatic, ResponseMessage.class), ResponseMessage.class);
         assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getStatus().getCode().getValue(), ((Map) recycled.get("status")).get("code"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getStatus().getCode().getValue(), ((Map) fromStatic.get("status")).get("code"));
+        assertResponseMessage(resource, fromStatic, recycled);
     }
 
     @Test
@@ -107,19 +100,14 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final RequestMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final RequestMessage fromStatic = read(getCompatibility().readFromResource(resourceName), RequestMessage.class);
+        final RequestMessage recycled = read(write(fromStatic, RequestMessage.class), RequestMessage.class);
         assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getOp(), recycled.get("op"));
-        assertEquals(resource.getProcessor(), recycled.get("processor"));
-        assertEquals(resource.getArgs().get("saslMechanism"), ((Map) recycled.get("args")).get("saslMechanism"));
-        assertEquals(resource.getArgs().get("sasl"), ((Map) recycled.get("args")).get("sasl"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getOp(), fromStatic.get("op"));
-        assertEquals(resource.getProcessor(), fromStatic.get("processor"));
-        assertEquals(resource.getArgs().get("saslMechanism"), ((Map) fromStatic.get("args")).get("saslMechanism"));
-        assertEquals(resource.getArgs().get("sasl"), ((Map) fromStatic.get("args")).get("sasl"));
+        assertRequestMessage(resource, fromStatic, recycled);
+        assertEquals(resource.getArgs().get("saslMechanism"), recycled.getArgs().get("saslMechanism"));
+        assertEquals(resource.getArgs().get("sasl"), recycled.getArgs().get("sasl"));
+        assertEquals(resource.getArgs().get("saslMechanism"), fromStatic.getArgs().get("saslMechanism"));
+        assertEquals(resource.getArgs().get("sasl"), fromStatic.getArgs().get("sasl"));
     }
 
     @Test
@@ -662,17 +650,12 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final RequestMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final RequestMessage fromStatic = read(getCompatibility().readFromResource(resourceName), RequestMessage.class);
+        final RequestMessage recycled = read(write(fromStatic, RequestMessage.class), RequestMessage.class);
         assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getOp(), recycled.get("op"));
-        assertEquals(resource.getProcessor(), recycled.get("processor"));
-        assertEquals(resource.getArgs().get("session"), ((Map) recycled.get("args")).get("session"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getOp(), fromStatic.get("op"));
-        assertEquals(resource.getProcessor(), fromStatic.get("processor"));
-        assertEquals(resource.getArgs().get("session"), ((Map) fromStatic.get("args")).get("session"));
+        assertRequestMessage(resource, fromStatic, recycled);
+        assertEquals(resource.getArgs().get("session"), recycled.getArgs().get("session"));
+        assertEquals(resource.getArgs().get("session"), fromStatic.getArgs().get("session"));
     }
 
     @Test
@@ -681,22 +664,18 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final RequestMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final RequestMessage fromStatic = read(getCompatibility().readFromResource(resourceName), RequestMessage.class);
+        final RequestMessage recycled = read(write(fromStatic, RequestMessage.class), RequestMessage.class);
         assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getOp(), recycled.get("op"));
-        assertEquals(resource.getProcessor(), recycled.get("processor"));
-        assertEquals(resource.getArgs().get("session"), ((Map) recycled.get("args")).get("session"));
-        assertEquals(resource.getArgs().get("language"), ((Map) recycled.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) recycled.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) recycled.get("args")).get("bindings")).get("x"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getOp(), fromStatic.get("op"));
-        assertEquals(resource.getArgs().get("session"), ((Map) fromStatic.get("args")).get("session"));
-        assertEquals(resource.getArgs().get("language"), ((Map) fromStatic.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) fromStatic.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) fromStatic.get("args")).get("bindings")).get("x"));
+        assertRequestMessage(resource, fromStatic, recycled);
+        assertEquals(resource.getArgs().get("session"), recycled.getArgs().get("session"));
+        assertEquals(resource.getArgs().get("language"), recycled.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), recycled.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) recycled.getArgs().get("bindings")).get("x"));
+        assertEquals(resource.getArgs().get("session"), fromStatic.getArgs().get("session"));
+        assertEquals(resource.getArgs().get("language"), fromStatic.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), fromStatic.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) fromStatic.getArgs().get("bindings")).get("x"));
     }
 
     @Test
@@ -705,24 +684,20 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final RequestMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
-        assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getOp(), recycled.get("op"));
-        assertEquals(resource.getProcessor(), recycled.get("processor"));
-        assertEquals(resource.getArgs().get("session"), ((Map) recycled.get("args")).get("session"));
-        assertEquals(resource.getArgs().get("language"), ((Map) recycled.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) recycled.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) ((Map) recycled.get("args")).get("aliases")).get("g"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) recycled.get("args")).get("bindings")).get("x"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getOp(), fromStatic.get("op"));
-        assertEquals(resource.getArgs().get("session"), ((Map) fromStatic.get("args")).get("session"));
-        assertEquals(resource.getArgs().get("language"), ((Map) fromStatic.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) fromStatic.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) ((Map) fromStatic.get("args")).get("aliases")).get("g"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) fromStatic.get("args")).get("bindings")).get("x"));
+        final RequestMessage fromStatic = read(getCompatibility().readFromResource(resourceName), RequestMessage.class);
+        final RequestMessage recycled = read(write(fromStatic, RequestMessage.class), RequestMessage.class);
+        assertNotSame(fromStatic, recycled);
+        assertRequestMessage(resource, fromStatic, recycled);
+        assertEquals(resource.getArgs().get("session"), recycled.getArgs().get("session"));
+        assertEquals(resource.getArgs().get("language"), recycled.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), recycled.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) recycled.getArgs().get("aliases")).get("g"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) recycled.getArgs().get("bindings")).get("x"));
+        assertEquals(resource.getArgs().get("session"), fromStatic.getArgs().get("session"));
+        assertEquals(resource.getArgs().get("language"), fromStatic.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), fromStatic.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) fromStatic.getArgs().get("aliases")).get("g"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) fromStatic.getArgs().get("bindings")).get("x"));
     }
 
     @Test
@@ -731,20 +706,16 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final RequestMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final RequestMessage fromStatic = read(getCompatibility().readFromResource(resourceName), RequestMessage.class);
+        final RequestMessage recycled = read(write(fromStatic, RequestMessage.class), RequestMessage.class);
         assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getOp(), recycled.get("op"));
-        assertEquals(resource.getProcessor(), recycled.get("processor"));
-        assertEquals(resource.getArgs().get("language"), ((Map) recycled.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) recycled.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) recycled.get("args")).get("bindings")).get("x"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getOp(), fromStatic.get("op"));
-        assertEquals(resource.getArgs().get("language"), ((Map) fromStatic.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) fromStatic.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) fromStatic.get("args")).get("bindings")).get("x"));
+        assertRequestMessage(resource, fromStatic, recycled);
+        assertEquals(resource.getArgs().get("language"), recycled.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), recycled.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) recycled.getArgs().get("bindings")).get("x"));
+        assertEquals(resource.getArgs().get("language"), fromStatic.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), fromStatic.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) fromStatic.getArgs().get("bindings")).get("x"));
     }
 
     @Test
@@ -753,22 +724,18 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assumeCompatibility(resourceName);
 
         final RequestMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final RequestMessage fromStatic = read(getCompatibility().readFromResource(resourceName), RequestMessage.class);
+        final RequestMessage recycled = read(write(fromStatic, RequestMessage.class), RequestMessage.class);
         assertNotSame(fromStatic, recycled);
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getOp(), recycled.get("op"));
-        assertEquals(resource.getProcessor(), recycled.get("processor"));
-        assertEquals(resource.getArgs().get("language"), ((Map) recycled.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) recycled.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) ((Map) recycled.get("args")).get("aliases")).get("g"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) recycled.get("args")).get("bindings")).get("x"));
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getOp(), fromStatic.get("op"));
-        assertEquals(resource.getArgs().get("language"), ((Map) fromStatic.get("args")).get("language"));
-        assertEquals(resource.getArgs().get("gremlin"), ((Map) fromStatic.get("args")).get("gremlin"));
-        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) ((Map) fromStatic.get("args")).get("aliases")).get("g"));
-        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) ((Map) fromStatic.get("args")).get("bindings")).get("x"));
+        assertRequestMessage(resource, fromStatic, recycled);
+        assertEquals(resource.getArgs().get("language"), recycled.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), recycled.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) recycled.getArgs().get("aliases")).get("g"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) recycled.getArgs().get("bindings")).get("x"));
+        assertEquals(resource.getArgs().get("language"), fromStatic.getArgs().get("language"));
+        assertEquals(resource.getArgs().get("gremlin"), fromStatic.getArgs().get("gremlin"));
+        assertEquals(((Map) resource.getArgs().get("aliases")).get("g"), ((Map) fromStatic.getArgs().get("aliases")).get("g"));
+        assertEquals(((Map) resource.getArgs().get("bindings")).get("x"), ((Map) fromStatic.getArgs().get("bindings")).get("x"));
     }
 
     @Test
@@ -789,17 +756,11 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         final String resourceName = "standardresult";
         assumeCompatibility(resourceName);
 
-        // todo: incomplete asserts - none of this is consistent right now
         final ResponseMessage resource = findModelEntryObject(resourceName);
-        final HashMap fromStatic = read(getCompatibility().readFromResource(resourceName), HashMap.class);
-        final HashMap recycled = read(write(fromStatic, HashMap.class), HashMap.class);
+        final ResponseMessage fromStatic = read(getCompatibility().readFromResource(resourceName), ResponseMessage.class);
+        final ResponseMessage recycled = read(write(fromStatic, HashMap.class), ResponseMessage.class);
         assertNotSame(fromStatic, recycled);
-        final List<DetachedVertex> resourceVertices = (List<DetachedVertex>) resource.getResult().getData();
-        assertEquals(resource.getRequestId(), recycled.get("requestId"));
-        assertEquals(resource.getStatus().getCode().getValue(), ((Map) recycled.get("status")).get("code"));
-        assertEquals(resourceVertices.size(), ((List) ((Map) recycled.get("result"))).size());
-        assertEquals(resource.getRequestId(), fromStatic.get("requestId"));
-        assertEquals(resource.getStatus().getCode().getValue(), ((Map) fromStatic.get("status")).get("code"));
+        assertResponseMessage(resource, fromStatic, recycled);
     }
 
     @Test
@@ -1015,4 +976,34 @@ public abstract class AbstractTypedCompatibilityTest extends AbstractCompatibili
         assertEquals(resource, fromStatic);
         assertEquals(resource, recycled);
     }
+
+    private static void assertResponseMessage(final ResponseMessage resource, final ResponseMessage fromStatic,
+                                              final ResponseMessage recycled) {
+        assertEquals(resource.getRequestId(), recycled.getRequestId());
+        assertEquals(resource.getStatus().getCode().getValue(), recycled.getStatus().getCode().getValue());
+        assertEquals(resource.getStatus().getMessage(), recycled.getStatus().getMessage());
+        assertEquals(resource.getStatus().getAttributes(), recycled.getStatus().getAttributes());
+        assertEquals(resource.getResult().getData(), recycled.getResult().getData());
+        assertEquals(resource.getResult().getMeta(), recycled.getResult().getMeta());
+        assertEquals(resource.getStatus().getMessage(), recycled.getStatus().getMessage());
+        assertEquals(resource.getRequestId(), fromStatic.getRequestId());
+        assertEquals(resource.getStatus().getCode().getValue(), fromStatic.getStatus().getCode().getValue());
+        assertEquals(resource.getStatus().getMessage(), fromStatic.getStatus().getMessage());
+        assertEquals(resource.getStatus().getAttributes(), fromStatic.getStatus().getAttributes());
+        assertEquals(resource.getResult().getData(), fromStatic.getResult().getData());
+        assertEquals(resource.getResult().getMeta(), fromStatic.getResult().getMeta());
+        assertEquals(resource.getStatus().getMessage(), fromStatic.getStatus().getMessage());
+    }
+
+    private static void assertRequestMessage(final RequestMessage resource, final RequestMessage fromStatic,
+                                             final RequestMessage recycled) {
+        assertEquals(resource.getRequestId(), recycled.getRequestId());
+        assertEquals(resource.getOp(), recycled.getOp());
+        assertEquals(resource.getProcessor(), recycled.getProcessor());
+        assertEquals(resource.getArgs(), recycled.getArgs());
+        assertEquals(resource.getRequestId(), fromStatic.getRequestId());
+        assertEquals(resource.getOp(), fromStatic.getOp());
+        assertEquals(resource.getProcessor(), fromStatic.getProcessor());
+        assertEquals(resource.getArgs(), fromStatic.getArgs());
+    }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibilityTest.java b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibilityTest.java
index fe86e0a..50c0853 100644
--- a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibilityTest.java
+++ b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoCompatibilityTest.java
@@ -19,12 +19,8 @@
 package org.apache.tinkerpop.gremlin.structure.io.gryo;
 
 import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.io.AbstractTypedCompatibilityTest;
 import org.apache.tinkerpop.gremlin.structure.io.Compatibility;
-import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge;
-import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV2d0;
 import org.apache.tinkerpop.shaded.kryo.Kryo;
 import org.apache.tinkerpop.shaded.kryo.io.Input;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationchallenge-v3d0.kryo
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationchallenge-v3d0.kryo b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationchallenge-v3d0.kryo
new file mode 100644
index 0000000..baf91ac
Binary files /dev/null and b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationchallenge-v3d0.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationresponse-v3d0.kryo
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationresponse-v3d0.kryo b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationresponse-v3d0.kryo
new file mode 100644
index 0000000..1f99f2a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/authenticationresponse-v3d0.kryo
@@ -0,0 +1 @@
+\ufffdh%x\ufffd\ufffdD\ufffd\ufffd\ufffd\j\ufffd<S\ufffd\ufffdauthenticatio\ufffdsaslMechanis\ufffdPLAI\ufffdsas\ufffdAHN0ZXBocGhlbgBwYXNzd29yZA=\ufffd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/barrier-v3d0.kryo
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/barrier-v3d0.kryo b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/barrier-v3d0.kryo
new file mode 100644
index 0000000..40fdece
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/barrier-v3d0.kryo
@@ -0,0 +1 @@
+
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/bigdecimal-v3d0.kryo
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/bigdecimal-v3d0.kryo b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/bigdecimal-v3d0.kryo
new file mode 100644
index 0000000..d4f40e0
Binary files /dev/null and b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/bigdecimal-v3d0.kryo differ

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/436b1fd5/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/biginteger-v3d0.kryo
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/biginteger-v3d0.kryo b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/biginteger-v3d0.kryo
new file mode 100644
index 0000000..f424ac6
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/gryo/_3_3_0/biginteger-v3d0.kryo
@@ -0,0 +1 @@
+\ufffd\ufffd\ufffd\ufffd\u0442Z\ufffd}Dv\ufffd\ufffd
\ No newline at end of file