We have a third party app that allows users to manage their catalog. The app uses the Magento API to fetch catalog data but it is very slow and it offers no pagination.
I want to cache the catalog database in this app's local database to avoid making API calls on every page load. The local database should remain in sync with the magento database but I do not require all of the catalog tables (and certianly not the EAV structure) to be copied. Because of this I'm thinking the sync process should be event-based and not rely on database replication tools. Both apps have APIs that can be called to update info on both sides.
Edit: I would be updating one product at a time and not the entire catalog. When a product changes on one said, I'd make an API call to the other side, sending information of what changed.
These are the events that I think I would need to watch to assure 100% sync:
In Magento (afterward, send update to external app)
- Product is created/edited in the Magento Admin Panel.
- A purchase is made and inventory is modified.
In external app (afterward, send update to Magento)
- Product is created/edited from the app.
I think this should be enough to keep the information synced. Otherwise I'll have to do some cron jobs from both apps to compare against the other app every now and then. Or something of the sort.
Question: Can anyone see something potentially critical that I've overlooked? Are there more events I should be aware of? Has anyone done something like this?