2 Replies Latest reply on Sep 8, 2009 8:59 PM by Raul Montes

    Serve files in Jboss

    Raul Montes Newbie


      We have a deployed app in a Jboss Application Server that, among other things, can store files (that users later may download). We have a loadbalancer (Apache) and N Jboss AS servers in default mode (not cluster, but we want to move to cluster mode in the near future).

      Today, this files are stored in the database as blobs, but because scalability issues we want to move the files out of the database. I'm very new to Jboss, so I was wondering if somebody knows a recommended way of doing this taking into account that eventually we could have many servers for file serving too. I know Jboss AS and JEE is a big world so any directions would be really appreaciate.


        • 1. Re: Serve files in Jboss
          Peter Johnson Master

          Have a central system that holds the files. It can be one of the systems running JBoss AS or a separate system. Mount the drive/directory holding the files onto each system running JBoss AS. Then the app(s) can store the uploaded files on the central system, and each app has access to the files.

          • 2. Re: Serve files in Jboss
            Raul Montes Newbie

            Thanks, PeterJ, that's a good suggestion. But the problem I see is if I want two or more servers to hold and serve the files (for scalability and redundance).

            The best idea I have until now is that the web app running in Jboss AS stores and retrieves the files from another service (running eventually on more than one server) via RMI or something like that, and expose that service using JNDI. However, it could have too much overhead (in the solution you told me, network transfers are almost the only overhead).

            I'm not an expert neither in RMI nor JNDI so I'm not sure of the technnical feasibility of this... I must learn more about it yet.