in reply to Perl chat server?

This is a great question, and not academic for me. Thanks. I'm working on a system which needs to run a 3000-user chat (through web input forms or maybe irc clients), do something with the information that is chatted, and serve web pages at a lower rate. Some parts of it would resemble IRC except that some other interesting things will be happening.

I just read some parts of the Stem Systems site and it is very interesting! Though I was thinking an apache mod_perl server, or possibly a mod_perl server that logged into an irc server as a bot, might be the ticket. My own application will not be injecting messages into the chat stream, but processing them, and certainly there has to be a bridge from the live-message-stream paradigm to the apache hybrid page server paradigm. Maybe stem would be overkill, or maybe it could pay for itself in a couple of development cycles. Can't tell yet.

But while Stem so far emphasizes system administration tasks, it might also be the answer to the P2EE folks' work.. at once relevant to a lot of things Perl people do now, instead of what people think we should be doing in the future. It has config files, messaging, and a cookbook of networking tools. Has anyone used this? It seems very cool that you can spread your objects across a number of servers, I guess failover is the next thing to sprout? (sorry.) Stem does not yet guarantee message delivery which could maybe be a problem if used as an IRC client.

In comparison, POE which seems to be used for lots of IRC bots is apparently good enough to run stock exchange operations and handles high snort load with loghog. I guess the choice is between serving all chat from a slower main program so you don't miss anything, or sync with a stream and hope you don't get kicked or overloaded.

One thing though, not that I expect it would be a problem considering the people involved, but you have to jump through some hoops to get it. In fact I have just stopped myself from downloading it because I don't want to have to fill out the very long questionnaire twice, once now and once when I get back to my office in some days.

I figure when they say it will be GPL by 0.06 this might have to do with hammering things down for Perl 6..? But it says only free for noncommercial use and I'm not sure how that would work. Perhaps this means I would owe Stem money if I get paid? That isn't GPL, kind of shades o' gray. Any ideas merlyn (an advisor to Stem Systems) ?

I think it could be quite hot to have a high power IRC-compatible module in Stem, the sample code of which has objects responding to tty messages. Wondering about performance and security.. humm better start reading.

Update: POE::Wheel::FollowTail might be the answer. Run a proven bulletproof IRC server, and use this module to feed POE with the chat log line by line as it grows. Or maybe do the same thing without POE, erm. More studying..

Replies are listed 'Best First'.
Re: Re: Perl chat server?
by yodabjorn (Monk) on Apr 28, 2002 at 21:08 UTC
    Why not just use, and extend, existing bots written in perl or write your own using a framework like Net::IRC ? I use Net::IRC to power a bot I wrote. Its a verry nice event driven framework for connecting to IRC and handles all of the IRC commands for you.

    I know some pepole that really like perlbot: http://perlbot.sourceforge.net Tho I haven't used it it looks to be a very nice project..
      Thanks for the suggestion. I'm looking at Net::IRC bots, but in my case I cannot afford to miss a single post, so I won't be able to say for sure until I test. Am also worried in general about security/administration of IRC and hardware resources needed.. so am looking for how others have done large scale systems (even slash or a normal bbs) not just IRC which has more features than I need or want.

      Will check out perlbot and the other links below. --Matt

Re: Re: Perl chat server?
by rcaputo (Chaplain) on May 01, 2002 at 05:28 UTC

    A quick note about POE and chat servers: The distribution includes a very limited one in its samples directory.

    Addendum: I have since revised the sample chat server and placed a copy of it on the web.

      Yes Net::IRC has lead me to POE which has lead to much more reading on my part about event models. POE looks really awsome.. and could be helpful on this project. POE on CPAN