Offline/Online Sync in a Real World Ionic Application with CouchDB
This is supposed to be a longer description
Filtering Data from CouchDB
Improve efficiency by only syncing required data
PROModule Outline
- Source Code & Resources PRO
- Lesson 1: Introduction PUBLIC
- Lesson 2: Application Requirements PUBLIC
- Lesson 3: A Brief Introduction to NoSQL PUBLIC
- Lesson 4: Introduction to CouchDB PRO
- Lesson 5: Introduction to PouchDB PRO
- Lesson 6: Structuring Data in CouchDB PRO
- Lesson 7: Installing CouchDB Locally PRO
- Lesson 8: Adding Data to Futon PRO
- Lesson 9: Starting the Application PRO
- Lesson 10: Setting up the Basic User Interface PRO
- Lesson 11: Using Design Documents to Create Views in CouchDB PRO
- Lesson 12: Getting Data From CouchDB into Ionic PRO
- Lesson 13: Using Node, Express, and SuperLogin PRO
- Lesson 14: Login and Registration PRO
- Lesson 15: Offline Access and Reauthentication PRO
- Lesson 16: Advanced Form Validation PRO
- Lesson 17: Restricting Document Updates PRO
- Lesson 18: Filtering Data from CouchDB PRO
- Lesson 19: Improving User Experience PRO
- Lesson 20: Migrating to Production PRO
- Lesson 21: Conclusion PRO
Lesson Outline
Filtering Data from CouchDB
We can automatically sync data from our remote CouchDB database to our local PouchDB database, which is pretty cool. But there could be some problems that arise from that. If it's a small enough amount of data then there won't be an issue, but what about when the application is two years old and maybe 300,000
chat messages have been sent? You probably don't want to keep the entire CouchDB database replicated to the local PouchDB database.
We've covered creating views with map functions, and validate_doc_update
functions, but now we are going to use yet another function with CouchDB to create a filter. This will allow us to filter the data that we want to replicate. What you want to replicate is going to depend on the application, but we are going to walk through implementing a filter that will only replicate documents from the last week.
Thanks for checking out the preview of this lesson!
You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).