The reason why I raised this thread is: recently I am really bothered with
following issue.

My mina component has to connect to a legacy server written in C++. C++
server just simply sends out the struct as a message. I think for a C++
program it is just simple return the struct pointer and use each field.
However, to my java program that is a disaster(also really lower the
performance). I have to use all the system.arraycopy to make up each
field.(Actually it causes OOM). I don't know if you guys ever faced this
kind of problem. How to solve it?


On 8/11/07, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> when guessing relative performances of Java/C++ on a network
> environment, please keep in mind that data processing will be
> processed orders or magnitude faster than simple network handling by
> the underlying layer. Thinking that Java is slower than C++ to handle
> messages on a network based application because it does not have
> pointers is out of base.
>
> FYI, I have tested our LDAP server on my laptop, sending Search
> requests through MINA (Apache Directory Server is based on MINA, 1.0.3
> version), and I got something like 5000 req/s (a request is around
> 1kb), assuming that almost all the time is spent internally to the
> server itself, not in the MINA layer. Btw, LDAP messages are binary,
> but that does not mean it's easier to decode them in C/C++ than in
> Java (I would say that the complexity is exactly the same for both
> languages).
>
> I don't want to start a flame war, but I encourage anyone who want to
> compare Java and C++ to compare things that are comparable, and not
> blind guess what can be slow or fast in both languages.
>
> My 2cts
> Emmanuel
>
> On 8/11/07, mat <[EMAIL PROTECTED]> wrote:
> > Actually the windows IOCP server is written in C++ and it is running on
> a pc
> > server. I believe the reasons why Java can't reach that performance
> > sometimes due to lack of structure(pointer). I find it is really
> cumbersome
> > job to decode a binary message in Java. I don't know if you guys have
> better
> > solution to decode the binary format and manipulate the each field in
> the
> > binary message.
> >
> > On 8/11/07, Michael Grundvig <[EMAIL PROTECTED]> wrote:
> > >
> > > I don't have the exact numbers but I know on a big Linux box (8
> > > processors,
> > > 8 gb ram) with a switched gigabit backbone we have seen greater then
> > > 45,000 - 50,000 messages per second sustained. Ultimately the problem
> > > becomes a matter of garbage collector churn rather then IO overhead.
> On
> > > Windows machines we could get only to a fraction of that. We believe
> the
> > > underlying I/O differences between Windows and *nix become really
> obvious
> > > when you get to higher message counts.
> > >
> > > Michael
> > >
> > > ----- Original Message -----
> > > From: "mat" <[EMAIL PROTECTED]>
> > > To: "dev" <[email protected]>
> > > Sent: Friday, August 10, 2007 11:24 AM
> > > Subject: Mina throughput
> > >
> > >
> > > > Does anyone have the throughput test by raw socket communication
> > > > (keep-alive
> > > > mode)? My colleague wrote a windows IOCP server whose throughput
> could
> > > > reach
> > > > 1.8m/sec. (5000message/sec in intranet).
> > > >
> > >
> > >
> >
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>

Reply via email to