Nuno Lopes | 1 Feb 10:08
Picon
Gravatar

Re: Issue with Publish/Subscribe



Hi,

Events reflect what gets changed as a consequence of executing an operation against an Aggregate. In other words, that is the axis of change for an event (fact), not what the supplier needs to know. They aren't DTO's, they aren't even Messages.


On Jan 31, 2012, at 11:23 PM, mikehamedani wrote:

 

Hello,

I was having a chat with a friend about publish/subscribe but he raised an issue that I had no answer to. Consider this scenario:

Our publisher publishes message X. Tomorrow we need to add a new subscriber but this new subscriber needs more data than what is currently included in X. So, we'll have to modify the publisher "because of this new subscriber", which affects the loose coupling of these components.

He also mentioned that now that you want to release this subscriber, you should also manage to release the new version of publisher with the new message format at the same time, which leads to release management headaches.

What is the right approach to address these issues?

Mike




__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
remyfannader | 1 Feb 10:20
Picon

Re: Issue with Publish/Subscribe

Events are meant to happen once; they are associated to changes in the
state of objects or activities. They can be known directly or though
messages but messages are not to be confused with referred events. And
event descriptions are not supposed to change (except for expected
ones).
http://caminao.wordpress.com/when-representations-are-to-be-used/events-\
2/
http://caminao.wordpress.com/how-to-implement-symbolic-representations/p\
atterns/functional-patterns/event-patterns/
Remy.
--- In domaindrivendesign <at> yahoogroups.com, Nuno Lopes <nbplopes@...>
wrote:
>
> Hi,
>
> Events reflect what gets changed as a consequence of executing an
operation against an Aggregate. In other words, that is the axis of
change for an event (fact), not what the supplier needs to know. They
aren't DTO's, they aren't even Messages.
>
>
> On Jan 31, 2012, at 11:23 PM, mikehamedani wrote:
>
> > Hello,
> >
> > I was having a chat with a friend about publish/subscribe but he
raised an issue that I had no answer to. Consider this scenario:
> >
> > Our publisher publishes message X. Tomorrow we need to add a new
subscriber but this new subscriber needs more data than what is
currently included in X. So, we'll have to modify the publisher "because
of this new subscriber", which affects the loose coupling of these
components.
> >
> > He also mentioned that now that you want to release this subscriber,
you should also manage to release the new version of publisher with the
new message format at the same time, which leads to release management
headaches.
> >
> > What is the right approach to address these issues?
> >
> > Mike
> >
> >
>

------------------------------------

Sławek | 1 Feb 18:16
Picon

Re: Issue with Publish/Subscribe

If specific listener needs more data than it's its problem to gain that data.

For example call some service that provides additional data. We can assume that Event contains some IDs or
sth that is sufficient to load some additional data in specific listener.

As mentioned in previous posts: Event is not a DTO. Ideally object that fires event reveals what he wants to
reveal, not what is demanded by the outer wold. But of course in brutal world sometimes it's better to break
decoupling and abstraction by revealing more (leaky abstraction) in sake of performance:/

S³awek Sobótka
http://code.google.com/p/ddd-cqrs-sample/

------------------------------------

mikehamedani | 2 Feb 02:49
Picon

Re: Issue with Publish/Subscribe


Interesting point. I completely agree that publisher should decide what to reveal, rather than being
dictated by the other world. 

Ok, now here is the challenge. If you've read about Udi Dahan's view of SOA, there is no synchronous
request/response between services in his view, as this increases the coupling between services. 

Now, if Service A publishes an event but Service B needs more data than is available in the event, it will have
to query Service A for this additional data. I can't think of any other ways to obtain the additional data if
synchronous request/response is not allowed and events are not going to be changed to address this need. 

What's your advice on this? 

--- In domaindrivendesign <at> yahoogroups.com, Sławek <slawomir.sobotka@...> wrote:
>
> If specific listener needs more data than it's its problem to gain that data.
> 
> For example call some service that provides additional data. We can assume that Event contains some IDs or
sth that is sufficient to load some additional data in specific listener.
> 
> As mentioned in previous posts: Event is not a DTO. Ideally object that fires event reveals what he wants to
reveal, not what is demanded by the outer wold. But of course in brutal world sometimes it's better to break
decoupling and abstraction by revealing more (leaky abstraction) in sake of performance:/
> 
> S³awek Sobótka
> http://code.google.com/p/ddd-cqrs-sample/
>

