Re: Connector: sessionCreated is not called (unstable behavior)

2009-03-03 Thread Victor

Just a question:

why does Connector.run() thread exit when nHandles==0? Why not to 
continue executing select() in the loop infinitely?


Thanks,
Victor


Victor wrote:


Unfortunately, even with the patch in Connector and Processor, the 
problem is reproduced randomly, most of time everything works, but 
sometimes I see that sessionCreated is not called. But if I start a new 
connection, this old pending connection (for which I am waiting for 
sessionCreated callback) is completed instantly, so I get sessionCreated.


Victor N


Victor wrote:


I have added a similar fix in 
AbstractPollingIoProcessor.Processor.run() - nSessions is now 
initialized inside the loop, on each iteration.


It seems to work now, I can not reproduce the bug, but I will continue 
testing.

Not sure whether this patch is adequate or nor. Any comments?

Victor N


Victor wrote:
I tried to play with my fix - from the first glance, it seemed to 
work - connection was established, sessionCreated was called,

but at the second attempt the problem reproduced.

Any ideas what is wrong here?

Thanks,
Victor N


Victor wrote:


Hello,

I have a problem with NIO connector in mina 2.0 M4 when handling 
many simultaneous connections - sometimes after calling connect() I 
do not receive sessionCreated() callback.


I am trying to prepare a small test, but I can not reproduce the 
problem in this test yet, so I tried to investigate mina sources 
myself using out working system.


I can see that a new Channel is always created, channel.connect() is 
called, SYN, SYN-ACK, ACK are sent, then I see that 
AbstractPollingIoConnector.Connector registers the new channel in 
Selector, but after that AbstractPollingIoConnector.Connector is 
stopped because nHandles=0 and connectQueue is already empty (no 
more connection requests).


I mean the following code in 
AbstractPollingIoConnector.Connector.run():


if (nHandles == 0) {
synchronized (lock) {
if (connectQueue.isEmpty()) {
connector = null;
break;
}
}
}

After that, 'select' is not called on the Selector anymore for this 
session.


One reason of this behavior (which I can assume now) is 'nHandles' 
variable initialized outside of 'while' loop. Maybe, it should be 
initialized on each iteration? So every time we calculate the number 
of new sessions, canceled sessions, etc.
In my situation, nHandles=-1, then, after registering the new 
session, nHandles becomes 0 and the Connector.run() is stopped.



Victor N


















Preon - Binary data encoding framework

2009-03-03 Thread Ashish
Folks,

Was browsing through dzone and came across this framework Preon.

From its website

Preon is a framework for dealing with binary encoded data. It intends
to be to binary encoded data what Hibernate is to relational
databases, and JAXB to XML

Thought would be worth bringing it to notice of our dev community.
Some of us might be interested in it.

May be we can add to our watch list and can work on building a codec,
if we find it useful.

wdyt?

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


Re: Preon - Binary data encoding framework

2009-03-03 Thread Emmanuel Lecharny

Ashish wrote:

Folks,

Was browsing through dzone and came across this framework Preon.

From its website

Preon is a framework for dealing with binary encoded data. It intends
to be to binary encoded data what Hibernate is to relational
databases, and JAXB to XML

Thought would be worth bringing it to notice of our dev community.
Some of us might be interested in it.

May be we can add to our watch list and can work on building a codec,
if we find it useful.

wdyt?
  
Could worth some time. Remember we still have to evaluate Tomasz 
Protocol Buffer  code...



--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org




Re: Preon - Binary data encoding framework

2009-03-03 Thread Alex Karasulu
Anything along these lines if functional could be very useful for various
protocols.  Would be nice to be able to plugin some ebnf from an RFC and
just have a nice codec generated. Dreaming!

Alex

