简体   繁体   中英

How is RESTful web webservices for large responses

I am planning to implement RESTful web services to return large XML response (upto 50MB), is it ideal for such requets or SOAP JX-WS better? Do I need to use some other protocol to make it more robust when it comes to marshalling/unmarshalling?

REST uses a regular HTTP get. HTTP get is stable for very large files. Downloading a 50MB file (or other content) is done quite regularly over HTTP.

You only need to make sure that there are not any other delays due to processing in the middle that would cause the connection to time out (usually ~2 minutes). This is unlikely to be a problem.

If you use Restlet you can stream data of any size back to the client using ReadableRepresentation (I'm doing gigabytes). It takes a bit of effort but it works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM