drogus / bulk_api

MIT License
150 stars 7 forks source link

RESTfulness #2

Closed alexreisner closed 13 years ago

alexreisner commented 13 years ago

Great project! I'm wondering if you've considered making the interface RESTful. I'm guessing you have, and I'm wondering what the arguments against it are. If you consider /bulk/api an endpoint for managing BulkUpdate resources you could have:

This would allow different actions to be performed on different objects in the same request and avoid tying the HTTP method of the request to the action to be performed on objects. You could also set an :async parameter to false if you had a fast-running task and wanted the result status (error messages, etc) in the response to the original POST request. In fact I guess that would be necessary for non-background tasks.

Anyway, I'm curious what you think of any of this.

drogus commented 13 years ago

I have mixed feelings on such thing. It can be tricky to handle that correctly and I don't know if it will be commonly used. I doubt that bulk updates will last that long in general and if it's not the case in real life, I would not complicate code to handle that.

That said, if it becomes a problem one day, we can rethink that. I just think that this plugin is not yet ready for such things - not before people will test it on real apps :)

alexreisner commented 13 years ago

OK, that makes sense. Good plan.