I have a use-case at my work where we have an inbuilt CMS-like system built for maintaining our marketing website. Each page is data driven, made up of components that receive props and behave accordingly. The data is stored in MongoDB and is served through a Node server.To update and create pages, we have an in-house tool built which basically updates the MongoDB data and the changes are reflected on the website. There are a handful of operations possible on the page data, e.g. addition of component to the page, updating existing component instance's data, reordering components, or creating a whole new page from scratch.Whenever we have a major change or page creation to be done on the website, we do it on a testing environment, and post QA move it to production. There are also times when one environment is required for some other urgent purpose and so the page has to be moved to some other environment. Currently the process of moving this data between environments is manual, i.e. we either replicate the process on the production version of our internal tool that allows page creation, or sometimes call APIs that create this data.I would like to know what would be the best approach to implement a system that would do this kind of data migrations, given that there are security restrictions applied on DB level, and that the actual data is not in one single collection, but spread into individual levels (component, page, layout etc). Also, the complete data cannot be dumped, as there is other data that shouldn't be affected.One solution that came up during a discussion was creating a separate node server that has security rights to all the env DBs and exists for the sole purpose of exchanges between them. Would love to hear your thoughts as I'm fairly new to doing something like this and wanted to hear how, if anyone has implemented this before.
Submitted February 07, 2020 at 03:06PM by mohitk05
No comments:
Post a Comment