On Tue, Mar 3, 2009 at 10:06 AM, Emmanuel Lecharny elecha...@apache.orgwrote:

 Ashish wrote:

 Folks,

 Was browsing through dzone and came across this framework Preon.

 From its website

 Preon is a framework for dealing with binary encoded data. It intends
 to be to binary encoded data what Hibernate is to relational
 databases, and JAXB to XML

 Thought would be worth bringing it to notice of our dev community.
 Some of us might be interested in it.

 May be we can add to our watch list and can work on building a codec,
 if we find it useful.

 wdyt?


 Could worth some time. Remember we still have to evaluate Tomasz Protocol
 Buffer  code...


 --
 --
 cordialement, regards,
 Emmanuel Lécharny
 www.iktek.com
 directory.apache.org





Re: AsyncWeb jars incomplete

2009-03-03 Thread Sangjin Lee
I was one of the people who were involved in bringing AHC over from the
Geronimo sandbox (where it was first developed) to under asyncweb.
 Originally it was based on mina 1.1.x as at that time mina 2.0 was still in
its active development.  We did the bare minimum to make it compile against
mina 2.0 (but not necessarily all the runtime correctness), and merged them.
 It landed at the org.apache.ahc package to avoid confusion with the
pre-existing client code that was under org.apache.asyncweb.client.
The intention has been that not only would we make it work correctly with
2.0, move to a common codec, subsume the existing client, etc. but also
would redesign the client.  Unfortunately, the momentum stalled because key
people who were most interested in making this happen (myself included)
didn't get to make the big push.  For me, my involvement was cut down for
reasons that are unrelated to the project.

Some discussion threads that may be of help:

http://tinyurl.com/djr4pa
http://tinyurl.com/azbpzg
http://tinyurl.com/dkrlzv
http://tinyurl.com/csonsf

Having said that, I'd love to see this get going again (although my
bandwidth on this is still quite limited).  I'd certainly be happy to
contribute what I can...

As a side note, there is a working version of the asyncweb client in the
1.0 branch.  This is almost the original version that is based on 1.0, and I
think it is of production quality (we're using it in production).  It hasn't
seen an official release however.  But please note that I don't think we
will (or should) support this in a serious manner.  Instead, we need to
focus our effort on the trunk version based on mina 2.0.  My 2 cents.

Thanks,
Sangjin


On Mon, Mar 2, 2009 at 8:34 AM, Jacob Tomaw jacob.to...@gmail.com wrote:

 Emmanuel,

 Your caution is understandable.  The only code change for the server is
 setting up the MINA LoggingFilter, but clearly there might be changes in
 MINA from M3 to M4 that affect the server in an unknown way.

 I am very interested in improving AsyncWeb (at least the client portion).
 My company is in the process of upgrading out 85+ application (no idea how
 many JVMs) to use AHC to communicate with each other.

 Is there someone already attached to the project who has a deep knowledge
 of
 AsyncWeb and has a direction they would like to see the project go?  Right
 now there are to clients in the client dir and it is not clear what should
 happen with the two of them and if any more transitioning need to take
 place.

 Thanks,
 Jacob

 On Fri, Feb 27, 2009 at 11:25 AM, Emmanuel Lecharny elecha...@apache.org
 wrote:

  Jacob Tomaw wrote:
 
  I see that this is happening because the client is not completely moved
  from
  the ahc structure to the asyncweb.client structure.  It is also not
 using
  the common codec.
 
  I am prepared to open jiras and create patches to clean this up.
  However,
  I
  want to gauge the likelihood of these patches being integrated into the
  trunk.  I see several jiras with ptches attached and not further
 comment.
  Neither acceptance or rejection.
 
 
  Hi Jacob,
 
  it's just a matter to find people interested in improving AsyncWeb ! I
 will
  have a look at the patches, and try to get them applied.  However, I have
 a
  very shallow knowledge about AsyncWeb code base, so I'm afraid it can
 break
  the server...
 
 
  Thanks !
 
  --
  --
  cordialement, regards,
  Emmanuel Lécharny
  www.iktek.com
  directory.apache.org
 
 
 


 --
 Jacob Tomaw
 tfl:The Flatiron Life (http://tomaw.com)
 Follow me on Twitter! (http://twitter.com/JacobTomaw)



Re: AsyncWeb jars incomplete

2009-03-03 Thread Jeff Genender
Ditto for me... glad to see folks making use of this.  I could help a  
bit too, but my bandwidth is also tight.


Glad to see this come up again.

Jeff


On Mar 3, 2009, at 10:13 AM, Sangjin Lee wrote:

I was one of the people who were involved in bringing AHC over from  
the

Geronimo sandbox (where it was first developed) to under asyncweb.
Originally it was based on mina 1.1.x as at that time mina 2.0 was  
still in
its active development.  We did the bare minimum to make it compile  
against
mina 2.0 (but not necessarily all the runtime correctness), and  
merged them.

It landed at the org.apache.ahc package to avoid confusion with the
pre-existing client code that was under org.apache.asyncweb.client.
The intention has been that not only would we make it work correctly  
with
2.0, move to a common codec, subsume the existing client, etc. but  
also
would redesign the client.  Unfortunately, the momentum stalled  
because key
people who were most interested in making this happen (myself  
included)
didn't get to make the big push.  For me, my involvement was cut  
down for

reasons that are unrelated to the project.

Some discussion threads that may be of help:

http://tinyurl.com/djr4pa
http://tinyurl.com/azbpzg
http://tinyurl.com/dkrlzv
http://tinyurl.com/csonsf

Having said that, I'd love to see this get going again (although my
bandwidth on this is still quite limited).  I'd certainly be happy to
contribute what I can...

As a side note, there is a working version of the asyncweb client  
in the
1.0 branch.  This is almost the original version that is based on  
1.0, and I
think it is of production quality (we're using it in production).   
It hasn't
seen an official release however.  But please note that I don't  
think we
will (or should) support this in a serious manner.  Instead, we need  
to

focus our effort on the trunk version based on mina 2.0.  My 2 cents.

Thanks,
Sangjin


On Mon, Mar 2, 2009 at 8:34 AM, Jacob Tomaw jacob.to...@gmail.com  
wrote:



Emmanuel,

Your caution is understandable.  The only code change for the  
server is
setting up the MINA LoggingFilter, but clearly there might be  
changes in

MINA from M3 to M4 that affect the server in an unknown way.

I am very interested in improving AsyncWeb (at least the client  
portion).
My company is in the process of upgrading out 85+ application (no  
idea how

many JVMs) to use AHC to communicate with each other.

Is there someone already attached to the project who has a deep  
knowledge

of
AsyncWeb and has a direction they would like to see the project  
go?  Right
now there are to clients in the client dir and it is not clear what  
should
happen with the two of them and if any more transitioning need to  
take

place.

Thanks,
Jacob

On Fri, Feb 27, 2009 at 11:25 AM, Emmanuel Lecharny elecha...@apache.org

wrote:



Jacob Tomaw wrote:

I see that this is happening because the client is not completely  
moved

from
the ahc structure to the asyncweb.client structure.  It is also not

using

the common codec.

I am prepared to open jiras and create patches to clean this up.

However,

I
want to gauge the likelihood of these patches being integrated  
into the

trunk.  I see several jiras with ptches attached and not further

comment.

Neither acceptance or rejection.



Hi Jacob,

it's just a matter to find people interested in improving  
AsyncWeb ! I

will
have a look at the patches, and try to get them applied.  However,  
I have

a
very shallow knowledge about AsyncWeb code base, so I'm afraid it  
can

break

the server...


Thanks !

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org






--
Jacob Tomaw
tfl:The Flatiron Life (http://tomaw.com)
Follow me on Twitter! (http://twitter.com/JacobTomaw)





Re: AsyncWeb jars incomplete

2009-03-03 Thread Jacob Tomaw
Sangjin and Jeff,

Thanks for the info and background.

I will be sure to read up on the old threads you passed along.

We are currently using the 1.0 AHC in our production environment, but we
have other projects starting to use MINA 2.  This is motivating me to build
an AHC on MINA 2.  I want to commit any changes we need to make back to the
project and get it rolling again if we can.

Thanks,
Jacob

On Tue, Mar 3, 2009 at 11:22 AM, Jeff Genender jgenen...@apache.org wrote:

 Ditto for me... glad to see folks making use of this.  I could help a bit
 too, but my bandwidth is also tight.

 Glad to see this come up again.

 Jeff- Show quoted text -



 On Mar 3, 2009, at 10:13 AM, Sangjin Lee wrote:

  I was one of the people who were involved in bringing AHC over from the
 Geronimo sandbox (where it was first developed) to under asyncweb.
 Originally it was based on mina 1.1.x as at that time mina 2.0 was still
 in
 its active development.  We did the bare minimum to make it compile
 against
 mina 2.0 (but not necessarily all the runtime correctness), and merged
 them.
 It landed at the org.apache.ahc package to avoid confusion with the
 pre-existing client code that was under org.apache.asyncweb.client.
 The intention has been that not only would we make it work correctly with
 2.0, move to a common codec, subsume the existing client, etc. but also
 would redesign the client.  Unfortunately, the momentum stalled because
 key
 people who were most interested in making this happen (myself included)
 didn't get to make the big push.  For me, my involvement was cut down for
 reasons that are unrelated to the project.

 Some discussion threads that may be of help:

 http://tinyurl.com/djr4pa
 http://tinyurl.com/azbpzg
 http://tinyurl.com/dkrlzv
 http://tinyurl.com/csonsf

 Having said that, I'd love to see this get going again (although my
 bandwidth on this is still quite limited).  I'd certainly be happy to
 contribute what I can...

 As a side note, there is a working version of the asyncweb client in the
 1.0 branch.  This is almost the original version that is based on 1.0, and
 I
 think it is of production quality (we're using it in production).  It
 hasn't
 seen an official release however.  But please note that I don't think we
 will (or should) support this in a serious manner.  Instead, we need to
 focus our effort on the trunk version based on mina 2.0.  My 2 cents.

 Thanks,
 Sangjin


 On Mon, Mar 2, 2009 at 8:34 AM, Jacob Tomaw jacob.to...@gmail.com
 wrote:

  Emmanuel,

 Your caution is understandable.  The only code change for the server is
 setting up the MINA LoggingFilter, but clearly there might be changes in
 MINA from M3 to M4 that affect the server in an unknown way.

 I am very interested in improving AsyncWeb (at least the client portion).
 My company is in the process of upgrading out 85+ application (no idea
 how
 many JVMs) to use AHC to communicate with each other.

 Is there someone already attached to the project who has a deep knowledge
 of
 AsyncWeb and has a direction they would like to see the project go?
  Right
 now there are to clients in the client dir and it is not clear what
 should
 happen with the two of them and if any more transitioning need to take
 place.

 Thanks,
 Jacob

 On Fri, Feb 27, 2009 at 11:25 AM, Emmanuel Lecharny 
 elecha...@apache.org

 wrote:


  Jacob Tomaw wrote:

  I see that this is happening because the client is not completely moved
 from
 the ahc structure to the asyncweb.client structure.  It is also not

 using

 the common codec.

 I am prepared to open jiras and create patches to clean this up.

 However,

 I
 want to gauge the likelihood of these patches being integrated into the
 trunk.  I see several jiras with ptches attached and not further

 comment.

 Neither acceptance or rejection.


  Hi Jacob,

 it's just a matter to find people interested in improving AsyncWeb ! I

 will

 have a look at the patches, and try to get them applied.  However, I
 have

 a

 very shallow knowledge about AsyncWeb code base, so I'm afraid it can

 break

 the server...


 Thanks !

 --
 --
 cordialement, regards,
 Emmanuel Lécharny
 www.iktek.com
 directory.apache.org





 --
 Jacob Tomaw
 tfl:The Flatiron Life (http://tomaw.com)
 Follow me on Twitter! (http://twitter.com/JacobTomaw)





-- 
Jacob Tomaw
tfl:The Flatiron Life (http://tomaw.com)
Follow me on Twitter! (http://twitter.com/JacobTomaw)


Re: AsyncWeb jars incomplete

2009-03-03 Thread Emmanuel Lecharny

Jeff Genender wrote:
Ditto for me... glad to see folks making use of this.  I could help a 
bit too, but my bandwidth is also tight.


Glad to see this come up again.

Jeff


Hi guys,

The MINA 2.0 porting was done by Julien AFACS from the svn logs. It's 
currently using 2.0.0-M3 version, so it must move to 2.0.0-M4.


I can do the move, it's quite easy, but my total ignorance of how 
Asyncweb works will be a bit of a problem.


There are also some pending patches which would be interesting to inject.

he good point is that some people want to use AsyncWeb in a big scale, 
and to some extend, if those people are more or less interested in 
participating in the project, that would grow the number of committers 
(of course, assuming that merit is ok, etc, all the ASF way stance...).


So, first, migrate AsyncWeb to 2.0.0-M4. Piece of cake. Let's do that !

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org




Re: AsyncWeb jars incomplete

2009-03-03 Thread Emmanuel Lecharny

FYI, I just migrated to MINA 2.0.0-M4, and fixed some compilation errors.

So far, asyncweb trunk is building now.

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org




Re: AsyncWeb jars incomplete

2009-03-03 Thread Jacob Tomaw
Was it the patch from https://issues.apache.org/jira/browse/ASYNCWEB-25?

Thanks,
Jacob

On Tue, Mar 3, 2009 at 12:00 PM, Emmanuel Lecharny elecha...@apache.orgwrote:

 FYI, I just migrated to MINA 2.0.0-M4, and fixed some compilation errors.

 So far, asyncweb trunk is building now.

 --
 - Show quoted text -
 --
 cordialement, regards,
 Emmanuel Lécharny
 www.iktek.com
 directory.apache.org





-- 
Jacob Tomaw
tfl:The Flatiron Life (http://tomaw.com)
Follow me on Twitter! (http://twitter.com/JacobTomaw)


[jira] Resolved: (ASYNCWEB-25) Upgrade to MINA 2.0.0-M4

2009-03-03 Thread Emmanuel Lecharny (JIRA)

 [ 
https://issues.apache.org/jira/browse/ASYNCWEB-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny resolved ASYNCWEB-25.
---

Resolution: Fixed

Patch applied in :
http://svn.apache.org/viewvc?rev=749672view=rev

 Upgrade to MINA 2.0.0-M4
 

 Key: ASYNCWEB-25
 URL: https://issues.apache.org/jira/browse/ASYNCWEB-25
 Project: Asyncweb
  Issue Type: Bug
  Components: Common
Reporter: Jacob Tomaw
 Attachments: asyncweb-25.patch


 Need to upgrade to MINA 2.0.0-M4

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: AsyncWeb jars incomplete

2009-03-03 Thread Emmanuel Lecharny

Jacob Tomaw wrote:

Was it the patch from https://issues.apache.org/jira/browse/ASYNCWEB-25?
  

yes. I just marked the issue as resolved (forgot to do that lately)

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org




Re: Preon - Binary data encoding framework

2009-03-03 Thread Ashish
On Tue, Mar 3, 2009 at 8:36 PM, Emmanuel Lecharny elecha...@apache.org wrote:
 Ashish wrote:

 Folks,

 Was browsing through dzone and came across this framework Preon.

 From its website

 Preon is a framework for dealing with binary encoded data. It intends
 to be to binary encoded data what Hibernate is to relational
 databases, and JAXB to XML

 Thought would be worth bringing it to notice of our dev community.
 Some of us might be interested in it.

 May be we can add to our watch list and can work on building a codec,
 if we find it useful.

 wdyt?


 Could worth some time. Remember we still have to evaluate Tomasz Protocol
 Buffer  code...

Yup, I remember that. On a similar note, where are we maintaining our
TODO list (outside JIRA)?
We also have to evaluate protoTiger eclipse plugin.

- ashish