-
Notifications
You must be signed in to change notification settings - Fork 262
Event subscribing bug #425
Comments
@YujiOshima - To fix this the plugin RPC client can verify the topic names to enforce the proper topics -- they are just |
@chungers In that way you can exclude illegal topic subscribe, but if the proper topic provided by event plugin partially overlaps, the method is not enough.
If you can agree this rule, I will show you some codes for discuss. |
@YujiOshima - I like how you referenced MQTT. I had originally thought about using it but I couldn't find a good embeddable broker. We basically need just something smaller (and not as featureful) for just the plugins on a single host, over unix sockets. For intra-cluster and inter-cluster pubsub beyond a single host, the plan is to provide simple 'repeaters' that is both a subscriber and publisher to republish events using MQTT or NATSD which the user can pick. An MQTT one would make a nice PR ;) Anyway, I hope you agree with me about adding validation checks in an interceptor and return http error code (eg. 404) for bad topics. This keeps layering clean and we can adopt whatever syntax that makes sense for specifying topics and we won't have to do any filters and checks at message delivery time. Using your example for topic naming, the timer plugin publishes to two topics
These are the rules:
So What do you think? |
@chungers Yes, topic validation is nice as it reduce workload of broker and make simple its process. Inter host is the next step that I am strongly interested in. At first, I will make spi/api conform above rules. |
@YujiOshima - Cool. I am glad the current design looks reasonable to you. I think it'd be very nice to have a repeater that can subscribe to some topics and then acts as a client to a MQTT server and publish. The repeater should not be crammed into the plugins. Instead, it can be a very small binary where the user can start up like:
The binary would then embed the MQTT client from the Eclipse project or something. Then the user only needs to set up a single MQTT server for the entire cluster and infrakit plugins can publish to that. This would make a very interesting case for running infrakit on every node in the cluster now... may be for health check /monitoring / whatever. Let me know if you would rather try something like this.... I can fix this issue with adding the validation via an interceptor of |
@chungers Will infrakit-event-relay be implemented as a plugin? It is considered that there is a problem with activating infrakit-event-relay by allowing the user to specify options for the following reasons.
Therefore, how about the following rules?
What do you think? |
I think the message relay should be a separate binary. It can expose its own REST api for adding new subscriptions. This could be the first of an 'app' that is built on top of infrakit infrastructure. An infrakit 'app' is an application that can talk to the infrakit plugins using the plugin api but itself listens on a port and offers a REST api for operations like adding subscriptions, etc. So if the user decides it's useful to stream all the infrakit events to something like ELK or MQTT or NASTD or Kafka then this would be the module to use. If MQTT isn't a good long term option, what do you think would be a good message broker to start? It'd have meet the requirements of
If you are interested in help building this relay we can iterate on that simple REST api for adding new subscriptions. What do you think? |
Although mqtt is concerned about acces control, redundancy etc., I think that it is not at the stage of discussing them. |
With regard to event subscribe, topics that is not subscribed are also delivered from the server.
For example,
/ timer / sec / 10
and/ timer / sec / 100
are also subscribed if I subscribe/ timer / sec / 1
.This is because go-radix does a string-level search that does not treat
/
specially.The text was updated successfully, but these errors were encountered: