About Contentstack DataSync
Contentstack DataSync is a robust utility designed to keep your published content synchronized with your local database. It ensures that the most recent publish, update, and delete operations done on your entry, and/or assets reflect automatically on the content.
Key Benefits of Using DataSync
DataSync offers several key benefits:
- Reduced API Overhead: By caching content locally, DataSync minimizes the number of API requests to Contentstack, reducing latency and improving performance.
- Real-time Syncing: Every change in the content is automatically synced with your local database.
- Offline Access: Serve content from your local database even if your connection to Contentstack is temporarily unavailable.
- Flexible Tech Stack: DataSync is language-agnostic. You can use it with any front-end or back-end framework that can interact with the synced database.
Additional Resources: To learn how to implement DataSync with an application, you can refer to this Node.js example app guide.
Contentstack DataSync SDKs
To cater to different storage and performance needs, Contentstack provides two SDKs under the DataSync utility:
- MongoDB SDK
- Real-time sync with MongoDB
- Rich querying support using MongoDB tools
- Scalable for large content sets
- Filesystem SDK
- Stores data in flat JSON files
- Lightweight and easy to set up
- Suitable for JAMstack and serverless applications
The MongoDB SDK syncs your content to a local MongoDB database. It’s ideal for applications that prefer structured querying and faster read access.
Key Features:
The Filesystem SDK stores your content locally in JSON files. It’s best suited for static site generators or environments with minimal infrastructure requirements.
Key Features:
Additional Resource: To know more about the MongoDB SDK and FileSystem SDK, refer to the Get Started with Contentstack MongoDB SDK and Get Started with Contentstack FileSystem SDK documentation.