Implementing SEDA with Apache MINA

September 23, 2008

SEDA (Staged Event Driven Architecure) breaks apart from the traditional thread-pool appraoch of Code Design. While experimenting with implemeneting a MINA based Server, decide to use SEDA architecture. SEDA and MINA have great documentation, so will be jumping straight to the implementation.

SEDA can be implemented in MINA by adding Executors in Filter chain. 

Implementing SEDA using MINA

Implementing SEDA using MINA


From the figure above, by adding Executor in the FilterChain between the subsequent logical processing steps, we get the SEDA model in MINA.

Multiple such stages can be created and the MINA shall deliver the message to next stage via the executor implementation, thereby eliminating the blocking thread processing.

What is Apache MINA?

September 11, 2008

Apache MINA (Multipurpose Infrastructure for Network Application) is an open source java network application framework. MINA is can be used to create Scalable, high performance Network applications. MINA provides unified API’s for various transports like TCP, UDP, Serial communication, In-VM pipe. It also makes it easy to make an implementation of custom transport type. MINA provides both high-level and low-level network API’s.

Application Structure


MINA based Application Architecture

MINA based Application Architecture

From the figure above, User application interacts with MINA API’s, shielding the User application from Low level IO details. MINA internally uses IO API’s to perform the actual IO functions. This makes it easy for the Users to concentrate on Application logic and leave the IO handling to Apache MINA.


  • Unified API’s for various transports (TCP/UDP etc)
  • Provides high/low level API’s
  • Customizable Thread Model
  • Easy Unit Testing using MockObjects
  • Integration with DI frameworks like Spring, Google Guice, picocontainer
  • JMX Manageability


Apache MINA

– Home Page of Apache MINA