It's not super well documented but coax has a changes handler that uses 
longpoll: https://github.com/jchris/coax

On Friday, May 9, 2014 12:49:36 AM UTC-7, Dave Holdsworth wrote:
>
> Thanks for the advice. Unfortunately the _changes feed=continuous doesn't 
> seem to behave very well for the sync_gateway (or I've misunderstood how to 
> get it to work) and it looks like follow is built on that.
> I should be able to roll my own using feed=longpolling.
>
> On Thursday, 8 May 2014 10:36:19 UTC+1, Dave Holdsworth wrote:
>>
>> I am considering building a turn-based card game using Couchbase Mobile.
>>
>> The playing sequence is as follows:
>> Deal cards to Player 1 (face-down)
>> Player 1 Actions         (on table)
>> Deal cards to Player 2 
>> Player 2 Actions
>> Deal cards to Player 1
>> ........................
>>
>> A server will deal the cards and handle the actions through the sync 
>> gateway.
>>
>> It seems to me I could have 
>> A) a channel per player and duplicate the game state to both, plus the 
>> cards to the next player to act
>> B) a channel per game and only push the latest revision with cards to the 
>> next player to act.
>>
>> Is this an inappropriate use of revisions?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/25bbeb6c-4979-4399-89bc-8cda716abecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to