SDC#1 - CAP Theorem with Tom the Prankster
6 presentation tricks + How to choose a topic for blogging
To design a system, the CAP Theorem is super-important.
But it can also be confusing.
Let’s make it easy today.
A system needs to provide 3 guarantees:
Consistency
Availability
Partition Tolerance
Now, Partition Tolerance is something that you’ve got to support. From pigeons to fiber-optic cables, communication networks have always been unreliable
That leaves you with Consistency or Availability.
You’ve to juggle between the two of them.
But what’s the impact of choosing one over the other?
Tom the Prankster is going to answer it.
Let’s say Tom goes to a restaurant and orders 2 items:
Cheese Sandwich
Coke
The waiter writes the order in his pocket diary.
Then, he goes to the kitchen & copies the order in the cook's order log.
Then, he goes to the billing counter & copies the order in the billing log.
Phew! That’s a lot of work.
At this point, there are 3 actors interested in the order data.
Waiter
Cook
The Billing Counter
And each of these actors has their own copy of the data.
But are these copies consistent?
Let’s see.
Tom begins his prank.
He calls the waiter & adds Garlic Bread to his order.
The waiter updates his pocket diary & goes to the next table.
However, before he can update the other logs (cook & billing), Tom goes to the billing counter & asks for the bill.
Naturally, the bill is wrong.
Well, this had to happen.
The restaurant went for Availability over Consistency. Independent copies of the data and eventual consistency.
There was no delay in generating the bill.
However, the bill turned out wrong at the moment because all copies didn't have the complete data.
But hey, the service was great!
So - what if the restaurant chose Consistency?
Let's rewind...
Tom calls the waiter & orders Garlic Bread.
The waiter takes the order, first updates the other copies and acknowledges the order to Tom.
But Tom is still a prankster.
He thinks the restaurant owners are dumb...
Once again, Tom goes to the billing counter and asks for the bill.
This time the billing guy is ready.
He already has the entire order list & prepares the bill:
Cheese Sandwich
Coke
Garlic Bread
Tom's prank fails.
And he doesn't even get the Garlic Bread.🤦♂️
But...
Let's say when Tom makes the Garlic Bread order, the cook or the billing guy is busy.
So, the waiter couldn't update.
The waiter must wait for the confirmation.
Tom gets angry about the delay. Leaves a bad review about the restaurant on social media.
But who cares?
At least, the bill will be correct.
And this, my friends, is the CAP Theorem in super-simple terms.
How does it apply?
Considering that partition tolerance is a must, you can only choose between Consistency and Availability.
And there's no right or wrong choice.
It depends...
Generally, for financial matters Consistency > Availability.
However, for things such as social media likes or comments: Availability > Consistency.
But hey, maybe the tables have turned.
People want more consistency on social media.
I'll leave that for you to decide...😉
6 tips that can help you nail those presentations
Over the years, I’ve had the fortune or misfortune to give several presentations at work.
Here are 6 tips that have helped me (and might help you as well):
Use analogies to explain tough concepts
Avoid acronyms and jargon (AAAJ 😉)
Explain concepts visually (even a basic diagram does a better job)
Use storytelling to captivate the audience
Lead with the big picture (most important stakeholders want to know the results)
Encourage questions from the audience
I posted the same on Twitter a few days back and it seems a lot of people are actually worried about presentations.
Here’s the link to the tweet in case you need some more tips in the comments section.
https://x.com/ProgressiveCod2/status/1675730524600700928?s=20
How to choose a topic for blogging?
With blogging, most advice suggests writing about trending topics.
It's great advice if your aim is to blog for just a month or so.
However, in the long term, it's better to write at the intersection of what you know & what interests you.
I make a table like below to guide my choice of topics.
This makes it easy for me to decide in which area I can contribute the best at the given point in time.
Over time you might grow your knowledge in another area or your interest level changes. You can always update the scores and start calibrating your content accordingly.'
That’s it for today!
Have a great weekend and see you next week.
Beautifully explained with this analogy, story telling is always the best way to explain something and it sticks in the memory. Thanks alot!!
Good one. Well explained.