-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RESTful Tasker #5
Comments
(linking to #2 and #4 (comment) for the sake of linking) My initial answer would be: any developer sufficiently crazy/skilled to use flor can write a tasker that leverages a HTTP client. That's easy for web services that respond (almost) immediately (200), that's a bit different for services that would answer later (202 maybe). The developer would have to implement a polling mecha or tell the service about some "reentry" point (flack backed or not). Too many variations, let them implement it themselves. But then I think about the simple cases where
Already providing that would cover 80% of the cases, and give inspiration to fellow developers to build specific stuff they'd need, let's say until 95%... Could we call it a "HttpTasker"? @northox what would go in the 80% for you? Is the snippet above inspiring? How would you write it? |
Well that would be cool/useful but for us, >80% requires a tasker that doesn't respond immediately thus blocking the workflow. We could do with a pulling method like you describe (get) but it would required looping and sleeping (ugly). A push to a flack-listener would be better. In #4 you said /message supports tasker reply message but I can only see handlers for launch and cancel. Is the intent to use this as a tasker listener? |
We could package the polling inside of the tasker
You are right, I have to implement it then so that the "push to a flack-listener" becomes a reality. |
@northox OK if I use https://github.com/nahi/httpclient as HTTP client for flor? It's well maintained and dependence-free. |
Sounds good to me. |
There's a need to have a RESTful tasker. Something that act as a transport layer between Flor and the real tasker. What I have in mind is to use Flack's API itself so it would be composed of two parts;
This ticket is about the latter. I think by default Flack could provide a configurable tasker that would know at which URL (RESTful service) to push a received task. Then, a listener would accept the response from the RESTful client and push back the task to Flor. @jmettraux I would like your input on this.
n.b. At a latter time, we could expose the same thing but through a pull mechanism.
The text was updated successfully, but these errors were encountered: