perlmonkdr has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks!!!

Well, i'm want to start with cluster, i'm think that it's good idea, and I want to use in Jabber Client, but i need some theory about that, how can implement a Perl cluster before Jabber Client or better said in the middle.

The problem is this, i'm run the JabberC it's validated to a server and started to accept client, when each user start a connection, it's use "select" to handle it's (NET::Jabber), but how can i do, to redirect it to other Jabber Client?

Other question, what's better select, forks, or threads? on Perl

Thk guy in advance, i'm fighting with that and I couldn't see the light

PD: it's a bot.

Replies are listed 'Best First'.
Re: Perl cluster on Jabber
by plobsing (Friar) on Dec 09, 2007 at 21:33 UTC
    I don't fully understand your question. However, in regard to your questions about threads, select, and forks: It all depends on what problem you want to solve, how you want it to scale, and what issues you are more comfortable resolving.
    If you want to create a cluster, then select and threads are a bit harder to use because they exist in one process and can't span over multiple machines without some contortions.
    However there's an even easier solution (IMHO): POE
    There are components for Jabber and IPC (which can help with clusters) already built.

      Thank you, it's hard to explain because I do not understand how to do it well, the topic happens because I need that the "cluster" was validated against the server and every time someone wants to connect to this "cluster/client", the cluster forward his request to other scripts ...

      A chart is rudimentary:

       
                                    
      |Client 1| <-> |Jabber Server|  <-|1 º Step|->  |Our Cluster| 
                       |                                 |       | 
                       +-|2º Step|---<------------> |Handler 1| |Handler 2| 
      
      

      *- 1º Step: Client 1 through contact with the server cluster this redirect its request to handle 1 or 2 depending on the load.

      * 2º Step: handlers interact with the server directly so as not to overload the Cluster.

      Well it is more or less the idea.

      For now I am going to see how I can make implement IPC, POE, Proc::Daemon in this context.

      Anyway any extra help is greatly appreciated :-D.

      Thk a lot big help