should I use NIO between applet and servlet

Discussions

General J2EE: should I use NIO between applet and servlet

  1. should I use NIO between applet and servlet (2 messages)

    my client side is applet
    it send request to the server, write the Value Object to the servlet by
    ObjectOutputStream,
    the servlet read the Object, call the session bean then call DAO and do some
    DB operation.
    after that ,the server side write back a Object (vo) to the applet client by
    ObjectOutputStream.
    the client side read the object and display the data.
    MY question is :
    is it possible to use NIO to read and write the object when communicating between applet and servlet ?
    could it improve the performance of IO operation?
    (I'm sorry about my English)

    Threaded Messages (2)

  2. Hello;

    It was a couple of years ago when we tested this but the results should be the same. The fastest way to move data across is NIO - I believe it was about 4X faster than the java 1.3 IO and about 10X faster than RMI.

    We were testing moving large blocks of data like 1M. For a 1M byte array (byte []) we also found it faster to move it as a write(byte []) than a write(object). I don't remember how much faster but I think it was something like 2X. I remember being very surprised at the significant difference.

    - dave
  3. example[ Go to top ]

    could u give me some examples or documents?