4 Replies Latest reply on Nov 18, 2003 3:52 PM by naimdjon

    transfer files with jms

    yonatans Newbie


      I would like to use jboss in my final project of career. I would want to build an instant messenger for a LAN with jms api. Architecture would be descentralized, and then my question is the following:
      -Is there anyway to transfer large files (about 400 Mb) over jboss server?
      sorry for this entry level and greetings from Spain.
      Thank you.

        • 1. Re: transfer files with jms
          Stephane Nicoll Master

          As far As I know, I would say yes an no.

          No because the message needs (AFAIK) to sit into memory before being persist by the PM
          Yes because if you have a powerfull machine with 2Go of RAM and you don't send 10 messages at the same time, it should work.

          What about sending the URL to the file in the message, rather than the file's content itself?



          • 2. Re: transfer files with jms
            Jochen Kressin Newbie


            currently we are trying to build a system which also transfers files. Here are our experiences:

            - You cannot transfer a file that large in one message, because it must first be loaded into the memory

            - We decided to split the files in chunks, send these chunks to the client, and let the client rearrange the file. This approach works, even with multiple clients requesting large files.

            - You cannot use transactions, which is a pity because sending one file in several chunks would be a perfect usecase for transactions. Please read this thread:
            http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= You have to play with High/MaxMemory mark in jbossmq-service to avoid out of memory errors with many clients.

            - Do not use hypersonic, because it is slow when it comes to persist messages. Remember, messages are not only persisted when they are persistent messages, but also when the server sends more messages than the clients can consume, i.e. when the message cache is full. We profiled JBoss and found hypersonic is a real bottleneck (at least in our architecture.)



            • 3. Re: transfer files with jms
              Elias Ross Master

              If you only send a few messages out, but they are very large, the File PM is pretty decent. On Solaris, it is really slow on their default file system. You also get better performance when persisting the messages on a different disk, especially if you are doing lots of logging.

              See the $JBOSS_DIST/docs directory for examples...

              You can probably contribute a few improvements to the JMS codebase to have things perform a little better with large messages.

              • 4. Re: transfer files with jms
                naimdjon Newbie

                isn't applet better approach for instant messaging?
                As far as security conserned you can use Java Cryptography Extension.