Anyway to query the backend store without syncing?

12 posts, 0 answers
  1. Simon
    Simon avatar
    52 posts
    Member since:
    Jun 2010

    Posted 22 Jun 2013 Link to this post

    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?
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 26 Jun 2013 Link to this post

    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.
  3. DevCraft banner
  4. Simon
    Simon avatar
    52 posts
    Member since:
    Jun 2010

    Posted 26 Jun 2013 Link to this post

    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.
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 01 Jul 2013 Link to this post

    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.
  6. Simon
    Simon avatar
    52 posts
    Member since:
    Jun 2010

    Posted 01 Jul 2013 Link to this post

    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
  7. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 01 Jul 2013 Link to this post

    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.
  8. Simon
    Simon avatar
    52 posts
    Member since:
    Jun 2010

    Posted 01 Jul 2013 Link to this post

    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?
  9. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 01 Jul 2013 Link to this post

    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.
  10. Simon
    Simon avatar
    52 posts
    Member since:
    Jun 2010

    Posted 01 Jul 2013 Link to this post

    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
  11. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 04 Jul 2013 Link to this post

    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.
  12. Simon
    Simon avatar
    52 posts
    Member since:
    Jun 2010

    Posted 15 Jul 2013 Link to this post

    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;


  13. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 16 Jul 2013 Link to this post

    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.
Back to Top
DevCraft banner