Monday, July 12, 2010

Sending And Receiving SXP from iPhone

When developing client application you always need to learn the server API. In the case of ClickMobile, there is more than few Special SXP calls to learn.

The beauty of ClickMobile is in the details (as Prof. Ben-Bassat always said: the strength of Service Optimization is in the details, years of experience in this field made the solution of ClickSoftware so comprehensive).

The Windows CE mobile client is using SQL Server CE to synchronize local database with the server database (SQL Server CE? not with iPhone). But the way the client sends SXP calls and receives the response is another layer on top of that.

The server maintains two tables for requests and responses. The client pull and push records from and to these tables using synchronization of local replica. The server scans the requests table using background process (agent), which performs a scan every few seconds (configurable interval). For each processed request it's generates response record. But the server also generates response records as a result of Server Events (like Task Update, etc.).

So, to send and receive SXP, like ClickMobile, from platform that cannot use SQL Server CE, you need to: (A) Create replacement for SQL Server CE database synchronization. (B) Insert special ClickMobile SXP calls into special request records. (C) Synchronize the requests table. (D) Constantly synchronize the responses table. (E) Get the SXP results from the response records. (F) Clean used response records (or let the server do so after few days).

Important note regarding The requests and responses tables: each user should only use records that aimed to him. Synchronizing records of all clients is costly and unnecessary.

OK, so now I can tell you that I'm already passed this stage. Now let's connect the background service with the UI...

No comments:

Post a Comment

Please keep comments clean at the ClickDev blog.

 
HTML Hit Counter