On 24/08/10 17:21, Artur Reilin wrote:
> I thinking about coding a chat with sqlite. You know the most hosts not
> allow you to use chats or something that way, because they write and read
> to often data from mysql database.
>
> So my thought is to make a chat which use forums software mysql tables for
> user data, but writes and read chat text from sqlite database. As the chat
> content get pruned after some time, the database can't grow big. So the
> insert and selects should be fast.
>


I have already made a chat that uses SQLite.  Its available to clone 
from my git repository (licenced under the GPL).

See http://www.chandlerfamily.org.uk/content/software

To clone the repository you need

git clone git://www.chandlerfamily.org.uk/mbchat.git

This originally started life as an mysql database version, but using it 
on the web site I wrote it for (http://www.melindasbackups.com) it ran 
out of steam when 20 people were using it (as it had to poll the 
database every 2 seconds per user to get a sensible performance).

I went through some intermediate stage of using named pipes and sqlite 
before landing on the current version that forks a chat server for the 
time that anyone is in chat.  I have also added optional security 
controls so that its possible to encrypt chat messages.

It has multiple rooms which are added via adding them to the database, 
and various permissions and colours for users. (users see some rooms as 
public, others are moderated, and others they see only when they are 
members of a specific group - we used them as committee rooms).

There is a useable demo here

http://chat.hartley-consultants.com/

which is stand alone.  The code can also link to an SMF forum and derive 
username from the login identity of the user on the forum.



-- 
Alan Chandler
http://www.chandlerfamily.org.uk

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to