mardi 19 avril 2016

Data Layer Design for interacting with different kind of DBs

Problem: One of our module is interacting with 3 different redis[different redis will have different redis-KEYS],mongo DB and mySQL. How should we design data layer so that in future if we change the database, we need not to change the bussiness layer.

Thought of Desing:

Will have 3 different interface for each kind of DB. For redis, bussiness layer will tell which redis to look for a key. But problem is if we change redis machine, bussiness layer need to be change.

Is there any standard way of handling this situation? Any help will be appreciated.

Aucun commentaire:

Enregistrer un commentaire