Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

exorelay: make responsibilities consistent #267

@charlierudolph

Description

@charlierudolph

Currently the go and javascript forms are very different in what they are responsible for / what is left in exoservice. I believe this was a result of the very different times they were written and

  • exorelay
    • go
      • interface to receive all message
      • interface to send a message
    • js
      • interface to register handlers for specific messages
      • interface to send a message and receive the first reply
  • exoservice
    • go
      • interface to register handlers for specific message
    • js
      • small wrapper around exorelay (very little code)

I think we should make this consistent so that exorelay does the following things

  • interface to receive all message
  • interface to send a message

Thus exorelay is left as the low level way of dealing with exocom for anyone that wants to build on top of it instead of using exoservice. This was the idea we went with in the go version


Then we can update exoservice with a few methods:

  • interface to send a message and receive the first reply
    • currently implemented in js exorelay
    • the helper function used in go exoservice does this but it is not available for use standalone
  • interface to register handlers for specific messages
    • currently implemented in js exorelay
    • currently implemented in go exoservice

If accepted, this would involve moving js code from exorelay to exoservice and adding a missing features to go exoservice.@kevgo @alexdavid @hugobho thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions