This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
Why Explorer uses WAMP to communicate between backend and frontend? #938
Replies: 1 comment 2 replies
-
Thanks for detailed explanation! Pub/sub and request/responseI believe pub-sub and request-response should be decoupled in current state of the project, as extra
Request/response solutionI don't see no need to reinvent the bicycle, let's just use plain REST over HTTP. Pub/sub solutionsConsidering pub-sub requirements, I'll dig into solutions offered in open source at the moment.
I hope we can find a library that can fit in this pretty simple list, but if not - it doesn't look like a big challenge to write one. Please let me know if I forgot to mention something significant. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There were the following requirements:
What was sacrificed:
Transport Layer
There are three transport layers available in modern web browsers: HTTP, Websocket, Server-sent Events (SSE)
HTTP
Pros:
Cons:
Websocket
Pros:
Cons:
SSE
Pros:
Cons:
API Layer
Given the things mentioned above, and the wish to keep the backend code under a single umbrella (I don't feel it is a requirement anymore), I was looking into various solutions out there: OpenAPI (Swagger), gRPC, Thrift, Cap'n'Proto, ZeroC (ICE), JSON-RPC, GraphQL, and WAMP-proto.
Future Considerations
I feel that these days, we don't necessarily need a single backend service for request-response and pub-sub. We can afford going with separate implementations for those, and that will relax requirements for pub-sub, where we can even consider having a barebones websocket server that will just publish events with
kind
field in it, so the frontend can decide how to handle those.Beta Was this translation helpful? Give feedback.
All reactions