Skip to content
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

Use strong message schema #117

Open
2 of 3 tasks
marein opened this issue Apr 19, 2022 · 0 comments
Open
2 of 3 tasks

Use strong message schema #117

marein opened this issue Apr 19, 2022 · 0 comments

Comments

@marein
Copy link
Owner

marein commented Apr 19, 2022

A strong message schema wasn't the first priority when building this playground project. Contexts currently communicate using JSON messages. They don't validate the incoming messages against a schema, nor do they use code generation tools or manually typed types for strong typing and the autocomplete feature of IDEs. There're multitude of options like Protobuf and JSON Schema that work cross platform. Manually typed types are working only if there's only one language, because of the overhead of transporting them to another. Although everything is currently written in PHP, platform independence is a requirement, as future features may be written in a different language.

@marein marein self-assigned this Jan 5, 2024
@marein marein linked a pull request Jan 5, 2024 that will close this issue
@marein marein removed a link to a pull request Jan 7, 2024
marein added a commit that referenced this issue Jan 10, 2024
All messages from the chat context now use protobuf #117.

Additional changes:
* Stop publishing the event ChatInitiated as there're
currently no consumers.
* Route messages to browser based on streamId.
* The SSE protocol changes to eventName:eventPayload
instead of embedding the event name in the payload to
avoid unnecessary decoding and encoding of JSON.
marein added a commit that referenced this issue Jan 12, 2024
All messages from the identity context now use protobuf #117.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant