2

I have developed a client (Eclipse) server (Spring Framework on Tomcat) application using Spring Remoting over HttpInvoker.

Some usecases need to transfer large files (>150MB) from server to client. Since we're on a 32Bit system on client side, I always get a Java heap size problem (althoough I set the Xmx to 1014 MB - but files could even be bigger).

My question is: Is there any way to do streaming over HttpInvoker or something else to solve this problem?

Philipp
  • 383
  • 5
  • 20
  • `HttpInvoker` isn't intended as a file-transfer interface, it's there for RPC calls. If you need to transfer large amounts of data, you really need to use a more suitable mechanism, i.e. hand-written IO streaming on client and server. – skaffman Jun 20 '11 at 15:03
  • 1
    Are there any proven frameworks for doing such io stuff? – Philipp Jun 20 '11 at 15:17
  • What about moving the parts that need to transfer large files, from RPC to [`REST`](http://en.wikipedia.org/wiki/Restful)? When you can download the file with a simple `GET`-request. – dma_k Sep 06 '11 at 19:36

1 Answers1

3

see rmiio : RMIIO

RMIIO is a library which makes it as simple as possible to stream large amounts of data using the RMI framework (or any RPC framework for that matter). Who needs this? Well, if you have ever needed to send a file from an RMI client to an RMI server, you have faced this problem. And, if you did manage to implement a basic solution, it probably threw an OutOfMemoryError the first time someone tried to send a 2GB file. Due to the design of RMI, this common and deceptively simple problem is actually quite difficult to solve in an efficient and robust manner.

you can use it standalone or over any other rmi framework such as httpInvoker.