Thanks for the response. 

On Tuesday, April 22, 2014 11:02:52 PM UTC+5:30, Jens Alfke wrote:
>
>
> On Apr 22, 2014, at 7:57 AM, Rajagopal V <[email protected] <javascript:>> 
> wrote:
>
> The problem that I have right now is that if any of the webservice calls 
> fail, I would need to inform just that mobile client who created it (Since 
> its not a valid object in the system). I tried to look at parameterized 
> filters, which could allow this as I can pass in a parameter from 
> iOS/Android and return TRUE or FALSE from the filter
>
>
> I don’t understand how you’d use filters for that. Can you explain what 
> you’d do?
>
>
I was assuming a filter that would work like:
{
    "_id": "_design/owndocs",
    "filters": {
        "owndocs": "function(doc,req) { return (req.query.owner == 
doc.createdById); }"
    }
}

and I could pass in the "owner" parameter to the filter. The "createdById" 
is populated from the mobile when the object gets created and with this 
condition, you would only be able to pull the documents that a user created.
 

> My immediate idea would be to just have the server code update the 
> document, perhaps adding an “error” property describing the problem. But 
> that assumes the clients are pulling changes from the gateway; is that 
> happening in your system?
>

Yes, that is correct. All mobile clients are pulling in from the gateway 
and this is what will happen even if there is an "error". I was planning on 
changing the type of the document to "error" and PUT-ting it back to the 
gateway, but that would mean that all the clients will fetch it.

 

>
> Since we have 3000 mobile users and are expecting a surge in the upcoming 
> release (that uses SG + couchbase mobile), would it be okay to  create a 
> channel for each user? Are there any performance implications I should be 
> worried about. 
>
>
> Yes, that works. The overhead per channel is pretty low.
>

I will try based on this approach.

Thanks
Raja

-- 
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/a709c693-83e5-49a4-9f77-a753d723cc38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to