NIO?

xing | 2005-08-09 03:10

I'm watching this project with great interest. The codebase is small and has all the modules one would need to build a great smtp gateway.

Is NIO used or planned to be used for all the socket/networking code? It appears not but can't be sure.

How about having jsmtpd sitting on framework such as MINA?

Just some thoughts.


jfpoux | 2005-08-10 21:42 |  Good suggestions

Hello xing,

Very interesting thoughts ;)

For NIMA, I don't know enough the framework yet, I need to play more with it.
For what I've seen and understood at this point :
- Concept is interesting. Separation of IO code from logic.
- It's not bug free, althought the maintainer seems to known what he's doing ;) (Trustin Lee = Netty ?)
- What's the overhead of MINA in terms of performances ? In terms of understaing Jsmtpd if it would rely on ?

I guess that for NIO you mean changing the current blocking model to a non blocking, with lighter use of threads. Yes, it's currently a problem for Jsmtpd. Each connection is dispatched to a single thread (for receiver and sender).If you increase to much the number of threads, performances will drop. Maybe it's a good idea to switch to NIO.

Changing for one of theses solutions involves a re-think of Jsmtpd, and then a lot of (re)code. Unfortunatly, I'm involved time-consumming professionnal project (a portal engine, that should be fully released at the end of the year). I can't address the problem right now, but it's planned. I'll keep theses good ideas in mind.

I've created a ticket in the project manager. Tell me if it sums up what you're thinking. See it at http://www.taldius.net/projects/jsmtpd/ticket/38



login or register to post comments

xing | 2005-08-11 08:30 |  exactly...

JF Poux,

That sums it up. =) MINA is headed off by the same guy/group who did Netty1/2. Netty is getting deprecated and the developer is pushing everyone to MINA. Most likely becoming an apache product allows the dev team there more funding as well as exposure.

I love event-based, aynchronous, multiplexing, whatever marketing term you call it, based network apps since they scale tremendously.

It's the same reason I don't use apache but www.litespeedtech.com for my heavy duty web server.

Some big commercial MTA such as IronPort, Port25, StrongMail, all use single threaded async model, as much as possible, to get performance.

From talking to developer of the litespeed web server, for true aync to work, nio libraries is just one small part to the equation since all your app stages from packet in to packet out must not block: it's one thread after all. Much harder to develope since you have to divide code into stages/states..I think this is where frameworks such as MINA would help to make life easier.

I'm not a heavy developer but I sure love to use fast and quality apps. =)



login or register to post comments
Navigation

Active forum topics

Recent comments

User login