0

I am working on a pair of services that will update two systems through REST API calls. The first is for location 1, executing update calls on classes that make use of the observer pattern in php, to trigger an update service. This update service then executes the API call to update location 2.

When location 2 gets an update it will also execute a series of updates. These updates will trigger API calls to location 1.

My problem is that this will continue if I don't terminate it at one end. The easiest way I can think to do that is to suppress the Observer in some way. Is there an easy way to do this? Or for that matter is there a better solution to my problem?

brian
  • 1
  • 1
    slap IDs on everything, "this update was triggered by job #FOO". so when the inevitable update comes back to location 1, it can go "oh yeah, I already did this and can ignore it". – Marc B Oct 12 '16 at 14:21
  • It's a cyclical dependency and you need to find a different way to solve the updating problem, if you value your sanity. – apokryfos Oct 12 '16 at 14:33

0 Answers0