About Go's simplicity; prefetching; & DBs for serverless

mohanarpit

Arpit Mohan

Posted on December 17, 2019

About Go's simplicity; prefetching; & DBs for serverless

TL;DR notes from articles I read today.

The value in Go’s simplicity

  • Super strong forward compatibility with careful attention to versioning and dependency. Libraries are super stable, and you can have very few external dependencies. 
  • Great restraint to add ‘good-to-haves’ versus what you really need. So you get only two generic(ish) data structures of arrays (slices) and dictionaries (maps).
  • It comes with almost everything you need: the basic go test framework for testing; a sync package that covers most sync primitives that you may need; and an encoding package that works with json, xml, csv and other common formats.
  • The internal formatting tool gofmt provides enough consistency that your code looks idiomatic. This makes open-source code a lot more readable too.


Full post here, 5 mins read


All about prefetching

  • Network Information APIs allow you to use different strategies for different connection types to improve prefetching performance.
  • Four common prefetching strategies are as follows. Many websites use a combination of these.
    • Interaction-driven - uses mouse and scroll activities as signals
    • State-driven - uses current page or URL to prefetch next logical step
    • User-driven - matches each specific user’s patterns of past usage, account information, etc
    • Download everything - so all the links in a page or all the bundles for an app.
  • The prefetch resource hint can be used to prefetch on all major browsers except Safari. You can either manually add prefetch resource hints with no dependencies or build tools based on developer configurations or use dedicated prefetch tools such as quicklink, Guess.js or Gatsby.

Full post here, 7 mins read


Databases that play nice with your serverless backend

  • Modern cloud-native DBs, that expose stateless REST APIs, work best for serverless computing.
  • Amazon’s Aurora Serverless variant scales to demand, resizes to meet storage capacity and handles routine maintenance as a managed service. Its Data API feature works with SQL DBs.
  • With Amazon DynamoDB, designing your data to work it while supporting access patterns is hard. Complex queries can be tricky too.
  • Microsoft’s Azure Cosmos works with several APIs & supports multiple data models. It lets you choose the exact tradeoffs between performance & consistency.
  • Google’s Cloud Firestore works well for web and mobile apps. It has built-in security without requiring a backend and it syncs across clients in realtime.

Full post here, 7 mins read


Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().

💖 💪 🙅 🚩
mohanarpit
Arpit Mohan

Posted on December 17, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related