Emmanuel T Odeke Profile picture
Building @orijtech, @golang, cloud computing, cybersecurity, accelerating industrialization, technology etc. Always learning!

Aug 22, 2019, 13 tweets

While re-reading the paper "Fast key-value stores: An idea whose time has come and gone" ai.google/research/pubs/…, I recalled "groupcache" from @bradfitz to speed up Chrome's dl.google.com; part of the "loan a Gopher out" program.

It was very influential for #golang 1/

groupcache github.com/golang/groupca… is a cache filling and caching library that lives within your application and talks to it's peers, exchanging values during cache misses aka "peer filling" and preventing thundering herds (that plague Memcached -- also from @bradfitz 💡) /2

I believe that before Kubernetes and Docker popularized the usage of #golang, Brad's work showed the huge and direct business+ engineering benefits of writing infrastructure in #golang. He noticed that dl.google.com written in C++ was slow & in massive tech debt /3

He chronicalled this work in a July 2013 OSCON talk "dl.google.com: Powered by Go" talks.golang.org/2013/oscon-dl.… showing how Go was better suited, dramatically faster, scalable and maintainable.

This is huge if you are making rational engineering decisions based off MARR /4

Showing the power of #golang's standard library e.g. with:
* io.(Reader, SectionReader, Writer)
* net/http.ServeContent
talks.golang.org/2013/oscon-dl.…
which solved issues like copying bytes from A to Z, serving files with various ranges/flavours: these previously plagued the service /5

It also put a fresh spin on caching as mentioned it is LINK (Linked In-Memory KeyValue) instead of RINK (Remote In-Memory KeyValue)
It ensures content is addressable, minimizes rigid data transfers, serialization, doesn't mould data into only strings/bytes, no thundering herds /6

Your service can be scaled indefinitely but since groupcache is both a server and client co-located within each process yet aware of all it's peers with a cache filling mechanism, you can store complex types and exchange them between peers easily without thundering herds 💡 7/

When working on the OpenCensus project, in July 2018 I examined how to add observability to groupcache with metrics and traces, I produced and documented my work with a blogpost medium.com/@orijtech/grou… explaining the motivations, results of the endeavors plus concrete examples 8/

For example here is an excerpt of a geolocation/search service that I wrote at my company: groupcache with instrumentation:
* search_server.go gist.github.com/odeke-em/89ed8…
* search_client.go gist.github.com/odeke-em/5bbd2…

Which can be used for directions, ride sharing or concierge svcs 9/

A cool thing happened while at Gophercon 2019: while walking back to my hotel at the end of the 3rd day, I bumped into some folks who were heading to an after-party and while introducing each other, they asked where I worked and I replied, "a small company called Orijtech" 10/

They told me they worked at Vimeo in New York and actually knew of my company and directly built off the observability work that I had added for groupcache to make their "galaxycache" github.com/vimeo/galaxyca… and that they are also #golang users which my company also works on 11/

Re-reading that paper took me through trying to get into the state of mind that @bradfitz had when pitching to the Chrome and storage teams at Google that he could write their service for them to make it faster, better, more maintainable and a new/radical style of caching 12/

Necessity is the mother of invention; mostly off evolving needs and prior experiences!

In storage.googleapis.com/pub-tools-publ… @bradfitz's Memcached is cited as RINK; his groupcache is LINK so he's done both. Even better he did it while advancing #golang!

Ref: medium.com/@orijtech/grou…

FIN/*

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling