Thursday, May 24, 2012

Re: I need a django application to embed a chat javascript in admin site

Implementing a simple global chat is pretty straightforward:

1- Don't use database
2- Implement filesystem based locking (multithread safe)
3- if there user wrote a new line, acquire lock and append the new line to the file.
4- releaase lock
5- send the last lines to the users. I recommend you to make a system call to "tail -n ??? [filename]", but you can implement you own last lines reading algorithm, much harder than it appears because you have stay friendly with kernel's readahead and disk cache.

You can have your chat log file in any format that fits you, (html, json, etc).

Then, for user based chat, just make the chatlog named after [user1]-[user2].chatlog, having user1 and user2 sorted alfabetically.

The hardest part is all the html an javascript needed, specially in multiuser chat, because you have to handle list of users and window opening.



On Wednesday, May 23, 2012 4:37:42 PM UTC+2, Ariel wrote:
Hi everybody,

I need a django application to embed a chat javascript in the admin app of my web site, I would like when the users are authenticated be able to contact by chat any other user authenticated in the admin site.

How could I do this ???
Is there an application to make this ???

Regards,
Ariel

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/dXCODutfzXgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate