Bus
Why, How, What
Redundant?
To organize communication between entities that don't know each other
Why
How
Alan Key
Inventor of Smalltalk
Objects communicate by sending and receiving messages
bob = Bob.new
bob.fat?Don't know the receiver
codetunes.subscribe(alice)
codetunes.subscribe(bob)
codetunes.release_post(post)
class Codetunes
def initialize
@subscribers = []
end
def subscribe(subscriber)
@subscribers << subscriber
end
def release_post(post)
# ...
subscribers.each do |subscriber|
subscriber
.read_codetunes_post(post)
end
end
endDon't know either receiver and publisher
Message in the bottle
sea = Sea.new
robinson.throw_buttle(target: sea)
alice.watch(sea) do |finding|
if finding.respond_to?(:message_in_bottle)
alice.decipher_message_in_bottle(finding)
end
endRequirements
- Know the transportation layer
- Know the message format
What
- Command Bus
- Event Bus
- Motherboard
- Distributed system
Resources
Recruitment
Bus
By Jan Dudulski
Bus
- 133