Code Monkey home page Code Monkey logo

docs's Introduction

Any language, any framework, anywhere

Go Report OpenSSF Docker Pulls Build Status Test Status Code Coverage License: Apache 2.0 FOSSA Status TODOs Good First Issues discord YouTube X/Twitter

Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to build resilient, stateless and stateful microservices that run on the cloud and edge and embraces the diversity of languages and developer frameworks.

Dapr codifies the best practices for building microservice applications into open, independent, building blocks that enable you to build portable applications with the language and framework of your choice. Each building block is independent and you can use one, some, or all of them in your application.

Dapr overview

We are a Cloud Native Computing Foundation (CNCF) incubation project.

Goals

  • Enable developers using any language or framework to write distributed applications
  • Solve the hard problems developers face building microservice applications by providing best practice building blocks
  • Be community driven, open and vendor neutral
  • Gain new contributors
  • Provide consistency and portability through open APIs
  • Be platform agnostic across cloud and edge
  • Embrace extensibility and provide pluggable components without vendor lock-in
  • Enable IoT and edge scenarios by being highly performant and lightweight
  • Be incrementally adoptable from existing code, with no runtime dependency

How it works

Dapr injects a side-car (container or process) to each compute unit. The side-car interacts with event triggers and communicates with the compute unit via standard HTTP or gRPC protocols. This enables Dapr to support all existing and future programming languages without requiring you to import frameworks or libraries.

Dapr offers built-in state management, reliable messaging (at least once delivery), triggers and bindings through standard HTTP verbs or gRPC interfaces. This allows you to write stateless, stateful and actor-like services following the same programming paradigm. You can freely choose consistency model, threading model and message delivery patterns.

Dapr runs natively on Kubernetes, as a self hosted binary on your machine, on an IoT device, or as a container that can be injected into any system, in the cloud or on-premises.

Dapr uses pluggable component state stores and message buses such as Redis as well as gRPC to offer a wide range of communication methods, including direct dapr-to-dapr using gRPC and async Pub-Sub with guaranteed delivery and at-least-once semantics.

Why Dapr?

Writing highly performant, scalable and reliable distributed application is hard. Dapr brings proven patterns and practices to you. It unifies event-driven and actors semantics into a simple, consistent programming model. It supports all programming languages without framework lock-in. You are not exposed to low-level primitives such as threading, concurrency control, partitioning and scaling. Instead, you can write your code by implementing a simple web server using familiar web frameworks of your choice.

Dapr is flexible in threading and state consistency models. You can leverage multi-threading if you choose to, and you can choose among different consistency models. This flexibility enables you to implement advanced scenarios without artificial constraints. Dapr is unique because you can transition seamlessly between platforms and underlying implementations without rewriting your code.

Features

  • Event-driven Pub-Sub system with pluggable providers and at-least-once semantics
  • Input and output bindings with pluggable providers
  • State management with pluggable data stores
  • Consistent service-to-service discovery and invocation
  • Opt-in stateful models: Strong/Eventual consistency, First-write/Last-write wins
  • Cross platform virtual actors
  • Secret management to retrieve secrets from secure key vaults
  • Rate limiting
  • Built-in Observability support
  • Runs natively on Kubernetes using a dedicated Operator and CRDs
  • Supports all programming languages via HTTP and gRPC
  • Multi-Cloud, open components (bindings, pub-sub, state) from Azure, AWS, GCP
  • Runs anywhere, as a process or containerized
  • Lightweight (58MB binary, 4MB physical memory)
  • Runs as a sidecar - removes the need for special SDKs or libraries
  • Dedicated CLI - developer friendly experience with easy debugging
  • Clients for Java, .NET Core, Go, Javascript, Python, Rust and C++

Get Started using Dapr

See our Getting Started guide over in our docs.

Quickstarts and Samples

Community

We want your contributions and suggestions! One of the easiest ways to contribute is to participate in discussions on the mailing list, chat on IM or the bi-weekly community calls. For more information on the community engagement, developer and contributing guidelines and more, head over to the Dapr community repo.

Contact Us

Reach out with any questions you may have and we'll make sure to answer them as soon as possible!

Platform Link
๐Ÿ’ฌ Instant Message Chat (preferred) Discord Banner
๐Ÿ“ง Mailing List https://groups.google.com/forum/#!forum/dapr-dev
๐Ÿค Twitter @daprdev

Community Call

Every two weeks we host a community call to showcase new features, review upcoming milestones, and engage in a Q&A. All are welcome!

๐Ÿ“ž Visit https://aka.ms/dapr-community-call for upcoming dates and the meeting link.

Videos and Podcasts

We have a variety of keynotes, podcasts, and presentations available to reference and learn from.

๐Ÿ“บ Visit https://docs.dapr.io/contributing/presentations/ for previous talks and slide decks.

Contributing to Dapr

See the Development Guide to get started with building and developing.

Repositories

Repo Description
Dapr The main repository that you are currently in. Contains the Dapr runtime code and overview documentation.
CLI The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster, provides debugging support, launches and manages Dapr instances.
Docs The documentation for Dapr.
Quickstarts This repository contains a series of simple code samples that highlight the main Dapr capabilities.
Samples This repository holds community maintained samples for various Dapr use cases.
Components-contrib The purpose of components contrib is to provide open, community driven reusable components for building distributed applications.
Dashboard General purpose dashboard for Dapr
Go-sdk Dapr SDK for Go
Java-sdk Dapr SDK for Java
JS-sdk Dapr SDK for JavaScript
Python-sdk Dapr SDK for Python
Dotnet-sdk Dapr SDK for .NET
Rust-sdk Dapr SDK for Rust
Cpp-sdk Dapr SDK for C++
PHP-sdk Dapr SDK for PHP

