apigee-127 / bagpipes

Less code, more flow. Let's dance!
MIT License
47 stars 30 forks source link

Operational transparency and control #11

Open theganyo opened 8 years ago

theganyo commented 8 years ago

Issue #10 suggests that Bagpipes needs to have more flexibility in control and that we should consider at least some kind of notification / callback / event for pipe complete.

Going beyond that, it would be extremely useful to extend this beyond simple notifications to management functions that allow control of the process for things like stepwise control and value inspection for tracing and debugging as a pipe executes.

osher commented 8 years ago

I think that pipe fittings are implementation details of API, and in the end of it we should adhere to how API look from the outside and the common practices that come with that thinking.

In our days - it says one of two things: a callback, or a returned promise. I'm not a fan of promises, but every callback API can be promisified thanks to myriad of solutions that do it, so I'll stick to callbacks.

What I mean is that our API should make it as easy and streight-forward as possible for our users to feature for their users this conventional APIs: All of our users will expect a callback or will return a promise from their facade layer. So lets make handling that repetitive task a part of the service bagpipes provides

theganyo commented 8 years ago

I agree. A simple callback-based model would be useful.