Welcome back to the dapr series!
Last time, we talked about the challenges of getting software right. If you need a quick refresher:
You might ask this very reasonable question:
But writing code is pretty hard already. Does it really only get harder from there?
And I'll hit you with one-worder:
yes
Before we move on, let me take a second to explain what "production" is:
A distributed system is a system whose components are located on different networked computers
(If you have an app with a DB, you're running a distributed system)
In other words, "production" is a harsh, brutal hellscape that'll chew your code up and spit it out like it was nothing 😱.
Yea, that was a little bit of hyperbole but to be honest, I'm hitting you with all these scary things to ... scare you. But only a bit.
Why? To get my point across, of course! And to recommend some tools to make your life easier now and down the line.
Obviously I'm gonna talk about Dapr here, but here are other good tools you can and should consider. Here are some I can personally recommend from experience:
GET /dostuff
)
Dapr takes some of the above things and builds on some others. The idea is that you run this daprd
process (and maybe some others) "next to" your code (on localhost
). You talk to this thing via a standard API (HTTP or gRPC) to get lots of things done:
Each of these things is a standard API backed by pluggable implementations. Dapr takes care of the dirty details behind the scenes. Database implementations take care of getting the right SDK, hooking you to the right DB in the right place, helping you make sure you don't accidentally overwrite or corrupt your data at runtime, and more.
As I write this, there are 15 implementations you can use for Databases, from Aerospike to Zookeeper.
Possibly most importantly, you don't have to pick up any SDKs to use any of this stuff. It's compiled into Dapr itself.
If you took nothing else away, just remember that you should pick up "distributed systems tools" to help you build your app. Even if you don't think that your app is a "hardcore distributed system". The best ones will make your life easier while you're building it, too.
I think Dapr is one of those tools. Right when I start building, I can just use the simple(ish) REST API for my database instead of picking up some new SDK and reading all the DB docs up front. Same goes for some of the other features, they just come later. I recommend giving the README a skim and seeing if it fits your app.