------------------------------------

mikehamedani | 2 Feb 02:58
Picon

On implementation of canonical data model


One thing I'm still confused about canonical data model is how is it actually implemented in real world. I'm
assuming the idea is that each domain/service has its own representation of the world but when they
interact with each other, they all talk a common language (canonical model). 

In practice, how should we implement this? 

1- Should we have a mapping layer in each service to translate its internal model to the canonical model? If
yes, can you show an example of this?

OR

2- Is this just a matter of a having a standard in place (perhaps as a visio diagram or something) that should
be followed by people who design service contracts? If yes, how can we enforce that different people in
various teams follow this standard in practice? Are there any tools/practices? 

Please share your thoughts and experiences. 

------------------------------------

mikehamedani | 2 Feb 05:38
Picon

Training

Hello,

I attended Udi's 5-day course on SOA and really enjoyed it. Just wondering if there are any other similar
workshops around US? I saw one on DDD by Eric Evans too. Do you know any other good classes that help with
software architecture, design and thinking, running by some famous people? 

Mike

------------------------------------

moranlf | 2 Feb 06:26
Picon

Re: Training


Hi Mike

I've attended a 1-day workshop with Juval Lowy (of idesign.net), where he presented some main concepts of
his 5-day Architect's Master Class. I've not yet attended the 5-day course, but that one day was truly
inspiring and enjoyable. Juval's course deals mainly with the role of the software system architect, and
with high-level architecture (You won't see any class or domain model diagrams). He also talks about how
to decompose a system into services, based on the given use cases, and how these services interact in terms
of messaging, security, authorization, concurrency etc.

Moran

--- In domaindrivendesign <at> yahoogroups.com, "mikehamedani" <mike.hamedani@...> wrote:
>
> Hello,
> 
> I attended Udi's 5-day course on SOA and really enjoyed it. Just wondering if there are any other similar
workshops around US? I saw one on DDD by Eric Evans too. Do you know any other good classes that help with
software architecture, design and thinking, running by some famous people? 
> 
> 
> 
> Mike
>

------------------------------------

eben_roux | 2 Feb 06:49
Picon
Gravatar

Re: Issue with Publish/Subscribe

Hello Mike,

I don't think Udi meant that you should *never* use request/response in a system.  It probably relates more
to the use of a service bus where we would never want to use it to query data (a la request/response) or
perform any temporal coupling in the form of request/response.

Let's rather use the term component and not service.  So Component A publishes an event and subscriber
Component B requires more than that present in the message.  How we get that data is what is important.  This
does introduce some temporal coupling but it is OK since we are handling the call in a service bus endpoint
where we have automatic retries and other good stuff.

You could query the data store for Component A or go through some integration layer such as a web-service.  It
is absolutely no problem.

Regards,
Eben

------------------------------------

remyfannader | 2 Feb 06:49
Picon

Objects with Attitudes

Should domains be defined separately for objects and aspects ?
http://caminao.wordpress.com/2012/02/01/objects_with_attitudes/
Remy Fannader

------------------------------------

remyfannader | 2 Feb 07:08
Picon

Re: On implementation of canonical data model

There is no "real" world, only business ones, with biased and
overlapping concerns and semantics.
One solution is to distinguish between two types of domains: primary
ones solely responsible for objects identities (e.g Person), the others
for defining the different aspects and semantics (e.g Job, Studies,
etc).
http://caminao.wordpress.com/2012/02/01/objects_with_attitudes/
Remy Fannader

--- In domaindrivendesign <at> yahoogroups.com, "mikehamedani"
<mike.hamedani@...> wrote:
>
>
> One thing I'm still confused about canonical data model is how is it
actually implemented in real world. I'm assuming the idea is that each
domain/service has its own representation of the world but when they
interact with each other, they all talk a common language (canonical
model).
>
> In practice, how should we implement this?
>
> 1- Should we have a mapping layer in each service to translate its
internal model to the canonical model? If yes, can you show an example
of this?
>
> OR
>
> 2- Is this just a matter of a having a standard in place (perhaps as a
visio diagram or something) that should be followed by people who design
service contracts? If yes, how can we enforce that different people in
various teams follow this standard in practice? Are there any
tools/practices?
>
> Please share your thoughts and experiences.
>

------------------------------------


Gmane