My mom knows nothing about programming
But watches every video I make
That’s why I say “hi mom!” instead of “hello, world!” in every video.
I even leave easter eggs just for her that nobody else would understand.
She’s pretty funny and sends me text messages after every video.
But those messages stopped coming recently.
She got sick
Then really sick
Then passed away at 60
So don’t forget to say hi to your mom today
It really sucks when you can’t anymore
Bye mom
What is Event Sourcing? How is it different from normal CRUD design?
The diagram below shows a comparison of normal CRUD system design and event sourcing system design. We use an order service as an example.
The event sourcing paradigm is used to design a system with determinism. This changes the philosophy of normal system designs.
How does this work? Instead of recording the order states in the database, the event sourcing design persists the events that lead to the state changes in the event store. The event store is an append-only log. The events must be sequenced with incremental numbers to guarantee their ordering. The order states can be rebuilt from the events and maintained in OrderView. If the OrderView is down, we can always rely on the event store which is the source of truth to recover the order states.
Let's look at the detailed steps.
🔹Non-Event Sourcing
Steps 1 and 2: Bob wants to buy a product. The order is created and inserted into the database.
Steps 3 and 4: Bob wants to change the quantity from 5 to 6. The order is modified with a new state.
🔹Event Sourcing
Steps 1 and 2: Bob wants to buy a product. A NewOrderEvent is created, sequenced, and stored in the event store with eventID=321.
Steps 3 and 4: Bob wants to change the quantity from 5 to 6. A ModifyOrderEvent is created, sequenced, and persisted in the event store with eventID=322.
Step 5: The order view is rebuilt from the order events, showing the latest state of an order.
Over to you: Which type of system is suitable for event sourcing design? Have you used this paradigm in your work?
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
waduh kasus yang dipecat sama aws bisa ngefek banget sama almamater, huhuhu...
kasian adik-adik yang pengen intern ke top tech company kedepannya :(
source @ecommurz
@supabase Our tech lead took two weeks off so he can code without interruption and meetings. The backlog is getting smaller day by day
Features are being shipped left and right
Customers are happy and bugs are getting squashed.
We learned a valuable lesson with this
salah satu yang bikin @gojekindonesia kenceng banget di development (sebelum pandemi) adalah menghilangkan PR based code review
caranya gimana? pair programming (di kantor) + push master langsung
code review nya jadi “real time”
cons-nya not remote friendly
Steve Jobs pernah bilang
“The best managers are great individual contributors who never ever want to be a manager but decide they have to be manager because everyone else won’t be able to do the job as good as them”
Product Manager is such a high-leverage work that any mistakes they make compounds
Saya pernah kerja dengan PM L3 (rotational PM) sampai L8 (director of product)
Bedanya? L8 doesn't make mistakes and has a better batting average. Kebanyakan bets yang dibikin sama L8 jalan
Salah satu kesalahan PM yang sering ga digubris adalah tentang granularity dan detail tentang komunikasi
Oversharing then your audience won't read the document, thus 0 discussion happen, thus making bad decisions
Undersharing then you won't give enough context, thus making bad decisions with incomplete information
Tailored communication is one way to fix this