Thanks. I need read more about your source code and see if it helps. Great
job.

On 8/22/07, Mehmet D. AKIN <[EMAIL PROTECTED]> wrote:
>
> Hi mat,
>
> Actually it is not faster than any hand made protocol encoder -
> decoder, since it has the overhead of reflection. But most of the time
> the problem is not the encoding and decoding of streams, it is usually
> I/O or processing (not decoding or encoding) of messages that causes
> the performance problems. The aim of library is to make life easier if
> you have lots of different types of messages to encode and decode.
>
> But it is fast enough for most applications. It can encode or decode
> more than 100.000 simple and small messages per second on an average
> box. You should try it yourself to see whether it is appropriate for
> your application.
>
> As for the endian problem, it also contains Little endian data streams
> for the job.
>
> There is also a mina example in the samples directory.. It is not
> complete, but gives an idea for use of javastruct for network
> protocols.
>
> Mehmet
>
> On 8/21/07, mat <[EMAIL PROTECTED]> wrote:
> > Thanks. I remember Trustin mentioned your project once in this forum. I
> did
> > some research last night before I saw your thread. :) BTW, how do you
> handle
> > Big Little Endian thing in your project? The examples and tutorials are
> too
> > simple to understand. and why you consider it is fast?
> >
> > On 8/22/07, Mehmet D. AKIN <[EMAIL PROTECTED]> wrote:
> > >
> > > On 8/21/07, mat <[EMAIL PROTECTED]> wrote:
> > > > 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?
> > > >
> > > [snip]
> > >
> > > well there is a small library I am working on, It helps protocol
> > > programmers by allowing java classes to be somewhat treated as C - C++
> > > structs. You might want to check it, it uses annotations and
> > > reflection and reasonably fast.
> > > I am still working on it so there is no guarantee that its interfaces
> > > wont change, but it works, and there are examples on the site (an
> > > adobe color book reader-writer), check the wiki pages of project.
> > >
> > > site is:  http://code.google.com/p/javastruct/
> > >
> > > Mehmet
> > >
> >
>

Reply via email to