@@ -34,17 +34,27 @@ message back to the client.
34
34
Handler versioning is required in order to add changes to the HTTP request and response messages, as well as adding functionality
35
35
related to the processing of those messages. For example, in order to support affinity management of EJB/HTTP requests, request routing
36
36
data (cookies) need to be added to requests, and those cookies need to be processed on the client side as well as the server side.
37
-
38
37
Handler versioning is also required to maintain backward compatibility: newer versions of handlers may involve functionality not
39
38
available to handlers in earlier versions.
40
39
41
40
To get agreement on which handlers should be used, a handshake protocol between client and server will need to negotiate which handler
42
41
version to use, generally the maximum version common to both client and server.
43
42
43
+ It is important to note that such a handshake protocol already exists in the Wildfly HTTP client. It was introduced in
44
+ https://issues.redhat.com/browse/WFLY-16296[WFLY-16296] to provide client-side interoperability between Java EE-based
45
+ implementations of Wildfly and Jakarta EE-based implemetations of Wildfly. This issue can be viewed as introducing extensions
46
+ to that handshake protocol for the purpose of managing client-side and server-side handler versions.
47
+
44
48
=== User Stories
45
49
46
- This feature does not have associated user stories, as the functionality provided is auto-managed by the client library itself, with
47
- no required input from the user.
50
+ Users of this feature will make use of the Wildfly HTTP client software to access the functionality provided by the EJB/HTTP,
51
+ Naming/HTTP and Transactions/HTTP libraries in interacting with deployments on a Wildfly server, making use of the HTTP
52
+ transport protocol. This is particularly inportant when the deployments in question are deployed on servers behind a load
53
+ balancer.
54
+
55
+ The feature implemented here will allow users to use the client and server software with mixed versions; for example,
56
+ an application using a more recent version of the Wildfly HTTP client library may be used to access deployments on a server
57
+ with a legacy version of the Wildfly HTTP client library installed.
48
58
49
59
== Issue Metadata
50
60
@@ -54,10 +64,13 @@ no required input from the user.
54
64
* WFLY-20532: integration of the featrure into Wildfly
55
65
* WEJBHTTP-153: principal coding changes of the feature in the client libraries
56
66
* Feature Planning Project Issue #56: for feature planning in Wildfly (see https://github.com/orgs/wildfly/projects/7/views/1)
67
+ * WFLY-16296: Java EE and Jakarta EE interoperability
57
68
58
69
=== Affected Projects or Components
59
70
60
- Use of the Wildfly client libraries is affected by this feature change.
71
+ Use of the Wildfly HTTP Client library is affected by this change, as well as integration of Wildfly HTTP client library
72
+ integration into Wildfly server itself; in other words, these changes have inpact on both the client side and the server
73
+ side of request processing.
61
74
62
75
=== Other Interested Projects
63
76
@@ -70,9 +83,10 @@ Use of the Wildfly client libraries is affected by this feature change.
70
83
71
84
== Requirements
72
85
73
- This change impacts several aspects of the Wildfly HTTP client.
86
+ This change impacts several aspects of the Wildfly HTTP client, relating to the addition of new features, backward
87
+ compatability and considerations for future requirements.
74
88
75
- === 1. Handler versioning
89
+ === 1. Addition of new features via handler versioning
76
90
77
91
In order to describe a context for this versioning requirement, we assume that the request response processing that takes
78
92
place between a Wildfly HTTP client application and a Wildfly server can be viewed abstractly as consisting of four parts:
@@ -90,9 +104,10 @@ aspect are as follows:
90
104
** e.g. maintain completely separate 4-tuples for each handler version
91
105
** e.g. maintain one 4-tuple of handlers, each parameterized by handler version
92
106
107
+ Client and server are required to agree on and make use of the same handler version during request response interactions.
93
108
Such handler versioning permits the addition of new features to request/response processing for the Wildfly HTTP client.
94
109
95
- === 2. Handshaking and Backward compatibility
110
+ === 2. Handshaking, backward compatibility and forward compatability
96
111
97
112
Once we have versioned handlers, it will happen that clients and servers from different Wildfly versions will have different
98
113
handler versions available. In order to preserve compatibility between clients and servers from different Wildfly versions,
@@ -102,8 +117,16 @@ Therefore, requirements for this aspect are:
102
117
103
118
* provide a handshake protocol between client and server to negotiate the handler version to be used, based on the formula
104
119
min(client handler version, server handler version)
120
+ * the handshake protocol should be carried out before the first invocation is sent from client to server; by convention,
121
+ this happens at connection estanlishment
122
+ * the agreed handler version should not change during the lifetime of a connection
123
+
124
+ The handshake protocol should establish an agreed handler version for any combination of versions of the Wildlfy HTTP client
125
+ library and Wildfly server (e.g. a old version of Wildfly HTTP client with a new version of Wildfly server or a new version
126
+ of Wildfly HTTP client and an old version of Wildfly server). In other words, the software should be both backward
127
+ compatible (new clients work with old servers) as well as forward compatible (old clients work with new servers).
105
128
106
- === 3. Additional handshake parameters
129
+ === 3. Extended handshake parameters
107
130
108
131
In addition to getting agreement on the handler version to use, there are other aspects of the Wildfly HTTP client which
109
132
may differ between client and server and which are required for backward compatibility:
@@ -115,7 +138,12 @@ may differ between client and server and which are required for backward compati
115
138
Each of these aspects will have their own numerical version and the handshake protocol will get agreement for these values
116
139
to enhance interoperability and backward compatibility.
117
140
118
- NOTE: it would be useful for informational and debuging purooses to provide the handshake values in the logs:
141
+ === 4. Handshake outcome visibility
142
+
143
+ If a successful handshake cannot be achieved, an exception should be thrown to indicate this fact (as well as provide an
144
+ explanation of why the handshake failed) and the client-server interaction terminated.
145
+
146
+ It would be useful for informational and debuging purposes to provide the handshake values in the logs:
119
147
120
148
* INFO level: announce the agreed values when there is a client-server version mismatch
121
149
* DEBUG level: provide the "before" and "after" values for both the client and server before the handshake starts and after
@@ -130,61 +158,84 @@ stateful EJB the request targets and the target node which receives the invocati
130
158
when stateful EJBs are deployed in a cluster.
131
159
132
160
In order to introduce such a feature, significant changes to the client-side and server-side handlers is required, thus the
133
- need for client-side and server-side version handling to introduce the feature.
161
+ need for client-side and server-side version handling to introduce the feature while at the same time maintaining backward
162
+ and forward compatibility.
134
163
135
164
== Backwards Compatibility
136
165
137
166
NOTE: Backward compatibility is taken to mean new versions of software (and data) being able to work with old versions of
138
- the same software software (and data). Forward comatibility similarly is taken to mean old software (and data) being able
167
+ the same software (and data). Forward compatibility similarly is taken to mean old software (and data) being able
139
168
to work with new software (and data).
140
169
141
- This enhancement does relate directly to the issue of backward compatability. The incompatibilities which may arise span
142
- various aspects:
170
+ This enhancement relates directly to the issue of backward compatability. The incompatibilities which may arise between
171
+ client and server versions span various aspects of the software :
143
172
144
173
* Java EE vs Jakarta EE differences, due to package changes
145
174
* client-side and server-side handler differences, due to functional changes
146
175
* HTTP request message and response message differences, with respect to headers and body
147
176
* marshalling choices (future)
148
177
149
- Both backward and forward compatibility is guaranteed by the client and server carrying out a handshake on connection establishment
150
- which determines agreed versions of each of these aspects to be used when processing invocations.
178
+ === Original handshake protocol
179
+
180
+ As mentioned earlier, the original handshake protocol was introduced to handle the shift from Java EE to Jakarta EE, as
181
+ these use different package naming conventions. The EE Interoperability Protocol is a handshake between client and server
182
+ on conection establishment which sets an EE Interoperability version:
183
+
184
+ * version 1: use a special interoperability marshaller which converts package names in the appropriate way
185
+ * version 2: use the default marshallers
186
+
187
+ Version 1 is used when the client and server require package transformation during marshalling. Version 2 is used when they
188
+ do not. The EE interoperability protocol can be enabled or disabled via configuration (system property org.wildfly.ee.namespace.interop)
189
+ and the default value for this system propery is false (i.e. the EE interoperability protocol is not enabled).
190
+
191
+ === Extended handshake protocol
192
+
193
+ The extended handshake protocol to be implemented here will also incorporate agreement on the additional compatibility
194
+ aspects mentioned above:
195
+
196
+ * client-side and server-side handler differences, due to functional changes
197
+ * HTTP request message and response message differences, with respect to headers and body
198
+ * marshalling choices (future)
199
+
200
+ When the extended handshake protocol is enabled, both backward and forward compatibility is guaranteed, by the client and
201
+ server carrying out a handshake on connection establishment, which determines agreed versions of each of the aspects mentioned
202
+ above to be used when processing invocations.
203
+
204
+ As in the case of the original EE Interoperability Protocol, whether or not the extended handshake protocol is
205
+ enabled or not should be configurable.
206
+
207
+ This guarantee does not extend to the following aspects (not mentioned above, see
208
+ https://github.com/wildfly/wildfly-proposals/blob/main/backward-compatibility/WFLY-16296_JavaEE_And_JakartaEE_Compatibility.adoc#none-requirements[WFLY-16296])
209
+
210
+ * Infinispan and Clustering protocols backward compatibility
211
+ * ABI compatibility for non existing mapping of classes/methods available in Java EE 8- but not in Jakarta EE 9+ and
212
+ vice versa. Users will need to migrate their clients/applications for such problematic scenarios manually.
151
213
152
214
=== Default Configuration
153
215
154
- Configuration of the HTTP client is setup by the wildfly-config.xml file. There may be some small changes to the schema.
216
+ Configuration of the HTTP client geerally is set up by the wildfly-config.xml file. There are no forseen changes to the
217
+ schema. The extended handshake protocol will be enabled or disabled via configuration (system property org.wildfly.ee.namespace.interop)
218
+ and the default value for this system propery is false, although this setting is up for discussion.
155
219
156
220
=== Importing Existing Configuration
157
221
158
- THis work does not affect existing server configurations, as the feature does not depend on the way in which the server is
222
+ This work does not affect existing server configurations, as the feature does not depend on the way in which the server is
159
223
configured.
160
224
161
225
=== Deployments
162
226
163
227
This feature should not affect deployments in incompatible ways. Deployments may contain embedded Wildfly HTTP client
164
228
applications (e.g. the server-client to server architecture). However, the interaction between server-client and server,
165
- even if using different versions, will be negotiated in the same was as a standalone client with a server.
229
+ even if using different versions, will be negotiated in the same way as a standalone client with a server.
166
230
167
231
=== Interoperability
168
232
169
- NOTE: Interoperability: the ability of software from different vendors or with different architecrures to exchange information and operate semlessly.
170
-
171
- The Wildfly client applications generally (irrespective of the particular transport used - Remoting or HTTP) are affected
172
- by the shift from Java EE to Jakarta EE, as these use different package naming conventions. The common solution to this
173
- problem was to introduce the EE Interoperability Protocol which is a handshake between client and server on conection establishment
174
- which sets an EE Interoperability version:
175
-
176
- * version 1: use a special interoperability marshaller which converts package names in the appropriate way
177
- * version 2: use the default marshallers
178
-
179
- Version 1 is used when the client and server require package transformation during marshalling. Version 2 is used when they
180
- do not.
181
-
182
- The EE version is one of the aspects varying between client and server and is handled by the handshake protocol mentioned
183
- earlier.
233
+ The Wildfly HTTP client software does not interoperate with Jakarta EE software from other vendors, as it a JBoss extension
234
+ to behaviour required by the Java EE / Jakarta EE specification.
184
235
185
236
== Admin Clients
186
237
187
- These changes do not affect compatibility with Wildfly CLI or HAL/Admin Colsole .
238
+ These changes do not affect compatibility with Wildfly CLI or HAL/Admin Console .
188
239
189
240
== Security Considerations
190
241
@@ -200,13 +251,13 @@ This issue is at stability level "community" and the following required sections
200
251
The requirements of this issue which require one or more forms of validation through testing are as follows:
201
252
202
253
* the handshake between client and server produce the expected agreed values, conditional on the client version
203
- and the server varsion (interoperability, compatability)
254
+ and the server version (interoperability, compatability)
204
255
* for each agreed handshake variable:
205
- ** the EE interoperability aspect functions as expected (i.e. the interopeablity mode is determined)
256
+ ** the EE interoperability aspect functions as expected (i.e. the interoperablity mode is determined)
206
257
** the client-server tuple assignment functions as expected (i.e. the functional requirements of the EJB client, Naming
207
- client and Transaction client for that client-server handler version function as expected
258
+ client and Transaction client for that client-server handler version function as expected)
208
259
** the marshalling regimen functions as expected (i.e. the correct marshalling regimen is used for marshalling)
209
- * at onnection establishment time, there is no interference between the handshake protocol and the establishment of secure
260
+ * at connection establishment time, there is no interference between the handshake protocol and the establishment of secure
210
261
connections
211
262
212
263
=== Manual Tests
@@ -224,14 +275,14 @@ testing fine-grained requirements for integration of components within the Wildf
224
275
225
276
Server-level integration tests will target integration between the Wildfly HTTP client library and the server environment
226
277
it interacts with - testing coarse-grained requirements for integration between the Wildfly HTTP client library and the various
227
- subsystems of the server it interacts with, as well as overall combined client-server hahaviour .
278
+ subsystems of the server it interacts with, as well as overall combined client-server behaviour .
228
279
229
280
==== Project-level integration tests
230
281
231
282
handshakeProtocolTest: validate the behaviour of the handshake protocol between a client and a mock server.
232
283
233
284
cientHandlerServerhandlerSmokeTest: test that handlers work when using clients and servers of differing handler versions
234
- are combined (and that the handshake finds an agreed handler version))
285
+ are combined (and that the handshake finds an agreed handler version)
235
286
236
287
237
288
==== Server-level integration tests
@@ -263,9 +314,15 @@ refactorings; need to consider making the agreed handshake values accessible thr
263
314
264
315
== Community Documentation
265
316
266
- This feature is not something that the user would need to be aware of - for client and server versions which do not match,
267
- the handshake protocol should establish an agreed version. However, a documentation note on the existence of the handshake
268
- protocol, why it is necessary and what it does would be helpful.
317
+ The current EE interoperability protocol is used to handle incompatabilities between Java EE / Jakarta EE implementation
318
+ differences between client and server. The interoperability protocol can be enabled or disabled, and is by default not
319
+ enabled (off). It needs to be enabled in the client configuration when client and server EE specifications do not match.
320
+
321
+ The same approach should be taken for the extended interoperability protocol of this issue: that the protocol is not enabled
322
+ by default (assuming that most clients and servers will be using the same Wildfly version). A documentation note explaining
323
+ these defaults should be included in community documentation. The note should also explain how to determine that version
324
+ incompatibility is present (e.g. which error messages to look for).
325
+
269
326
270
327
== Release Note Content
271
328
0 commit comments