Implementing Socket Network Module of Message Middleware using Socket Polling Model in Java

K.-M. Sohn, T.-G. Kang, and D.-J. Son (Korea)

Keywords

multi-thread, socket polling, select(), java

Abstract

Typical multi-thread programming in server applications makes its codes simple but the overhead managing many threads becomes a burden on a CPU as the network connections increase. On the other hand, socket polling takes less overhead on connections but it is more complicated to implement compared to the former case. In this paper, we compare the architectures of three socket programming models and evaluate the performances by simulating under various conditions aimed to the network module of a java message middleware. Three models presented in this paper are typical multi-thread model, socket polling with single-thread handler model, and socket polling with multi-thread handler model. We suggest the socket polling with multi-thread handler model implemented using JDK 1.3.1. It shows no less or better performance over the typical multi-thread model. Furthermore it has the advantage that can hold more connections beyond the thread pool capacity. With this result, we adapt it to the network module of M oIM Message server.

Important Links:



Go Back