Re: [Cppcms-users] Server Sent events and CppCMS
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-08-09 10:29:12
|
> I have the following app > https://github.com/paullik/webchat/blob/master/src/index.py it is a webchat that > > uses AJAX and server sent events (SSE). > > But I'd like (for exercise) to port it to C++ using CppCMS. Are you familiar with this? http://cppcms.com/wikipp/en/page/cppcms_1x#Comet.Programming > I'd like to use only the RAM, so I'd like to get rid of redis. > Will it work if I create a vector of messages (or a queue) where I'll store > the > messages and I'll pass this vector to the function at point 1 to sent the > messages to the other users, then remove that message from the vector in order > to be prepared for the next one? I may suggest to keep last X messages in the memory and if user logins too late it would get only last messages and make the user request messages in queue from some counter, something like that. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |