locked
Best practices for web caching RRS feed

  • Question

  • Have you developed any best practices for caching Sync Services objects when used in a web service? I'm building SyncSchema and SyncAdapters from Oracle schema calls, which is slow and only needs to happen once.

     

    Dave Michel

    • Moved by Max Wang_1983 Friday, April 22, 2011 9:42 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, November 19, 2007 4:26 AM

Answers

  • We don't need to each time, but there may be a number of production schema changes over the next few months. For now, I'm caching all SyncServices server objects in the HttpApplicationState without any known problems. It is likely that we'll implement an XML structure for specifying schema and SyncGroups so that we don't have to recompile on a schema change.

     

    Dave

     

    Tuesday, November 20, 2007 7:56 PM

All replies

  • Hi Dave,

     

    Why do you need to get teh schema dynamically from the database each time? The the schema should be hard coded in your application (SyncSchema object that is). The sync commands you write should not be changing either.

     

    Thanks

    Tuesday, November 20, 2007 7:50 PM
  • We don't need to each time, but there may be a number of production schema changes over the next few months. For now, I'm caching all SyncServices server objects in the HttpApplicationState without any known problems. It is likely that we'll implement an XML structure for specifying schema and SyncGroups so that we don't have to recompile on a schema change.

     

    Dave

     

    Tuesday, November 20, 2007 7:56 PM
  • That's fine, just keep in mind that schema change are not propagated to the clients by Sync Services. That said, clients might have to reinitialize their db to get the new changes in schema and data.

     

    Thanks

     

    Tuesday, November 20, 2007 7:59 PM
  • I added a GetTableNames WebMethod to the web service so the client gets a current list of the syncable Oracle tables based on schema. I build the SyncAdapters from this call so that if we change implementation on the server, I don't have to change anything on the client. Of course, they'd need to rebuild their local database if we make any changes. I don't know if I'll have a chance to do anything about that before rollout.

     

    Dave

    Tuesday, November 20, 2007 8:08 PM