Posts Tagged ‘Mina’

Scalable NIO Servers - Part 3 - Features

Monday, April 13th, 2009

We have now analyzed various open source NIO servers for performance and memory consumption.  Per my quick, initial testing, only Grizzly, Mina, and Netty were comparable. Now, let’s analyze features and how each of these frameworks use them.  For my purposes, I am going to be looking into the following features that I personally value most important for my project:

  • Intercepting Pattern (ie: Filters)
  • Access to high level, yet effcient, buffers rather than lower level byte buffers
  • Protocol independence and abstraction
  • Socket independence and abstraction
  • Custom protocol support
  • POJO support for encoding/decoding
  • Custom thread model support
  • HTTP support
  • User documentation (user guide, javadoc, source code, examples

(more…)

Scalable NIO Servers - Part 2 - Memory

Thursday, April 9th, 2009

As my ongoing investigation into picking a suitable and highly scalable server for my future applications, today I will be talking about memory.  Yesterday, we discussed performance and saw in general how Netty and Grizzly compared to one another.  Today, we will further extend that by comparing memory usage footprint at start, over time, and how the memory usage compares as a trend with respect to garbage collection.  As GC is one of the biggest culprits of performance, the more efficient the server at conserving memory, the better the performance.  So, without further ado, let’s get to the testing.

(more…)

Scalable NIO Servers - Part 1 - Performance

Tuesday, April 7th, 2009

As a continuation of evaluating an NIO server for my iPhone game, I started with looking at pure performance. First, the following links provide already existant benchmarks:

I took my own samples and quickly ran some basic tests as well to just get a really rough idea.  Note that these metrics should be taken with a large grain of salt as they do not attempt to optimize any of the test libraries and the clients are all run in traditional threads on non-server class machines alongside the actual servers.  Thus, these tests are quickly CPU bound on the client.  The idea is to just get a very rough estimate to compare alongside the above tests.

That point aside, my test basically creates a echo server and echo client.  It then starts up X simultaneous threads that push a simple ‘testing’ string back and forth to the server as fast as it can.  The end result is the time it takes to send a message and receive the echo in milliseconds.

(more…)