[AOLSERVER] New module for AOLServer : share TCL channels across interpreters

2002-07-17 Thread Jean-Fabrice RABAUTE

Hi all,

An email just to let you know that you can get the module nssharechannel
I develop at the following address :

http://www.core-services.fr/products/nssharechannel/

It's there for a while but the web site was in french. Now as I translated
it, I inform all people who can be interested by this module ;-)

This module allows you to open a channel (socket or file) and detach it to
the current interpreter that it becomes global and can be used with all the
scripts.
I am using this module in production since one year without any problem so
far. I am using it to open a socket to connect AOLServer with my own Java
Chat Server.
It's like the module from Rob Mayoff doing the same stuff, but without
other functions of its module.

To finish, just a question : Is there a graphic module (in C ot TCL) for
AOLServer to manipulate images (create on the fly, draw, automatic resize,
automatic thumbnail creation, etc...), like the one in PHP with GD ?
If not I will perhaps try to plug the GD Graphic Library as an AOLServer
C module.

Thanks for the info .

Best regards.

Jean-Fabrice RABAUTE
Core Services
http://www.core-services.fr
[EMAIL PROTECTED]



Re: [AOLSERVER] New module for AOLServer : share TCL channels across interpreters

2002-07-17 Thread Wojciech Kocjan

Jean-Fabrice RABAUTE wrote:
 This module allows you to open a channel (socket or file) and detach it to
 the current interpreter that it becomes global and can be used with all the
 scripts.
  [cut]

So I can do ns_thread begindetached, then do
socket -server ... (not the ns_socklistencallback) and then transfer it
to another thread? :-)

For example can I use 10 threads in 'vwait forever' loop and transfer
channels across these threads without problems?  This is very important
to me because my AOLserver sometimes handles over 200 connections and I
want to have some threads managing them (but not 200 :-).

Does it work on 3.4.2 and Tcl 8.3?

 To finish, just a question : Is there a graphic module (in C ot TCL) for
 AOLServer to manipulate images (create on the fly, draw, automatic resize,
 automatic thumbnail creation, etc...), like the one in PHP with GD ?
 If not I will perhaps try to plug the GD Graphic Library as an AOLServer
 C module.

nsgd. I use it to render PNG server statistics for over 6 months. It is
a conversion of the tcl gd library.

--
WK

Data typing is an illusion. Everything is a sequence of bytes.
  -Todd Coram



Re: [AOLSERVER] New module for AOLServer : share TCL channels across interpreters

2002-07-17 Thread Jean-Fabrice RABAUTE

Hi,

The TCL functions created by the module (ns_attachchannel, ns_detachchannel)
are thread safe.
However, If you attach the descriptor in 2 different threads, you'll then
have to take care yourself of the synchro.
In fact, when attached to the current interpreter, the descriptor becomes
part of it and the module is not used anymore. You can then use the
descriptor as if you opened it in the script (or thread).
So, you have to use mutexes to ensure concurrent read/writes.

Jean-Fabrice RABAUTE
Core Services
http://www.core-services.fr
[EMAIL PROTECTED]
Mob: +33 (0)6 13 82 67 67


-Message d'origine-
De : AOLserver Discussion [mailto:[EMAIL PROTECTED]]De la part
de Dossy
Envoye : mercredi 17 juillet 2002 14:44
A : [EMAIL PROTECTED]
Objet : Re: [AOLSERVER] New module for AOLServer : share TCL channels
across interpreters


On 2002.07.17, Jean-Fabrice RABAUTE [EMAIL PROTECTED] wrote:

 For your first question, the answer is YES. What I am doing for my use is
to
 open a socket connection at AOLServer startup, detach it, and then use the
 socket descriptor in all my tcl page scripts as well as threads created
 using ns_thread.
 When detached, the socket still remains, you just have to use the attach
 function to attach it in another thread or script and that's all.

Do we (the users of this module) need to create our own mutex to ensure
that no two threads are reading/writing the socket at the same time?

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)



Re: [AOLSERVER] New module for AOLServer : share TCL channels across interpreters

2002-07-17 Thread Daniel P. Stasinski

  Is there a graphic module (in C ot TCL) for
  AOLServer to manipulate images (create on the
  fly, draw, automatic resize, automatic thumbnail
  creation, etc...), like the one in PHP with GD ?

nsgd at http://sourceforge.net/projects/aolserver/

Daniel P. Stasinski
Software Engineer
Mayor Pharmaceutical Laboratories
[EMAIL PROTECTED]