This is a migrated thread and some comments may be shown as answers.

Anyway to query the backend store without syncing?

11 Answers 62 Views
CloudDataSync
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Simon
Top achievements
Rank 1
Simon asked on 22 Jun 2013, 09:03 AM
One case I need to fulfil because lots of shared users will likely access the service I'm implementing is this.

The server store will contain all shared records and only those records a user is working on will be accessible in the client (currently fulfilled)
However If I want to search for an existing shared record that is outside of my existing synchronisation filter how could I do that, basically searching the server for a record not yet in my local db and if found add it to me local db for synchronisation.

A similar use case would be a user directory for friends, the server would contain all users but I only want the mobile app to synchronise those friends the user has selected (using a join table to link them)

Currently I cannot see a way to just search the server for an existing record without synchronising the entire table.

Any thoughts?

11 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 26 Jun 2013, 06:46 AM
Hi Simon,

Thanks for writing and for the provided feedback.

The idea behind the SynchronizationFilter is to limit the items being part of the synchronization context that works on a given Everlive table. Setting a SynchronizationFilter will limit the synchronized items to those who pass this filter - only the filtered items will be stored locally and synchronized with the cloud. With the current state of implementation, if you want to add a new item to the context it should pass the condition that the SynchronizationFilter enforces.

So is it your scenario related to browsing through records that exist, yet are not part of the current SynchronizationContext with a potential possibility to add them to the context?

Currently you could use the Everlive SDK to search for items, update the properties of those you want to have in the SynchronizationContext and call SynchronizeAsync to make sure they are downloaded.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Simon
Top achievements
Rank 1
answered on 26 Jun 2013, 08:27 AM
I like the idea of the synchronisation context and filters as they control what is retained on the device and what the user sees.

However it also has to support the scenario where I can search / subscribe the user to new items that will be outside of the original filter.

Another for instance:

A Conference schedule app.
I want the user to see only the sessions they have subscribed to by default in the app (filtered to subscribed only using either a subscription flag or table)
But I also want to enable the user to search for new sessions they are not aware of but I don't want the entire catalogue synced to their device.
With Build on at the moment it seems a fairly good example, don't want to sync every build session that has ever happened :D

So there is a case for synchronised content and the ability to just search the server for new information.
0
Deyan
Telerik team
answered on 01 Jul 2013, 06:19 AM
Hello Simon,

Thanks for writing back.

In my previous response I mentioned the Everlive SDK for browsing items in general. Since the SynchronizationContext has its SynchronizationFilter set, it basically does not download all the available items but those that pass the filter. That happens on the server. The SynchronizationContext uses the Everlive SDK to make the server queries so you can use it too to fetch items that are not part of the filter, modify them so that they pass it and add them to the context. Is that alright for you?

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Simon
Top achievements
Rank 1
answered on 01 Jul 2013, 01:01 PM
I'll give that a try, though last time I tried to query something outside the filter criteria I go no records back as if the query was also bound by the filter criteria
0
Deyan
Telerik team
answered on 01 Jul 2013, 02:38 PM
Hello Simon,

Sure!

The Everlive SDK is independent from the SynchronizationContext, so you should be able to query all of your items from a given Content Type. If you, however, insert them into a SynchronizationContext that has some kind of filter defined and they do not pass the filter, they will be deleted upon next SynchronizationAsync call as per the current implementation.

Let me know should you have further questions.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Simon
Top achievements
Rank 1
answered on 01 Jul 2013, 03:01 PM
Thanks for that.
Need to test my thoughts, but how would you insert data that is currently outside of the filter criteria to enable it to be in your criteria.  i may be mumbling here so will need to test.

Using the subscription model description above if I search for a contact using the Everlive SDK (not entirely sure what you mean by that) and then associate the contact with a user, would that even work as initially it would be outside the scope of the filter.

Can you provide further detail of what you refer as the everlive sdk?
0
Deyan
Telerik team
answered on 01 Jul 2013, 03:09 PM
Hi Simon,

Maybe I should have been more clear regarding the Everlive SDK.

The Everlive SDK is the .NET SDK for Windows Phone which gives you access to our Cloud Services. It is what the SynchronizationContext uses to connect. Therefore the SynchronizationContext builds ontop of it. So you can use it independently to query data from Everlive.

The SDK is situated in the Telerik.Everlive.Sdk assembly you are already using in your project (take a look at the references folder). You can find more info and help here: www.everlive.com

The Telerik Cloud Controls for Windows Phone (the Telerik Cloud Sync mechanism being part of them) are tools provided by Telerik that use this SDK to extend the functionality considering common Windows Phone scenarios.

I am attaching here the most recent version of our online help regarding these tools for your convenience. It will be live tomorrow on our website.

Feel free to write back in case of further questions.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Simon
Top achievements
Rank 1
answered on 01 Jul 2013, 03:23 PM
Thanks, that makes things a lot clearer now.

Certainly needs round trip level of documentation for using the service and highlighting where EverLive fits in with the Cloud sync service and where the boundaries are for each service.
Will also be very useful when / if the cloud sync supports other backend providers to understand the could sync place in app make-up
0
Deyan
Telerik team
answered on 04 Jul 2013, 10:34 AM
Hi Simon,

We will consider this thread closed for now.

Stay tuned and follow our blog posts and announcements for further information on the Cloud components.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Simon
Top achievements
Rank 1
answered on 15 Jul 2013, 10:36 AM
Just to complete this thread for other consumers.

To access the Everlive backend reference, refer to this post - http://www.telerik.com/community/forums/windows-phone-8/cloud-data-sync/ability-to-use-everlive-sdk-with-existing-cloud-sync-connection.aspx

But basically instead of 
var app = new EverliveApp("APIKEY");

Use the following
EverliveApp everliveApp = CloudProvider.CurrentProvider.NativeConnection as EverliveApp;


0
Deyan
Telerik team
answered on 16 Jul 2013, 08:55 AM
Hello Simon,

Thanks for pasting this information here.

We will be including it in our upcoming Online Help update regarding our Cloud Components for Windows Phone.

Let us know should you have further questions or need assistance.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
CloudDataSync
Asked by
Simon
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Simon
Top achievements
Rank 1
Share this question
or