What's the chat daemon?

What's the chat daemon?

by N Hansen -
Number of replies: 12
I'm ignorant. What's the chat daemon? How is it different from html? And what do I need to do to get it to work? I set my Moodle to chat daemon but then when I try to enter chat I just get a white blank window. Is there something else that needs to be installed? How do I know what to enter in the chat daemon settings? Is this something I need to discuss with my host?
Average of ratings: -
In reply to N Hansen

Re: What's the chat daemon?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
A daemon is a program that runs all the time in the background. In this case it's a PHP script, listening to a particular port on your server, accepting and giving out chat information.
1) Admin -> Config -> Modules -> Chat -> Settings

2) Set the method to "sockets" and set up the ports etc

3) Start the server like this (from the Unix command line):

cd moodle/mod/chat
php chatd.php --start &

4) Go to a chat room in Moodle and open it as normal.
In reply to Martin Dougiamas

Re: What's the chat daemon?

by Sean Keogh -
Just a quick point here...your PHP needs to have been compiled with sockets support.

I know that the PHP delivered with mandrake 10 doesn't have this, as I tried it some time ago.


Sean K beardie
In reply to Sean Keogh

Re: What's the chat daemon?

by Stuart Mealor -
Hi Sean
Do you know if it is an 'easy' process to enable socket support in Mandriva 10.2 ?
I've got everything working perfectly at present to really hesitant about making changes such as this thoughtful
Stu
In reply to Martin Dougiamas

Re: What's the chat daemon?

by N Hansen -
Thanks Martin, I'll look into getting this set up. But what kind of effect do the two methods have on server load/bandwidth relative to one another? And what is the relative effect of the number of people simply logged into chat on speed versus the effect of the number of people actually actively chatting? I'm just trying to get a sense here of how well this will work before I invite a large number of people and have it all come crashing down, which would be a fiasco. What would you recommend as the maximum number to allow in the chat at one time?
In reply to N Hansen

Re: What's the chat daemon?

by John Papaioannou -
Both server load and bandwidth utilization are lower when using the daemon, especially the server load. Too many people in chat will not appreciably reduce the chat speed directly in either case but they will cause the server load to shoot out of the roof, in which case of course speed will decrease as well (but if you get to that point, it's already too late).

It makes a very small difference how many are chatting and how many are idling, I think it's better to just think of each user as "one more user".

Unfortunately, I wouldn't know about recommended maximum number of participants, as I don't have any real-world experience with lots of people chatting. Martin or someone else will have to come to the rescue! wink
In reply to Martin Dougiamas

Re: What's the chat daemon?

by reg phenna -

Is it possible to run the chat daemon on a win 2003 server?

Thanks

In reply to Martin Dougiamas

Re: What's the chat daemon?

by Nikki Macfarlane -
I would like to switch to chat daemon but my programming skills are very very ropey!

I can see in the chat settings where i change to daemon. Can you tell me where I get the port info from? Is this the port info from my server? If so, no problem I can contact the hosting group and request the info.

You said you need to enter a Unix command. Not sure where I do this and does it have to be done regularly or just the once? As you can see, i am not a programmer and trying to set this up with minimal knowledge. Appreciate the support!

Thanks,

Nikki
In reply to Martin Dougiamas

Re: What's the chat daemon?

by Nikki Macfarlane -
OK - I have finally got the unix commands to work - yay!!!!

Do I have to run these lines before every chat sessiona nd keep the unix session open for the length of the chat or is it only run once?

Nikki
In reply to Martin Dougiamas

Re: What's the chat daemon?

by N Hansen -
I know it has been ages since I posted this and I never got around to trying it, but now that I read Martin's instructions, they don't jive with what I see.  In particular, it would be helpful to have some elaboration on this instruction, because I see now "sockets" option available and etc is not a particularly useful instruction:


2) Set the method to "sockets" and set up the ports etc




In reply to Martin Dougiamas

Re: What's the chat daemon?

by Paco A -

Hi. I obtain this error when I try to start daemon:

Command line scripts must define CLI_SCRIPT before requiring config.php

But if I define CLI_SCRIPT in config.php then I obtain an error in the browser due to I've configured it to use PHP from console.

In reply to Paco A

Re: What's the chat daemon?

by Ângelo Rigo -

Anyone is using chat using sockets?

And have a sample of chatd.php to post here ??