8/9: MOM Flashcards
what is an event and how does it relate to a message?
a message is a packet of data that says something jjust happened, such as a mouse click, button press, purchase, price change etc. at various levels of abstraction
a message is usually an event with more structure
for each “thing that happens” of interest, a component will produce an event and send it to the middleware. there is no feedback after that, they are not concenred with what happens next
how is an event different to an RPC/DO?
events fire and then continue, async.
RPC/DO are sync, they know if the call succeeds or fails
what is an event channel?
a queue of messages that advertises events, routing them appropriately. components can receive events they should consume
can act as a buffer for events, if they are produced faster than they are consumed
how does pubsub work?
producers publish events on chosen channels
consumers subscribe to channels of interest
describe 2 ways a component to know when events are available
pull - the component requests an event and blocks until one is available
push - the component provides an interface that the channel can call when an event is available
what are the risks of using a MOM?
the producers dont have any informations about their events being consumed
difficult to make sure that messages are consumed in the right order e.g m1 MUST be consumed before m2
what decisions need to be made in queue design?
size of the queue
does it expand?
do we let events drop?
what is QOS?
quality of service things that arent specifid in the interface but are vital to the system function - do we drop message? guarantee delivery at least once delivery at most once best effort