Skip to Content
Practical Microservices
book

Practical Microservices

by Ethan Garofolo
April 2020
Intermediate to advanced
292 pages
6h 50m
English
Pragmatic Bookshelf
Content preview from Practical Microservices

Snapshotting

If you’ve read about event sourcing, you’ve likely read about snapshotting. You might also have heartburn from reading that our projections work by reloading all the events in a stream every time we need to project them. Snapshotting is a performance enhancement that makes it so that we don’t need to keep projecting entire streams when we need an entity.

Since streams are append-only logs of immutable events, their underlying data can’t change. When you implemented projections back in Chapter 7, Implementing Your First Component, you loaded a stream’s events and ran them through a call to Array.prototype.reduce, passing in the result of calling a projection’s $init property as the starting point. Let’s consider this in the context ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices in Action

Microservices in Action

Morgan Bruce, Paulo A Pereira
Microservices: Up and Running

Microservices: Up and Running

Ronnie Mitra, Irakli Nadareishvili
Kubernetes Best Practices

Kubernetes Best Practices

Brendan Burns, Eddie Villalba, Dave Strebel, Lachlan Evenson

Publisher Resources

ISBN: 9781680507782Errata Page