DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Server programming

  1. #1
    Tobias Heintz Guest

    Server programming


    I am intending to write a server in Java which will be connecting three or
    more programs running on different machines. Speed is very important here,
    since there can be very many requests in a short time.
    My question now is: Which is the most efficient (fastest) way to connect
    threads with each other ?
    I will have one thread receiving the incoming requests and then a couple
    more processing them. Should i use PipeInputStreams and PipeOutputStreams,
    or should i just call a function in the processing thread and pass the data
    as an argument ? Another way would be to store all incomping data in a Vector
    (or ArrayList) and then invoke the notify() method on the thread to show
    it that new data is available...
    Any help would be greatly appreciated !

    Thanks
    Tobi

  2. #2
    Carlos Saltos Guest

    Re: Server programming


    Hi Tobias !

    I will recomend Java RMI for that ... take a look at http://java.sun.com/docs/books/tutorial/rmi/index.html
    ... and of course if you need a strong structure you can use JMS and EJB
    on J2EE Applications Servers on a clustering, but as you mention, you are
    concern about the performance, so Java RMI will do. On the other hand think
    that performance is not all and use a solid foundation like J2EE could be
    better and easier.

    Best regards,

    Carlos Saltos
    Infoobar
    IT Manager
    http://www.infoobar.com/

    "Tobias Heintz" <cybot2000@yahoo.de> wrote:
    >
    >I am intending to write a server in Java which will be connecting three

    or
    >more programs running on different machines. Speed is very important here,
    >since there can be very many requests in a short time.
    >My question now is: Which is the most efficient (fastest) way to connect
    >threads with each other ?
    >I will have one thread receiving the incoming requests and then a couple
    >more processing them. Should i use PipeInputStreams and PipeOutputStreams,
    >or should i just call a function in the processing thread and pass the data
    >as an argument ? Another way would be to store all incomping data in a Vector
    >(or ArrayList) and then invoke the notify() method on the thread to show
    >it that new data is available...
    >Any help would be greatly appreciated !
    >
    >Thanks
    >Tobi



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center