Code of Conduct

Please refer to our Dapr Community Code of Conduct

docs's People

Contributors

1046102779 avatar aaroncrawfis avatar amanbha avatar arschles avatar artursouza avatar berndverst avatar cgillum avatar codefromthecrypt avatar daixiang0 avatar greenie-msft avatar halspang avatar hhunter-ms avatar italypaleale avatar jasonviviano avatar joshvanl avatar lmwf avatar mchmarny avatar msfussell avatar mukundansundar avatar newbe36524 avatar nyemade-uversky avatar pkedy avatar robertojrojas avatar salaboy avatar shalabhms avatar shubham1172 avatar taction avatar trondhindenes avatar willtsai avatar yaron2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Typos in docs

Expected Behavior

Should not have typos.

Actual Behavior

I found many typos in the documents.

Steps to Reproduce the Problem

Hello World sample on local Mac trouble: Temporary error when accepting new connections

Following the instructions.

stephenrwalli$ dapr list
No dapr instances found.
stephenrwalli$ dapr --version
cli version: 0.4.0-alpha.2
runtime version: edge
stephenrwalli$ dapr init
โŒ›  Making the jump to hyperspace...
โœ…  Downloading binaries and setting up components...
โœ…  Success! Dapr is up and running
stephenrwalli$ dapr run --app-id mynode --app-port 3000 --port 3500 node app.js
โ„น๏ธ  Starting Dapr with id mynode. HTTP Port: 3500. gRPC Port: 61542
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="starting Dapr Runtime -- version edge -- commit f62dc31-dirty"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="log level set to: info"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="standalone mode configured"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="dapr id: mynode"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="loaded component messagebus (pubsub.redis)"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="loaded component statestore (state.redis)"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="application protocol: http. waiting on port 3000"
โœ…  You're up and running! Both Dapr and your app logs will appear here.

== APP == Node App listening on port 3000!
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="application discovered on port 3000"
== DAPR == 2019/10/10 20:52:39 redis: connecting to localhost:6379
== DAPR == 2019/10/10 20:52:39 redis: connected to localhost:6379 (localAddr: [::1]:61570, remAddr: [::1]:6379)
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="actor runtime started. actor idle timeout: 1h0m0s. actor scan interval: 30s"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="actors: starting connection attempt to placement service at localhost:50005"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="http server is running on port 3500"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="gRPC server is running on port 61542"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="actors: established connection to placement service at localhost:50005"
== DAPR == 2019/10/10 20:53:13 Temporary error when accepting new connections: accept tcp4 0.0.0.0:3500: accept: too many open files
== DAPR == time="2019-10-10T20:53:14-07:00" level=warning msg="failed to broadcast address to local network: could not determine host IP addresses for Stephens-MacBook-Pro."
== DAPR == time="2019-10-10T20:53:14-07:00" level=info msg="dapr initialized. Status: Running. Init Elapsed 35616.638603ms"

Note the logged error above. Also confused at the dapr runtime version 'edge'. I did update my version of dapr because I was running an older version from the other day that failed. I stopped dapr, stopped and removed running containers, downloaded and installed the new CLI, and ran dapr init again.

In another terminal window.

stephenrwalli$ docker ps -a
CONTAINER ID        IMAGE                                COMMAND                  CREATED              STATUS              PORTS                      NAMES
57b860983ac3        actionscore.azurecr.io/dapr:latest   "./placement"            About a minute ago   Up About a minute   0.0.0.0:50005->50005/tcp   dapr_placement
b8f1fb5626d8        redis                                "docker-entrypoint.sโ€ฆ"   About a minute ago   Up About a minute   0.0.0.0:6379->6379/tcp     elated_engelbart
stephenrwalli$ curl -XPOST -d @sample.json http://localhost:3500/v1.0/invoke/mynode/method/neworder
curl: (52) Empty reply from server
stephenrwalli$ node --version
v12.11.1
stephenrwalli$ dapr --version
cli version: 0.4.0-alpha.2
runtime version: edge
stephenrwalli$ docker --version
Docker version 19.03.2, build 6a30dfc
stephenrwalli$

Running on MacOS 10.14.6.
Ideas?

Don't use 'X-' in HTTP headers

The IETF guidance to prefix X- to experimental headers or to other extension field types has been deprecated since June 2012, per RFC 6648.

I'd suggest prefixing with Dapr- where you feel namespacing is necessary.

Installing dapr in standalone mode on Windows need to switch to Linux containers in Docker Desktop

Expected Behavior

Following the instructions in https://github.com/dapr/docs/blob/master/getting-started/environment-setup.md for Windows, after running "dapr init", I expect to see daprio/dapr:latest and redis container images running.

Actual Behavior

I did not see daprio/dapr:latest and redis containers. Below is what I saw.

PS C:\dapr> dapr init
Making the jump to hyperspace... Downloading binaries and setting up components... Success! Dapr is up and running
PS C:\dapr> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

After I switch Docker Desktop to use Linux containers, I was able to see the two containers running after 'dapr init'.

Steps to Reproduce the Problem

Set Docker Desktop to use Windows container and then run 'dapr init'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.