crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Meta API for shared registrations and concurrency / queued calls #1110

Open OOPMan opened 7 years ago

OOPMan commented 7 years ago

I was looking at the concurrency feature of shared registrations and was wondering if there is some way to hook into this beyond the current behaviour.

For reference, I was reading the documentation at https://github.com/crossbario/crossbar-examples/tree/master/scaling-microservices

While the concurrency and queuing features seem very useful and I shall probably be making use of them I was wondering if there are any meta-events/procedures associated with this system.

As an example of what I have in mind consider the following workflow:

  1. Call is made to end-point URI that triggers the max concurrency (Assume this end-point is not using queuing)
  2. In addition to raising the concurrency reached exception an even is emitted to a specific URI that includes the details of the caller that hit the concurrency limit
  3. A custom component subscribed to that event URI uses the details to make a note in a data storage system of some kind and does a check to determine if the caller that triggered the limit has been consistently hitting concurrency limits. If so, the component disconnects their session and instates a temporary block on their attempt to reconnect (Assume the session was connected via a non-anonymous authentication scheme)

Does this feature seem like it might be useful?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/46321728-is-there-a-means-to-hook-into-the-concurrency-queuing-system-for-rpc-end-points?utm_campaign=plugin&utm_content=tracker%2F462544&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F462544&utm_medium=issues&utm_source=github).
oberstet commented 5 years ago

There is no such thing currently, but yeah, as you hint at, at least 2 things could make sense IMO:

and similar for call queuing (which crossbar also supports)