4 responses to “The Challenge of Offline Saas Revisited”

  1. Aad 't Hart

    Devan,

    You are absolutely right that offline access brings a lot of challenges and often is saying No, we can’t do that the best solution. It provides stability and accuracy what is extremely important for a efficient business process.

    The best alternatives are probably hybrid solutions where the offline environment can still connect on demand to the cloud when necessary. In this case the data transfer is limited and other technologies can be used.

    If you take your example of the invoice number the offline client could just request a new number in sequence from the cloud. This request could use different technologies, for instance also text messages on a phone… Alternatively you could allocate a batch of numbers for the local environment and refresh the batch on demand. Say with 10-100 at a time.. depending on the average volume of invoices a day per sales person.

    Suc6 with the solution…

  2. Paul Michaud

    Hi Devan,

    Actually for the invoice issue you mention, the best way is not to use an auto incrementing invoice number. There are a couple of approaches that work. Mainly, you need to use a unique key that can be generated independently by each instance and still be guaranteed to be unique. I have seen two main approaches:

    1) Use a GUID. its guaranteed to be unique and won’t clash. Downside. ugly to read so often map it to a human readable invoice number using some schema later.
    2) Use a partitioned key gen of some kind. for example each application instance has a uniqueID or user the userID in the instance. Append to the instanceID an invoiceID. For example: InstanceID-InvocieID. Again should be unique always and more readable.

    Just remember don’t use the database autoincrementing key for any distributed system or one that needs to scale huge. it will be guarenteed to be a problem if you do. (I just know I am going to get flamed by a bunch of DBA’s for that now :D )

    For very high volume systems we tend to go with solution 1. Remember if you only allow 6 digits then you can’t sell 1 million items. Will cause problems later.

    For the inventory update issue, short of forcing a synch before doing a sale, there really is no way to keep the records coherent that I can think of.

    Paul

    Paul

  3. Devan

    Thank you Aad and Paul for your input. Some great ideas here.

    For the record, I agree with you Paul, about the auto incrementing keys for the database – we used to use them religiously but are moving away from them to GUID style keys because, as you pointed out, they just don’t scale when you start looking at load balanced server and replication etc.

    Both your ideas about partitioned keys, and requesting the next invoice no. via SMS etc. are pretty cool, and I will get out development team to investigate those.

    Cheers, Devan.

  4. rrodriguez

    I developed a solution for a customer with high inventory rotation and provided them with USB Data Cards which are not that expensive.

    So most of the time they are online.

    It is based on Adobe Air which has a local DB. So when it is off-line it uses the saved inventory and saves the invoices ( orders ) in the local computer.

    In this case invoices need managment approval, so we only provide a receipt, and don;t have to worry about invoice numbers. But I guess separate numeration is a good option.

    When the computer goes online, then inventories are automatically sync-ed and invoices are sent for approval.

    Once they are approved they are sent to the customer.

    In inventories we use a couple of fields to control problems, first a max sale amount that can be adjusted per product once inventory runs low. This will control the over selling of an item.

    The other field we use is one that requires salesman to call the office when trying to add it to an invoice.

    Adobe Air is a great tecnology that allows for complicated interaction to be presented to the user in a very simple manner.

    On the last part, there will always be human interaction and process. Where sometimes problems need to be fixed by humans with a commercial edge.