FriendsOfSymfony / FOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony
http://symfony.com/doc/master/bundles/FOSRestBundle/index.html
MIT License
2.79k stars 708 forks source link

Supporting HTTP Multipart Batched Request #1085

Open SimonSimCity opened 8 years ago

SimonSimCity commented 8 years ago

I lately heard about how to batch many requests up to one and found the issue #603, that just was a bit undescriptive ...

This is a breef introduction about what is meant by that: http://jonsamwell.com/batching-http-requests-in-angular/#what_is_http_batching

I found some further information about that on OData (http://www.odata.org/documentation/odata-version-3-0/batch-processing/), Google Cloud Storage (https://cloud.google.com/storage/docs/json_api/v1/how-tos/batch) IETF.org (https://tools.ietf.org/id/draft-snell-http-batch-00.html, https://tools.ietf.org/html/draft-snell-http-batch-01) and an AngularJS plugin (https://github.com/jonsamwell/angular-http-batcher)

The question now: Is it an interesting topic to have it in here? As it's thought for REST services ... Or would it be better to put it directly into the Symfony2 project?

EDIT:

Just found out that .NET seems to have something built in to support that ... https://msdn.microsoft.com/it-it/library/system.web.http.batch.defaulthttpbatchhandler%28v=vs.118%29.aspx

EDIT2:

Here someone asked for a PHP library to parse the one request into multiple - but there does not seem to be the answer for that question right now ... :disappointed: http://stackoverflow.com/questions/23721797/handling-a-batch-rest-request-in-php The AngularJS plugin seems to split the requests in the request-content like multipart mails - but I don't know of other extensions.

lsmith77 commented 8 years ago

There are several tickets related to multipart: https://github.com/FriendsOfSymfony/FOSRestBundle/search?q=multipart&type=Issues&utf8=✓

Part of the issue is that Symfony core's Request class also not really support multipart all that nicely. Ideally we would improve the support for multipart in Symfony 2.8 and leverage this here.