Spouark Spouark - 2 years ago 146
SQL Question

How to link mySQl and mongoDB

I have a website running on wordpress using mySQL and a node server storing data in a mongoDB (using mongoose).

Users register by the website where they are stored in the mySQL database in order to use the node API, but this server need to check user registration in the wordpress database. How can I do ?

Answer Source

First things first: DB is a persistence layer.

That means, on app side, when your user is registered - you need to control access to resources and also propagate ACL values to all underlying persistence providers.

When user is logged/verified than application logic need to decide how to get requested documents and which persistence provider will be selected.

Using CQRS pattern in application will help you to segregate calls to different persistence providers and manipulate data.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download