Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A practical approach on designing offline onlin...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

A practical approach on designing offline online sync system

I had the opportunity to implement a offline online sync system for a customer who is running a chain shop in Bangladesh. Network connectivity is not persistent so I had to come up with a practical solution. I explained my journey in this slide and this video series.

Ep1 https://youtu.be/5O8fMzTLKsY
Ep 2 https://youtu.be/MnSne7fjIuQ
Ep 3 https://youtu.be/jqoFjhcp1xA

Avatar for Foyzul Karim

Foyzul Karim

January 28, 2021
Tweet

More Decks by Foyzul Karim

Other Decks in Programming

Transcript

  1. Designing offline online sync system How to design and implement

    a (partial) offline–online sync system
  2. Common Ideas • Database : built-in support • Couchbase •

    PouchDB • Firestore • Cloud vendors • Database replication • Handle the replication by managing master and slave model • Database is inside of the browser • Use local-storage and PWA
  3. Problems • CouchDB is not traditional database, so hard to

    use it in traditional business scenarios • Same issue goes with any other built-in sync supported databases • Database replication has • Security issue • Conflict issue • Business logic handling issue • Browser based system • Not possible if the dropdowns have too many items. • Browser has storage limitation. • SQLite can be shared with anyone • New browser needs to load all required data • Background processing in the browser can hamper performance
  4. Plan • Try to find which features are actually needed

    in offline • Sale entry • Follow the git style • Pull • Then push • Try to leverage the infrastructure and user base • Azure cloud messaging (Queue) • Visit outlets and setup necessary software. Teach the user to run the command
  5. Code Database Queue Code Database Queue Client Timer service Local

    machine in a branch Cloud components Trigger
  6. Find me • Facebook: https://www.facebook.com/foyzulsacademy • Blog: https://dev.to/foyzulkarim • Twitter:

    https://twitter.com/foyzul_karim • GitHub: https://github.com/foyzulkarim • LinkedIn: https://www.linkedin.com/in/foyzul • Email: [email protected]