nserver contributed by Victor Salaman

View: New views
8 Messages — Rating Filter:   Alert me  

nserver contributed by Victor Salaman

by Alejandro Revilla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FYI, I've just added a NIO based server contributed by Victor Salaman to
jPOS-EE opt directory (see http://jposee.googlecode.com) and
http://jpos.org/jposee/jPOS-EE.pdf for general information about
jPOS-EE.

I didn't test it yet, but as always, reading Victor's elegant code is
nice and a learning experience, so I encourage you to review.

--Alejandro


RE: nserver contributed by Victor Salaman

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Great, Thank you Victor!

 

I'll try to do some testing with this.

 

David Bergert, CISSP, CISA, CPISM/A

 <http://www.paymentsystemsblog.com/> www.paymentsystemsblog.com

 

From: jpos-dev@... [mailto:jpos-dev@...] On Behalf
Of Alejandro Revilla
Sent: Tuesday, March 03, 2009 6:49 PM
To: jpos-dev@...
Subject: [jpos-dev] nserver contributed by Victor Salaman

 

FYI, I've just added a NIO based server contributed by Victor Salaman to
jPOS-EE opt directory (see http://jposee.googlecode.com) and
http://jpos.org/jposee/jPOS-EE.pdf for general information about
jPOS-EE.

I didn't test it yet, but as always, reading Victor's elegant code is
nice and a learning experience, so I encourage you to review.

--Alejandro





[Non-text portions of this message have been removed]


Profiler changes

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

jpos r2704:  I made a few changes to the profiler, it should be backwards
compatible; I wanted to have access to the ms values for each event of the
profiler.

 

So for instance: if we have a profiler such as:

 

   <entry key="PROFILER">

        <profiler>

          open [2/2]

          parse-request [7/9]

          create-tranlog [3/12]

          populate-tranlog [1/13]

          create-request [0/13]

          query-host [17/30]

          prepare-response [2/32]

          close [18/50]

          send-response [1/51]

          end [56/56]

    </profiler>

 

 Then we can interrogate the time it took for each event:

 

 e.g. if we want to log the external duration of the query-host step:

 

      Profiler prof = (Profiler) ctx.tget("PROFILER");

      ProfilerEntry profEntry = prof.getProfilerEntry("query-host");

      if (profEntry != null){

          tl.setExtDuration (profEntry.getDuration());

      }

 

Regards,

 

 

David Bergert, CISSP, CISA, CPISM/A

 <http://www.paymentsystemsblog.com/> www.paymentsystemsblog.com



[Non-text portions of this message have been removed]


Re: nserver contributed by Victor Salaman

by Victor Salaman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dave:

I've had it production for a couple of days without a single problem. Let me
know when you test it to see if it can be enhanced in any way.

-V


>  
>


[Non-text portions of this message have been removed]


Re: nserver contributed by Victor Salaman

by chhil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Victor,
Thanks for adding the NIO server.
It would be nice know why you decided to add this, so people on the list
can consider using it.

-chhil

On Wed, Mar 4, 2009 at 6:09 PM, Victor Salaman <vsalaman@...> wrote:

>   Hi Dave:
>
> I've had it production for a couple of days without a single problem. Let
> me
> know when you test it to see if it can be enhanced in any way.
>
> -V
>
>
> >
> >
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]


Re: nserver contributed by Victor Salaman

by Victor Salaman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Murtuza:

NServer is a high performance NIO server.  I wrote this for myself, for some
specific needs of my environment (better handling of keep-alives to each
connected end-point and minimize thread usage), so one day I asked Andy
Orrock and Dave Bergert if anyone would find this useful and they said that
a lot of people would, so I submitted it to Alejandro for review.

Main Features:

* Based on Apache MINA.
* It uses Java NIO allowing a great number of simultaneous connections
without 1:1 threading.
* Completely asynchronous architecture, meaning that if there's no data
available, we won't wait for it.
* Configurable keep alive handling. An example is provided where an 0800
echo message is sent to the connected endpoint.

Drawbacks:
* Does not use the traditional ISOChannel(s). Instead, it uses the concept
of protocol handlers, which at the moment are kind of slim, though it's very
simple to port an ISOChannel into a protocol handler.


On Wed, Mar 4, 2009 at 9:29 AM, chhil <Chillum@...> wrote:

>   Hello Victor,
> Thanks for adding the NIO server.
> It would be nice know why you decided to add this, so people on the list
> can consider using it.
>
> -chhil
>
>
> On Wed, Mar 4, 2009 at 6:09 PM, Victor Salaman <vsalaman@...<vsalaman%40gmail.com>>
> wrote:
>
> > Hi Dave:
> >
> > I've had it production for a couple of days without a single problem. Let
> > me
> > know when you test it to see if it can be enhanced in any way.
> >
> > -V
> >
> >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]


