Open twilson63 opened 8 years ago
@chennigan brought a good point, what if one service fails when a batch is being performed.
maybe the batch request has two modes :
batch-all
orbatch-stream
If batch-all one fails all fail if batch-stream one fail the rest continue
Thoughts?
The other item I would like to propose is change the emit word from 'send' to 'data'
By changing it to data it should make the events readable streams, so that you could stream in events and stream out responses.
Proposal
I would like to propose a 2.0 version of palmetto flow that enables you to send batch of event messages in a single request. Which will all run and respond back as a batch of event message responses.
The idea is taken from GraphQL, but with palmetto flow it would be a lot less boiler plate code on the server and client and pretty much the structure of palmetto flow would not have to change. Basically the message type object is the only thing that has to change:
Instead of:
It might be something like:
This would enable palmetto flow to execute multiple requests in parallel and return the results in one response back.
It would give you a transactional batch system, that you could manage rollbacks in your palmetto flow service if needed.
But the big win is to keep your client components collocated with data models.
Any thoughts or comments?