-
Notifications
You must be signed in to change notification settings - Fork 4
Fix messageKind field for request messages of queries to *not* have the Request suffix
#276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
… the `Request` suffix
|
I was not aware we wanted to change that? The json schema includes the |
Isn’t the JSON Schema then not also wrong? Or else I don’t know what was incorrect in the first place. |
|
I agree. IMHO, both JSON and TS was correct (and matches C#). The confusion was between the technical name of queries in the spec not containing any suffix, and the names in JSON/TS/C# do contain a suffix. We resolved that confusion by the discussion that this JSON is geared towards WebSocket, a protocol that doesn't support synchronous request/response messages. Thus, we have to simulate it by splitting up the @dslmeinte @joswarmer Does this fit your understanding? |
I think it does. So, we just need to add wording to the specification that mentions that the technical name is not necessarily going to be the value of the |
|
I'd argue that's covered by https://lionweb.io/specification/delta/delta-api.html#out-of-scope We would need to have a proper "binding spec" to WebSocket, which I think we said we won't do. |
We are defining properties for messages, so it makes sense to specify the Looking at the three implementations we have (typescript., C#, server), we all have added this exact property. So let's make it official. And explicitly stating that the value of this property is equal to the technical name ensures that various implementations will actually work together, which is the end objective of LionWeb. Even then different implementations may use different technical means to send messages (sync and/or async) to each other , but the message itself is fully specified and identifiable. There is no need to derive the "message kind" from the technical protocol. If we do not use the technical name as the value for Responses have no technical name in the spec, only requests have. We can specify that the technical name (thus the messageKind) of a Response message is the technical name of the Request + "Response"). Or we can specify both technical names explictly.
In that case, why do we have the |
Yes, it's wrong as well. |
|
I actually like the difference names for the conceptual, synchronous, request/response |
I am open to any choice of the names, but we should specify them as separate technical names in the spec, so everyone uses the same names.. |
I’d like to apply Postel’s Law, and at least be consistent in what we put out. So, if we go for |
|
So we do want to specify the WebSocket binding? I'm perfectly fine to do so, we just decided before to not do it. Best implicit references for that decision: |
I’m not saying that! I’m fine with the wording in the specification that we don’t specify the WebSocket binding, but at the same time it’d behoove us to at least be consistent in our own implementations. The JSON Schema we publish as part of the delta protocol spec. is weird in that sense, because when used as-is it obviously prescribes a WebSocket binding. |
|
Shall we say "The 'spec' for WebSocket binding is whatever is inside the JSON schema"? |
Right now, there’s no link directly to the JSON Schema file in the delta section, so the status/role of it is anyway vague. We could make that explicit as: ”we’d do it this way”, and probably mention that |
Fixes #274