RE: Profiler changes

by David Bergert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Opps, My example below is wrong. It should be:

 

       Profiler prof = (Profiler) ctx.tget("PROFILER");

-      ProfilerEntry profEntry = prof.getProfilerEntry("query-host");

+      Profiler.Entry profEntry = prof.getEntry("query-host");

 

       if (profEntry != null){

           tl.setExtDuration (profEntry.getDuration());

       }

 

 

David Bergert, CISSP, CISA, CPISM/A

 <http://www.paymentsystemsblog.com/> www.paymentsystemsblog.com

 

From: David Bergert [mailto:dbergert.ng@...]
Sent: Tuesday, March 03, 2009 11:37 PM
To: 'jpos-dev@...'
Subject: Profiler changes

 

jpos r2704:  I made a few changes to the profiler, it should be backwards
compatible; I wanted to have access to the ms values for each event of the
profiler.

 

So for instance: if we have a profiler such as:

 

   <entry key="PROFILER">

        <profiler>

          open [2/2]

          parse-request [7/9]

          create-tranlog [3/12]

          populate-tranlog [1/13]

          create-request [0/13]

          query-host [17/30]

          prepare-response [2/32]

          close [18/50]

          send-response [1/51]

          end [56/56]

    </profiler>

 

 Then we can interrogate the time it took for each event:

 

 e.g. if we want to log the external duration of the query-host step:

 

      Profiler prof = (Profiler) ctx.tget("PROFILER");

      ProfilerEntry profEntry = prof.getProfilerEntry("query-host");

      if (profEntry != null){

          tl.setExtDuration (profEntry.getDuration());

      }

 

Regards,

 

 

David Bergert, CISSP, CISA, CPISM/A

www.paymentsystemsblog.com <http://www.paymentsystemsblog.com/>



[Non-text portions of this message have been removed]


Re: nserver contributed by Victor Salaman

by chhil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Victor,Thank you for the feedback. I am sure people will find it useful. I
have not synched out the code
yet but will definitely do so.

-chhil


On Wed, Mar 4, 2009 at 8:01 PM, Victor Salaman <vsalaman@...> wrote:

>   Hi Murtuza:
>
> NServer is a high performance NIO server. I wrote this for myself, for some
> specific needs of my environment (better handling of keep-alives to each
> connected end-point and minimize thread usage), so one day I asked Andy
> Orrock and Dave Bergert if anyone would find this useful and they said that
> a lot of people would, so I submitted it to Alejandro for review.
>
> Main Features:
>
> * Based on Apache MINA.
> * It uses Java NIO allowing a great number of simultaneous connections
> without 1:1 threading.
> * Completely asynchronous architecture, meaning that if there's no data
> available, we won't wait for it.
> * Configurable keep alive handling. An example is provided where an 0800
> echo message is sent to the connected endpoint.
>
> Drawbacks:
> * Does not use the traditional ISOChannel(s). Instead, it uses the concept
> of protocol handlers, which at the moment are kind of slim, though it's
> very
> simple to port an ISOChannel into a protocol handler.
>
>
> On Wed, Mar 4, 2009 at 9:29 AM, chhil <Chillum@...<Chillum%40gmail.com>>
> wrote:
>
> > Hello Victor,
> > Thanks for adding the NIO server.
> > It would be nice know why you decided to add this, so people on the list
> > can consider using it.
> >
> > -chhil
> >
> >
> > On Wed, Mar 4, 2009 at 6:09 PM, Victor Salaman <vsalaman@...<vsalaman%40gmail.com>
> <vsalaman%40gmail.com>>
> > wrote:
> >
> > > Hi Dave:
> > >
> > > I've had it production for a couple of days without a single problem.
> Let
> > > me
> > > know when you test it to see if it can be enhanced in any way.
> > >
> > > -V
> > >
> > >
> > > >
> > > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]