Skip to content

Instantly share code, notes, and snippets.

@Restuta
Created November 26, 2012 02:44
Show Gist options
  • Select an option

  • Save Restuta/4146304 to your computer and use it in GitHub Desktop.

Select an option

Save Restuta/4146304 to your computer and use it in GitHub Desktop.
Being The Worst #2 transcript

Being the worst #2 - Messaging basics

Introduction

Messaging was around for a long time Analogy about robotics

Prerequisites, plans to include code in different languages. Explanation of messaging on example of classes, calling methods and calling services comparison. In-memory vs world wide messaging. Remote objects. How to implement this in code using classes. "Message" class. Message is a definition, dictionary, message instance is a word.

Discussing code sample

"AddProductToBasket" message, would be sent to ProductBasket class. "ProductBasket" class discussion, "AddProduct" method.

Queues, serialization and why do we need messages

Queue definition. Explanation how we can put messages to a queue and that it gives us decoupling. Then Kerry asked for definition of "temporal decoupling" and why it's important in production. Example of real life system that puts messages to a persistent queue so even if a system is down messages will be delivered later. Explanation that of what persistent queue gives to us, we can store messages, replicate and etc. (Sounds like it's to much information =)

Message instance is an instance and its hard to pass it to another machine. Concept of "recording" a Message. Introducing serialization/deserialization:

  • what serializers do
  • serialization formats exist
  • we can do with serialized message Where you can open an example solution VisualStudio or OSS IDEs (move this to it's separate part of the podcast, since currently it interrupts serialization/deserialization).
  • describing some details of binary serialization and streams

Again that messaging is not new, messaging is like e-mail, etc.

Kerry mentioned ES ans asks if it's true that messaging would help us to understand ES and if it is then how. Nice analogy about sending a message via e-mail =)

Conclusion

Messages are words in our vocabulary that are used to communicate between machines and that this allows us to build systems with a lot of benefits (scalability, reliability, etc).

Kerry asks if we've done anything with ES already.

@gregoryyoung
Copy link

Maybe a discussion about "Distance" could help. Its "all messaging" but different channels have a different distance associated with them

Useful to discuss "Tell don't ask" and messaging.

@kjnilsson
Copy link

I always find it useful to introduce messaging patterns as early as you possibly can. I.e, message types: Command, Event, Document and channel types: point-to-point - pub-sub/fanout. Messaging without the patterns can get messy almost as fast as rpc. :)

@Restuta
Copy link
Author

Restuta commented Dec 14, 2012

Thanks Greg, very useful points, we will do that in the Russian version of BTW, tomorrow =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment