mercredi 6 mars 2019

Is Observer pattern the best design for below scenario?

Synchronization with scalable design

We receive a request to configure App1 App2 and App3 using an AppHandler.

The output from App1 is needed to configure App2 and response of App2 is needed by App3 for configuration

The design should be scalable and should meet high number of configuration request like 50,000 msg/sec.

We gave a thought to Observer pattern but looks like it is not scalable and has issues with handling messages at such high intensity.

Excerpts and Source of above information

Typically the observer pattern is implemented with the "subject" (which is being "observed") being part of the object, whose state change is being observed, to be communicated to the observers upon occurrence. This type of implementation is considered "tightly coupled", forcing both the observers and the subject to be aware of each other and have access to their internal parts, creating possible issues of scalability, speed, message recovery and maintenance (also called event or notification loss), the lack of flexibility in conditional dispersion and possible hindrance to desired security measures.

Source: https://en.wikipedia.org/wiki/Observer_pattern

Aucun commentaire:

Enregistrer un commentaire