Processes or Data – Batching
Below is an entry that I delayed posting for approximately a week:
Tim Ewald has a great post that questions using REST-based architectures to handle process-driven operations. I think it’s a very valid question and one that I have to deal with daily. I also think people who promote ROA never really have great examples to cover these situations. Certain operations (in my opinion) do not map “cleanly” to ROA. It’s easy to map the creation of a single order using ROA, but what about when you want to “mass create” or “interface” hundreds of orders in a single interaction i.e. do things in batch – which a lot of integrators require? What is the resource at this point? If someone could map that to a RESTful interface for me, I’d be interested to see it.
I like he have definitely seen a variety of places where using ROA is definitely the way to go, but I think there are definitely situations where MOA (message-oriented architecture) just makes more sense. Distinguishing between the two is another challenge on its own but I think the interaction model and the nature of the “resource” plays a huge role in decision making.
Wait long enough and you’ll get answer. Last night (thanks to Stefan Tilkov) I came across James Snell’s post on batching and truth be told, I find it intriguing. I am not very familiar with the PATCH verb and will have to take a look at it. This does come across as an elegant solution because existing state machines/resources/links that already exist for non-batch operations can be leveraged. However, I do think the underlying implementation has to be smart from a links traversal angle as performance gains may be lost.
If you have any thoughts, let me know. This is definitely something for me to ponder….