Offline First …
No connection oops..

Next step in mobile computing will be the mobile apps which will be operational even if your device is not having internet connection.

Few days back I came across similar requirement from the customer where customer wants 7 features (out of 10) of app fully functional in offline mode. The trend which we were following till that time was to use sqlite for local storage which also holds configuration related parameters of an app connected by web API using nodeJS or ASP.net for pulling out latest information from RDBMS. It works offline however there is bit of pain when try to sync data with RDBMS back and forth, which includes developing complex API and managing network latencies. To some extent its hamper the performance and usability of application.

Instead of following the trend we decided to use something new in this case. The reason for looking out something new was due user base of this application which was in ten of thousands. Having searched on the internet for the best possible solution to offline first, most of the techies recommended Couchdb.

Couchdb is no sql database, learning No Sql for someone like me who is working since 15 years in industry using Relational database was a big challenge. Couchdb in actual is very straight forward and easy to use db if you know the javascript. The beauty of Couchdb is not only JSON like object store along with tightly bound http APIs but also replication. In fact its replication feature that makes offline first requirement looks so easy.

With couple of days of study and small POC in ionic framework + Pouchdb + Couchdb we all are assure that this will be the perfect choice for handling the requirement. Learning curve was steep as we never used no-sql db and even for us concept were not much clear we need to come out of typical relational data models mentality which took some time and hamper the first sprint delivery.

With the time and learning we started to like Couchdb for its subtleness and simplicity. We were able to deliver the project well in time and with quality having said we faced many issue issues in this journey however as someone said “If you love what you do you will definitely get a solution to the problems you have in doing it”