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

ASF subversion and git services commented on GEODE-8963:
--------------------------------------------------------

Commit dc3ed8c1af4389f60c8ad8e35c43a72731869dcc in geode's branch 
refs/heads/develop from Bruce Schuchardt
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=dc3ed8c ]

GEODE-8963: separate client/server compatibility from server/server version 
compatibility (#6050)

* GEODE-8963: separate client/server compatibility from server/server version 
compatibility

A client's version is used for deserializing data received from the client and 
for
serializing data sent to the client. It is also used to locate the map of 
Commands
used to process client requests. Every time we cut a new release we bump this 
version
in KnownVersions and create a new map of Commands, even though client/server
communications protocols rarely change.

This PR changes KnownVersions to hold a client/server protocol version that is
used to identify clients for command-table selection and serialization rather 
than
the client's CURRENT_VERSION.

* Donal's comments addressed and WAN problem fixed

* refactored a method with Bill and made ServerConnection code clearer

Altered KnownVersions to just mark each version that has client/server
protocol changes rather than store the last one having changes in the
more recent instances.  Release managers can continue to use the old
constructor and coders can change to the new constructor if necessary
during the course of a release.

> separate client/server compatibility from server/server version compatibility
> -----------------------------------------------------------------------------
>
>                 Key: GEODE-8963
>                 URL: https://issues.apache.org/jira/browse/GEODE-8963
>             Project: Geode
>          Issue Type: Improvement
>          Components: serialization
>            Reporter: Bruce J Schuchardt
>            Assignee: Bruce J Schuchardt
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.15.0
>
>
> A client's version is used for deserializing data received from the client 
> and for serializing data sent to the client. It is also used to locate the 
> map of Commands used to process client requests. Every time we cut a new 
> release we bump this version in KnownVersions and create a new map of 
> Commands, even though client/server communications protocols rarely change.
>  We should have each KnownVersion hold a client/server compatibility number 
> that is used to identify clients rather than the KnownVersion's ordinal.
> For instance,
> {code:java}
>   public static final KnownVersion GEODE_1_15_0 =
>       new KnownVersion("GEODE", "1.15.0", (byte) 1, (byte) 15, (byte) 0, 
> (byte) 0,
>           /*server/server version*/GEODE_1_15_0_ORDINAL, 
>           /*client/server version*/GEODE_1_15_0_ORDINAL);
>   
> public static final KnownVersion GEODE_1_16_0 =
>       new KnownVersion("GEODE", "1.16.0", (byte) 1, (byte) 16, (byte) 0, 
> (byte) 0,
>           /*server/server version*/GEODE_1_16_0_ORDINAL, 
>           /*client/server version*/GEODE_1_15_0_ORDINAL);
> public static final KnownVersion GEODE_1_17_0 =
>       new KnownVersion("GEODE", "1.17.0", (byte) 1, (byte) 17, (byte) 0, 
> (byte) 0,
>           /*server/server version*/GEODE_1_17_0_ORDINAL, 
>           /*client/server version*/GEODE_1_15_0_ORDINAL);
> {code}
> In the above KnownVersions the client/server serialization is known to have 
> not changed since v1.15.0 and so there is no need to use a newer KnownVersion 
> for clients.
> Client handshake code will need to be changed to use the client/server 
> ordinal when identifying clients and servers.



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

Reply via email to