Skip to content

feat(middleware): mechanism for extending gateway capabilities #34

@TillaTheHun0

Description

@TillaTheHun0

Background:

Original conversation started on #27.

There is a desire to extend the gateway core functionality, adding new capabilities, for example like those described in ANS-101, ANS-108, and others. However it's also desirable not to have to modify the gateway core in order to do so. Firstly, because that would require gateway runners to modify core code in order to add capabilities, and secondly, it makes the core less stable and secure.

Problem:

We'd like a solution for adding gateway capabilities that is:

  1. Self-encapsulated - a capability-implementing module ought to be self-contained, and only have access to do things that core allows it to do
  2. Allows for sandboxed experimentation - there ought to be a way to add different capabilities and functionality, without affecting other gateway instances.
  3. Good developer experience - gateway runners ought to be able to add capability-implementing modules to their gateway instances seamlessly, ideally without having to write code.

Additional Notes:

A middleware-based solution seems to be a top contender, as it is by nature self-encapsulated.

I proposed a potential solution based on middleware in #27 (comment) that satisfies 1 & 2 above. As far as 3, a natural extension of my solution could use CLI args to trigger dynamically pulling middleware-implementing code from the internet and to bootstrap the gateway with that middleware, on startup. I'd be happy to implement this in a fork, if it's easier to envision that way.

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