I’m going to Mars. Can I use the application?

Disconnected Module is meant to let windows applications run offline by copying a subset of the database and run the server side code locally.


Once the disconnected module is started, a disconnected strategy has to be set for any entity, for example:

  • Download all customer, but let me only modify (and upload) the onea I’m visiting. Lock these customer in the server so nobody can modify them until I turn back.
  • Download the orders of the customer I’m visiting, but keep them read-only while offline. If I create a new order though, upload it.
  • Do not download any exception (or operation logs) in the server, but upload the ones I create offline.

All the disconnected strategies guarantee that there will be no conflicts by letting only the disconnected machine, or the server, modify any particular entity instance (but both can create new ones).

User Interface Integration

The real magic is that all this restrictions are automatically integrated in the user interface using the same extension points that Authorization module uses. This means that, once the Disconnected module is configured, the developers do not need to take disconnected scenarios into account when writing the business logic or user interface of the application.

Transferring Database Backups

Technically, Microsoft SQL Server Local DB is used for the disconnected machines. When a client machine decides to go offline, this is basically what happens:

  1. The server machine 
    1. Creates a new database. 
    2. Fills just the necessary data (depending on the download disconnected strategy)
    3. Reeds the ids to the client machine range, to avoid conflicts with new entities
    4. Creates a backup of this new database.
  2. The client machine 
    1. Downloads the file. 
    2. Restores the new database.
    3. Restarts the application locally

When the client machine turns back to the company headquarters, and wants to work online, a oposite sequence of steps are taken, and finally the two databases are merged.

Turn back to Signum Extensions