Custom Data Sync Service possible? (Wrapping OTB data sync service)

469
2
10-05-2011 11:30 PM
DanielBaternik
New Contributor III
Hi all,

I have a mobile app which will require the ability to sync data in the field. I want to use the OTB data sync capability to do this, however i also have the requirement to perform some additional server side tasks before and after the data sync service call.  The tasks will be to enforce pre\post sync auditing and run some calculations on the synced data.

I would prefer not to have the client call multiple services (performance + a potential security threat as they could sync without passing through the audit trail)

I"m not sure if this is feasible, but what i'm trying to do is create a SOE which the following functionality.


Invoke SOE
    Call PreSync Service
    Invoke OTB ArcGIS Mobile Data Synchronisation Service via the REST interface (Block)
    Call PostSync Service


I would then try and have the client call the SOE to sync data instead of the normal REST endpoint.

Is this possible? Any help would be greatly appreciated.

cheers
0 Kudos
2 Replies
StevenSchuldt
New Contributor
Greetings, I'm afraid I don't have a direct answer, although I'll offer you an opinion.  Now granted I don't know the size and scope of your project, but from what admittedly little I know about SOE's, it seems like it might a lot of work - and you may be able to alleviate your security concern in a different manner.  I do like your idea though, and let me know if you follow through with that path.

As an alternative, say you do require the client to call multiple web services - you could enforce that the syncing would fail by adding a column to each layer with an AuditID.  Your pre-sync audit service does it's thing and stores a result in the DB "SyncLog" with a Guid or something, which is then returned to the client.  You could then update the features's AuditID  with the Guid, and have triggers on the DB that check for that value against your SyncLog table, and don't allow the updates/inserts if things don't check out, therefore the sync would fail.

I realize that may be a bit of work too, and definitely more of a hack, but in the event that the SOE route isn't feasible, just another thought.
0 Kudos
DanielBaternik
New Contributor III
Thanks Steven,

I'll definitely consider your proposal.

I will have to look more into the custom sync SOE approach, as it doesn't appear anyone has tried it before.

cheers
0 Kudos