Hi, i´m doing the same, but in asp.net.

instead of send requests to server, use a while(true) loop to keep sending
info for the client.

if the interval between the messages is larger, back to the js getmessage.

now, to your question:

how are you selecting the data?

2011/1/4 - - <[email protected]>

> hello,
> I'm trying to write a chat server with memcached. I decided to use memcache
> because of
>
>    1. Faster than using HDD ( Database )
>    2. Cheaper than using HDD ( Database )
>    3. No need to save history
>
> I want to take information from you about how much is it logical.
>
> I'm using php and javascript
>
> chat.php
>
> There is a two JS function.
> getmessage: every one second making a request to getmessage.php
> setmessage: sending input valutes to setmessage.php
>
> getmessage.php
> getCache($room,$data); ( $data is array hold username and text )
> remove($room)
>
> setmessage.php
> setCache($room,$data)
>
>
> But it's not working as i want. When there are 2 or more users, message
> doesn't go everyone.
>
> I used lock's but it didn't work.
>
> Is there any example, that i can take a look  ?
>
> Is it logical to write a chat with memcached ?
>
> Thank you

Reply via email to