You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Metacom packet structure would come in handy everywhere where there is a need to build communication over messages:
For example:
bus using redis streams
communication with workers using postMessage
and basically anywhere where you have only messages and want to build RPCs, events, or streams over it.
Describe the solution you'd like
Extract protocol code to lib/protocol.js, export it from metacom.
Example implementation: mprudnik@c2c6cc1
It also can be reused in metacom itself: mprudnik@c08692e
Additional context
As a side effect, it can simplify and make metacom code more readable and maintainable - protocol code is in one place, no need to check Contracts.md and it can be covered with tests (as in the first example).
It also simplifies integration with systems where you can't use metacom as a package. For example, using k6 for API load testing you can write scripts in JS, but it's not a node env and there's no module resolution like in node. Having metacom protocol serialization/deserialization in one file you can copy/past it and integrate the rest with what is exposed by k6 and use to load test metarhia applications.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Metacom packet structure would come in handy everywhere where there is a need to build communication over messages:
For example:
redis
streamspostMessage
and basically anywhere where you have only messages and want to build RPCs, events, or streams over it.
Describe the solution you'd like
Extract protocol code to
lib/protocol.js
, export it from metacom.Example implementation:
mprudnik@c2c6cc1
It also can be reused in metacom itself:
mprudnik@c08692e
Additional context
As a side effect, it can simplify and make metacom code more readable and maintainable - protocol code is in one place, no need to check Contracts.md and it can be covered with tests (as in the first example).
It also simplifies integration with systems where you can't use metacom as a package. For example, using
k6
for API load testing you can write scripts in JS, but it's not a node env and there's no module resolution like in node. Having metacom protocol serialization/deserialization in one file you can copy/past it and integrate the rest with what is exposed byk6
and use to load test metarhia applications.The text was updated successfully, but these errors were encountered: