RE: Jk2: jkctl handler

2001-12-14 Thread GOMEZ Henri

 could you explain us more about ping ?

Jk now has a 'ping' message type, which replaces the login and 
discovery
messages.

It will send the 'ping' as the first packet when it opens the 
connection,
and also every time it is asked for ( or even periodically ). The ping
will be equivalent with an empty request - it will 'switch roles',
allowing tomcat to send messages and get/set information.

For example, tomcat can send a 'loginSeed' packet and request 
md5 auth. Or
it can request a different auth method. Then it can send uriMaps or
contextStatus messages.

What the result on login phase ?

webserver send ping.
tomcat send a loginseed in reply
webserver send the loginsequence
tomcat reply by sending log granted/deny

How did tomcat will send uriMaps/ContextStatus without knowing from
which VirtualHost the login came ? Did we add the VirtualHost info
in login message ?

The C side is very simple ( and clear - I hope ) - adding new message
handlers require just  adding a C file and adding it to the 
registry. See
the processCallbacks method in workerEnv.

Did the callback will have information about current state ?
ie: connect stage (physical, logical (granted), autoconf received)

Ping will get an 'ok' response, signaling tomcat is ok - but 
before the ok
message tomcat can update anything else or request anything.

webserver send ping.
tomcat send a loginseed in reply
webserver send the loginsequence
tomcat reply by sending log granted/deny
tomcat send ok to ping ?

 Opinions ? Votes ( I'm looking for +1s == I will help :-)

 Seems good, what's the help you need there ?

Right now the most important thing is to make sure jk2 builds and works
as good as ( or better than ) jk1.
Then we have to port the other server connectors ( apache13, 
iis, etc ).
I want to finish ( or at least 'freeze' ) jk2 refactoring ( or at least
the first round ) in few days - but I also want to sleep, so 
any contribution would
be great - testing, updating connectors, implementing the 'jkctl' ( or
parts of it )...

Ok, what about waiting for jk2 freeze, and then let us start in writing
callback handlers ? May be good to prepare for us empty callback which 
will be implemented by contributors ;)


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Jk2: jkctl handler

2001-12-14 Thread costinm

On Fri, 14 Dec 2001, GOMEZ Henri wrote:

 What the result on login phase ?

 webserver send ping.
 tomcat send a loginseed in reply
 webserver send the loginsequence
 tomcat reply by sending log granted/deny

 How did tomcat will send uriMaps/ContextStatus without knowing from
 which VirtualHost the login came ? Did we add the VirtualHost info
 in login message ?

The login is not specific to a virtual host - the endpoint can be shared
and used for requests for the entire server. I think it would be a waste
to have an endpoint per virtual host.

The login is concerned only with authentication. Webserver opens the
connection and sends the initial message. Tomcat can then send messages,
including request for credentials ( either md5 or others ), or request
for config informations ( in my proposal, where all apps are deployed
and configured with apache and tomcat pulls the info ) or sends config
info ( if the apps are deployed on tomcat and apache will get this info
from there ).

The benefit of 'stateless' ( or at least of not having a fixed sequence
of messages ) is that all options are open. Each end will maintain some
state and can act on it, but that's part of each handler's code, not part
of the protocol ( just like in http ).

 webserver send ping.
 tomcat send a loginseed in reply
 webserver send the loginsequence
 tomcat reply by sending log granted/deny
 tomcat send ok to ping ?

Or:
- webserver sends ping
- tomcat sends a message asking for md5 auth ( seed as parameter )
- webserver send a message with the credentials
- tomcat checks the credentials. If they don't match, it sends
a login deny and close connections ( webserver's deny handler will
close the connection on apache side ).
- If the credentials are ok, tomcat either asks for config or sends
it's config to apache ( based on it's settings ) ( or both )
- More messages can be exchanged, negotiations ( for example tomcat
can request a different protocol).
- Finally, tomcat sends an 'ok' message ( reply to the original ping ).
This will act like the END_RESPONSE message - apache will continue
processing.


 Ok, what about waiting for jk2 freeze, and then let us start in writing
 callback handlers ? May be good to prepare for us empty callback which
 will be implemented by contributors ;)

I think we should first make sure jk2 works and builds for ajp13,
add the other server adapters.

jk_handler_logon and the others can be used as examples.

Of course - nothing is cast in stone, and based on feeback/discussion/vote
anything can and will be changed :-)

Costin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Jk2: jkctl handler

2001-12-13 Thread GOMEZ Henri

This tries to solve the 'egg and chicken' config problem, and to
fix/enable some other things.

I want to add a second handler in mod_jk, similar with the 'status' for
apache, mod_jserv, etc. ( same security issues - i.e. users will need
access control, to use it, etc ).

good thing

The most important feature ( for now ) will be the handling of 'ping',
where mod_jk will connect to any worker it knows about and send a ping
message.

could you explain us more about ping ?

Whenever tomcat starts, the ajp connector ( if configured to ) 
will access
this control uri - Apache will then reconnect to it and update 
it's info.

he he good idea, tomcat call Apache, i like it :)

( apache does try to connect to workers when it starts, but it 
is possible
that tomcat was down ). It will also update it's up/down state for
workers that were marked as down as result of connection failure.

This will also alow user to add/remove application in a 'lb' 
environment
in a nice and clean manner.

The handler will report the status of it's workers as result ( 
in simple
XHTML format, nothing fancy ).

Opinions ? Votes ( I'm looking for +1s == I will help :-)

Seems good, what's the help you need there ?

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Jk2: jkctl handler

2001-12-13 Thread costinm

On Thu, 13 Dec 2001, GOMEZ Henri wrote:

 The most important feature ( for now ) will be the handling of 'ping',
 where mod_jk will connect to any worker it knows about and send a ping
 message.

 could you explain us more about ping ?

Jk now has a 'ping' message type, which replaces the login and discovery
messages.

It will send the 'ping' as the first packet when it opens the connection,
and also every time it is asked for ( or even periodically ). The ping
will be equivalent with an empty request - it will 'switch roles',
allowing tomcat to send messages and get/set information.

For example, tomcat can send a 'loginSeed' packet and request md5 auth. Or
it can request a different auth method. Then it can send uriMaps or
contextStatus messages.

The C side is very simple ( and clear - I hope ) - adding new message
handlers require just  adding a C file and adding it to the registry. See
the processCallbacks method in workerEnv.

Ping will get an 'ok' response, signaling tomcat is ok - but before the ok
message tomcat can update anything else or request anything.

 Opinions ? Votes ( I'm looking for +1s == I will help :-)

 Seems good, what's the help you need there ?

Right now the most important thing is to make sure jk2 builds and works
as good as ( or better than ) jk1.
Then we have to port the other server connectors ( apache13, iis, etc ).
I want to finish ( or at least 'freeze' ) jk2 refactoring ( or at least
the first round ) in few days - but I also want to sleep, so any contribution would
be great - testing, updating connectors, implementing the 'jkctl' ( or
parts of it )...

Costin


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Jk2: jkctl handler

2001-12-12 Thread costinm


This tries to solve the 'egg and chicken' config problem, and to
fix/enable some other things.

I want to add a second handler in mod_jk, similar with the 'status' for
apache, mod_jserv, etc. ( same security issues - i.e. users will need
access control, to use it, etc ).

The most important feature ( for now ) will be the handling of 'ping',
where mod_jk will connect to any worker it knows about and send a ping
message.

Whenever tomcat starts, the ajp connector ( if configured to ) will access
this control uri - Apache will then reconnect to it and update it's info.
( apache does try to connect to workers when it starts, but it is possible
that tomcat was down ). It will also update it's up/down state for
workers that were marked as down as result of connection failure.

This will also alow user to add/remove application in a 'lb' environment
in a nice and clean manner.

The handler will report the status of it's workers as result ( in simple
XHTML format, nothing fancy ).

Opinions ? Votes ( I'm looking for +1s == I will help :-)

Costin





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]