SOA / SEDA - Arquitectura cíclica

I have a real life SOA problem that I can't seem to solve in a clean SOA manner.

I have many distributed producers of "update thing" messages which get consumed by the "thing manager".

One of the features of the "thing manager" is to publish to a topic notification that the "thing" has changed. This allows other interested services to react to the change.

One of the "update thing" producers is itself a listener to the topic. It is only really interested in "thing updates" from other systems. But it finds itself consuming and processing updates from the "thing manager" that it itself caused in the first place (and hence already knows about). Luckily the feedback loop is broken at that point.

How best to solve this problem in a clean SOA manner? I do not class adding metadata to the message indicating message source to be a clean solution; a message consumer should never have to know where a message came from or is going to.

preguntado el 02 de febrero de 12 a las 11:02

1 Respuestas

When an "update thing" subscribes to a "thing manager" it should be able to set filters on what "things" it wants to subscribe to. One filter that all "update thing"s should set is do not send me anything that originated from myself. Then the "update thing" would not know the origin of the message but the "thing manager" would.

Respondido 02 Feb 12, 17:02

Thanks Kevin - the nature of the data is the same whatever the origin. So there is nothing about the data structure itself which would enable selective consumption. I think what you are suggesting then would be for the originator of the original update to mark up the message header - which is something that feels wrong to me from a SOA perspective. One of the reasons is that there are quite often many processes in between the event origin and the thing manager - and each would have to know to carry the metadata through and not replace it with its own ID... - Mike

It does not have to go in a message header. "thing manager" must have a subscription list to know who to send messages out to. What identifies the other services to call in this list. Include this in the data structure. If you are working with services that are out of your control and have well defined contracts that cannot change then the issue is different from a system you designing from scratch. And perhaps I am making a huge assumption that you are using a publish/subscribe design pattern. - Kevin Junghans

Ah, but that would be a point to point architecture and unfortunately we have a pub/sub (topic based, not queue based) architecture. The thing manager doesn't need to know who it needs to tell about stuff, it just does its job, and things subscribe and react if they feel like it. Perhaps this becomes a question of whether topic based pub/sub is a good or a bad thing in terms of large scale SOA systems? P2P becomes fragile, but workflow can be easily traced and monitored. Pub/Sub less so but easier to evolve the system. But clearly, easy also to introduce feedback loops... - Mike

¿Podrías contestar por favor?… ? - LCJ

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.