Dapr – Distributed Application Runtime
dapr.io
dapr.io
Of course, I'm not entitled to good documentation for open source project, I realise it. But let me just share my personal preferences.
When I encounter new library/framework/service I want to know 2 things:
1. What problem(s) does it intend to solve?
2. What are the closest alternatives and how this thing compares to those alternatives?
In most docs I encounter it's either hard or impossible to find this information.
Full disclosure: I'm the author of Micro (https://github.com/micro/micro) which bakes in the same primitives but also focuses solely on development in the Go language.
Most importantly to me, it offers both REST and interface-based programming models allowing the consumer to decide how they want to operate with it.
Why?
If I have microservice A and B - how is A and B different/better with this sidecar?
I read those two words as "bullshit". It's the new "blockchain" in my mental space.
Also, after reading the entirety of that page I still have no idea what this is or what it does. Simply terrible, who is this marketed to?
All it means is 'we existed after the cloud started to gain traction. We won't have an on-prem option, we're much more likely to integrate with things like Docker and Kubernetes, and our licensing model will accommodate now-normal things like autoscaling and containerisation'.
EDIT: I wrote this before reading the article or many other comments. The fact that my description is basically right (other than missing that this is an open source project, so licensing terms aren't relevant) further proves my point that 'cloud native' isn't a buzzword, and has concrete meaning.
Having played a bit with it I'm really enjoying it.
Deploying apps easily to "modern clouds" and taking advantage of their feature set requires some design decisions in your app. Generally, the biggest goal here is to be able to easily scale just by spinning up more copies, so your app needs to be able to run multiple copies in parallel serving requests without exploding. We call these types of applications "cloud native".
Additionally, if you go with a microservices style architecture (I'm not going to go into the pros and cons here), there's extra concerns with communication across the different services and similar.
Often, you'll end up reinventing the wheel and writing a ton of boilerplate to cleanly solve these issues. Also, your developers have to learn quite a bit to manage this well. Tools like dapr reduce the amount of code you need to write, and also do the best paractices for you so your dev team doesn't need to be an expert on 'the cloud' as well.
The main value proposition from what I can tell is the one of swappable components, but from my experience with other systems that try to achieve something similar it's likely a flawed one.
E.g. in a lot of ORM libraries you can _in theory_ easily swap your MySQL database for Postgres, but in practice if you actually want to make that transition (which also rarely tends to happen during the lifetime of a single project) it's such a big hassle that you didn't gain much from using the abstracted version. In the meantime you also often have to restrict yourself to the lowest common denominator that is supported by the specific implementations, so you loose out on a lot of powerful features.
It fits an interesting use case for me as well. I have a new project coming up where I want to basically move as much as possible in the direction of “cloud native best practices and patterns” but I want to incur the smallest possible cost for doing so in terms of effort and actual costs.
This seems like a potentially amazing out of the box experience that doesn’t require me to make drastic changes or also doesn’t require the kind of deep K8s (and surrounding ecosystem like linkerd etc) knowledge that would otherwise be required to set this up.
Check out fly.io [0] which is likely the "smallest possible cost" you'd incur that otherwise may bloat up due to (drawing parallels to HashiCorp products) packaging and deploying with Waypoint, orchestrating with Nomad, and setting up networking with Consul. Dapr, if I understood it correctly, replaces only Waypoint and Consul, you're still left to deal with orchestration.
Jesus Christ, it's an abstraction for an abstraction for an abstraction… you get the idea.
Are there any abstractions for Garden, to hide its gnarly parts and operational complexity?
We looked into using a service mesh like Istio/Linkerd for the direct communications part but eventually decided that Dapr's explicit API approach makes more sense for us than a blackbox transparently intercepting our traffic. plus, these meshes were too cumbersome to setup.
My understanding is that you have a set of core functionality that is entirely optional so you only run what you want and need. These features are defined at a high level like state management (persistence) or an event bus.
Dapr provides a unified API that sits on top of all this and allows you to swap out your event bus system from say Kafka to Google PubSub without any code changes.
But under the hood everything seems to operate via gRPC calls.
Edit: I just came across this link which puts together a solid explanation of what Dapr is and how it works https://thenewstack.io/how-microsofts-dapr-simplifies-develo...
I'm not saying it's nefarious, it's kind of refreshing to let the project succeed on its own merits.
From what I’ve seen I think the abstractions they have focused on make a lot of sense and do a LOT to reduce the complexity of my own applications from both a code and operational point of view.
I’m excited to actually try it and see what the experience is like for someone coming strictly from the monolith world.
https://www.linkedin.com/pulse/dapr-distributed-application-...
Dapr is one of several Microsoft-sponsored open-source projects around Kubernetes. Dapr was first announced in October 2019 and has been developed on GitHub.
The purpose of Dapr is to provide services, accessed via HTTP or gRPC, that can be called from any application, and meet some common requirements that can otherwise be tricky to implement. Specifically, Dapr provides:
* Service-to-service invocation
* State management: save and retrieve key/value pairs from a variety of stores such as Redis, CosmosDB, SQL Server or PostgreSQL
* Publish and subscribe
* Resource binding: Send, receive, and respond to events
* Virtual actors: Use actor pattern for stateless and stateful objects
* Distributed tracing: Uses W3C Trace Context standard to feed events to tracing and monitoring systems
* Secrets management: Safe storage and retrieval of credentials
``` $ openssl s_client -connect docs.dapr.io:443 CONNECTED(00000003) depth=1 CN = SSL_DECRYPT_SVCA_UNTRUST verify error:num=19:self signed certificate in certificate chain verify return:1 depth=1 CN = SSL_DECRYPT_SVCA_UNTRUST verify error:num=10:certificate has expired notAfter=Jul 12 07:02:32 2019 GMT verify return:1 depth=1 CN = SSL_DECRYPT_SVCA_UNTRUST notAfter=Jul 12 07:02:32 2019 GMT verify return:1 depth=0 C = US, ST = California, L = San Francisco, O = "OpenDNS, Inc.", CN = docs.dapr.io notAfter=Feb 21 03:57:16 2021 GMT verify return:1```