On 03.10.2017 14:58, Tanu Kaskinen wrote: > >>> Also, it's questionable why the list-handlers command is implemented >>> with the messaging API in the first place. It's core functionality, so >>> why is it not implemented using the normal introspection API? >> Two reasons: >> >> a) It's much simpler than using the introspection API > Ok, but didn't we agree earlier that the messaging API is only meant > for modules, and new core features shall be added using the existing > API conventions? The rationale, if you've forgotten it, was that it's > annoying for application developers if the core API uses inconsistent > conventions and introspection functionality needs to be searched from > two different places. > > I might accept it if you put the client-facing bits in the > introspection API, but use the messaging system behind the scenes. If > you want pursue that route, I'd like get an ok from Arun as well. This > is not only about the list-handlers message, it's about all future core > features. > > Another possibility is to deprecate the whole introspection API and > reimplement it using the messaging API, but you probably don't want to > take such a big project. > >> b) We should at least have one example in the code >> which shows how a message handler is implemented. > It's certainly good to have an example now so that we can discuss how > the message parameter serialization is supposed to work, but I don't > think we need to apply that example to master. I hope we'll have some > other example by the time 12.0 is released (IIRC, you plan to add a > message handler to module-loopback), but it's not a big deal if there > are no examples. > Finally I found some time to work again on the message patches. There is a third reason why I think getting the message handlers should be implemented using the message API: The message delivers information about the message API itself and the information should be accessible via that API. So is it OK if I keep the message handler implementation (provided that the handler returns a more "machine readable" format)? Or will you reject it?