Extensions: Context structure and getter / setters #375
Replies: 2 comments 16 replies
-
My main concern is that the context should IMO be shareable across each plugin, and by that I mean I would even go as far as requiring any type within the context extensions to implement Serialize / Deserialize. This wouldn't have an impact for Rust extensions / plugin builders, since they just wouldn't need to call serialize / deserialize functions, but it would force everyone to make their structures "interop ready" in a sense. The main reason why I think this would make sense is because I believe we're building a rust router for everyone, and that means rustaceans, but also companies that aren't used to writing rust, and I want to make sure we always have them in mind when building extensibility and extensions. Rust plugins would probably be faster, and we would skip a Serialize / Deserialize step which would be better perfomance wise, but it would still allow people to write their own plugins and "get things done". |
Beta Was this translation helpful? Give feedback.
-
I'd like to know the use case for context sharing across plugins. Plugins should generally not be aware of each other, so should not need to communicate. If we can think of good use cases though then that's another matter. |
Beta Was this translation helpful? Give feedback.
-
This discussion will hopefully allow us to iterate on the various tradeoffs to be made, while we're designing a Context and Extensions.
Let's share the requirements we have here, and have this discussion lead to an ADR.
I have written a strawdog proposal for a context_ext model that can be found here:
https://github.com/o0Ignition0o/context_ext_strawdog/blob/main/src/main.rs
This is of course a very rough draft, but I believe it outlines how i envisioned getters / setters and the ability for Rust and non rust languages to interop with it
Beta Was this translation helpful? Give feedback.
All reactions