php - How to synchronise two databases that have used by two diffrent application -
i have 2 application
application - database , application b - database b
applications php based using mysql database.both database have table name 'user'.i want synchronize user table when end user update information application should reflect application b.
now 1 more concern in case application has encrypted data , application b have plain database.and both application on different network.
i thinking -
1) database replication ( not sure work due encryption or not) 2) use of web services 3) cron file update both database after interval.
i want best , why . if there other please reply that.
thanks
replication not going out here table structures different. approach i've used before tie 2 systems write small api wrapper around new account, update, login , logoff process.
then when user creates new user or logs in or logs off or updates application can issue curl https call via php server api on application b , update state on there. if can expose same subdomain on both applications ie, appa.mydomain.com , appb.mydomain.com can share cookies makes single login , logoff easier api integration can set proper logon cookies both applications @ same time.
you'll have dig in little bit on how applicationb works build api wrapper, can reuse encryption functions, etc present.
Comments
Post a Comment