-
Notifications
You must be signed in to change notification settings - Fork 22
Description
The current hook system is very limited, especially that the hooks do not cover all the parts of the system and they are scattered all over the place, without any pre- and post-hooks. Another issue is that the current hooks are not added by dependency injection, rather manually, which means that if a new component is added, the hook system and hence the protocol buffer files should be updated, which is tedious and inextensible.
For example, currently there are three hooks for traffic passing through the system:
OnTraffichappens as a notification to plugins that traffic is going to pass through, i.e. data is incoming.OnIngressTraffichappens when data is received from the client, aka.request.OnEgressTraffichappens when data returned from the DBMS server is being sent back to the client, aka.response.
In the above example, if a caching plugin is added, it needs to intercept incoming data, and possibly prevent any request from being sent to the DBMS server by returning the cached value to the client. This is not possible right now.
The hook system should be (re)designed to be more generic, so that new components can register new hooks, and those hooks can be immediately accessible to plugins right away without changes to the protocol buffer.
- Intercept traffic #89
- Make hooks more generic with generic gRPC methods #107
- Register custom hooks when initializing components - made possible via:
- Add hooks for all parts of the system, not just on object creation and on traffic: they will be added on-demand.
- Add relevant pre- and post-hooks: not needed anymore after the introduction of
OnHookand custom hook names. - Add a hook to allow plugins to register to the pool and its events #36
- Add a hook to allow plugins to define their custom pool and client config #37
Metadata
Metadata
Assignees
Labels
Type
Projects
Status