dapr | Dapr is a portable , event-driven , runtime for building | Microservice library

 by   dapr Go Version: v1.11.0 License: Apache-2.0

kandi X-RAY | dapr Summary

kandi X-RAY | dapr Summary

dapr is a Go library typically used in Architecture, Microservice applications. dapr has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Writing high performance, 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 to implement advanced scenarios without artificial constraints. Dapr is unique because you can transition seamlessly between platforms and underlying implementations without rewriting your code.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              dapr has a medium active ecosystem.
              It has 21344 star(s) with 1666 fork(s). There are 426 watchers for this library.
              There were 10 major release(s) in the last 12 months.
              There are 353 open issues and 2568 have been closed. On average issues are closed in 99 days. There are 44 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of dapr is v1.11.0

            kandi-Quality Quality

              dapr has 0 bugs and 0 code smells.

            kandi-Security Security

              dapr has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              dapr code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              dapr is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              dapr releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.
              It has 64619 lines of code, 3314 functions and 437 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dapr
            Get all kandi verified functions for this library.

            dapr Key Features

            No Key Features are available at this moment for dapr.

            dapr Examples and Code Snippets

            No Code Snippets are available at this moment for dapr.

            Community Discussions

            QUESTION

            Using ORM in dapr
            Asked 2022-Mar-31 at 13:20

            Currently I am learning Dapr, and I find it powerful for micro services development, but after reading more, I found some limitations, the most important of them is "state management".

            How can we use tools like EF Core or Dapper for interaction with databases in Dapr? Is DaprClient class the only way of interaction with databases?

            ...

            ANSWER

            Answered 2022-Mar-31 at 13:20

            You should continue to use those ORMs alongside Dapr as its not a replacement for them. ORMs already act like a translation layer (Repository layer) for relational stored data. State management is simple KVP storage with some minimal query ability. Think of your state as a Dictionary, where that object can be anything simple or complex. this is well suited for technologies like Redis, DynamoDB, MongoDB, Cassandra etc. Again, what you would put in cache, is what you would put in state storage. So, you can still (and should) have an ORM in your service for relational data and pass in runtime configuration for provider, connection string etc, while being able to utilize all the other features of Dapr via DaprClient, via HTTPClient or via GRPC clients.

            Bonus, with many providers in EFCore/EF you can add tracing headers (https://github.com/opentracing-contrib/csharp-netcore) that will seamlessly plug into the tracing provided for free with Dapr. That way you will see a full e2e trace all the way through your state and relational data

            Source https://stackoverflow.com/questions/71286151

            QUESTION

            how can I run dapr subscriber quickstart in prod environment
            Asked 2022-Mar-31 at 07:21

            All quickstart examples using .Net SDK show 'dotnet run' as the way to run ASP.Net Core applications. See https://docs.dapr.io/getting-started/quickstarts/pubsub-quickstart/#tabs-1-net

            dapr run --app-id order-processor --components-path ../../../components --app-port 7001 -- dotnet run

            I figured dotnet publish and then replace "dotnet run" with calling the exe or "dotnet order-processor.dll" would work as well, but it does not. The application starts and can be accessed directly but not through dapr. What would be to way to run the subscriber quickstart in a prod environment (not using dotnet run)?

            ...

            ANSWER

            Answered 2022-Mar-31 at 07:21

            mmm, my mistake. dotnet /order-processor.dll works but you have to adapt the port to the default. After changing 7001 to 5000 it works as expected. This does the trick:

            Source https://stackoverflow.com/questions/71627090

            QUESTION

            Unable to create working subscription for Event Hub topic in Dapr
            Asked 2022-Feb-22 at 23:00

            I have a Dapr application running locally, self-hosted with the Dapr cli. I've configured a Dapr Component and Subscription for subscribing to an Azure Event Hub, detailed below:

            ...

            ANSWER

            Answered 2022-Feb-22 at 23:00

            I was able to fix this by exposing my app over http instead of https. Unfortunately there was no logging to indicate https was the issue, even with debug level switched on.

            Source https://stackoverflow.com/questions/71214509

            QUESTION

            DAPR middleware: OPA. Broken configuration
            Asked 2021-Dec-18 at 14:49

            I have set up DAPR to run a sidecar on my application that's absolutely fine. i am now trying to get OPA injected as middleware in the DAPR call. this should be simple... Set up the application annotation to config, the pipeline configuration, and the component:

            Application annotation:

            ...

            ANSWER

            Answered 2021-Dec-18 at 14:49

            There was an error in parsing value of the defaultStatus: https://github.com/dapr/dapr/issues/3216. It was fixed in v1.5.

            Source https://stackoverflow.com/questions/68850844

            QUESTION

            Execute a continuously running PowerShell command and get result into form
            Asked 2021-Dec-18 at 13:35

            I had a command (actually a DAPR command :-) ) that run in PowerShell and continuously return results. I know how to connect to the PowerShell terminal and get a result, but my problem is that my command continuously returns the result and I need to capture this result to a Form.

            ...

            ANSWER

            Answered 2021-Dec-18 at 13:35

            You don't need to wait for a pipeline to return - you can start consuming output while it's still running!

            You just need to make a few changes:

            • Add the -Stream switch parameter to Out-String (or drop Out-String completely)
            • Create a PSDataCollection instance through which we can collect output
            • Invoke the pipeline asynchronously, with PowerShell.BeginInvoke()

            Source https://stackoverflow.com/questions/70403581

            QUESTION

            What does "in use" mean for an image?
            Asked 2021-Nov-26 at 17:35

            What does "in use" mean and how can I get that info from the CLI?

            Reference: docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.State}}\t{{.Image}}"

            CONTAINER ID NAMES STATE IMAGE 07bce6924796 laughing_wozniak exited vsc-volume-bootstrap 6d37d8744a77 angry_brahmagupta exited vsc-quickstarts-d91f349952ba5208420f1403c31b2955-uid 0bce117a827c dapr_placement running daprio/dapr:1.5.0 1232bf715593 dapr_zipkin running openzipkin/zipkin c128e546a0b6 dapr_redis running redis dc44e1006831 miked exited my-first-fsharp-web ce3cf77a0eb9 minikube running gcr.io/k8s-minikube/kicbase:v0.0.28

            Reference: docker image ls

            REPOSITORY TAG IMAGE ID CREATED SIZE vsc-microsoftvscodeinsiders-572e00dcd0f79c5ee8d7d39c18e7c701-features latest 9f05ea6535d4 12 hours ago 6.36GB vsc-volume-bootstrap latest 81646861762b 12 hours ago 180MB vsc-quickstarts-d91f349952ba5208420f1403c31b2955-uid latest 453bd2943e10 40 hours ago 9.7GB vsc-quickstarts-d91f349952ba5208420f1403c31b2955 latest 10de525681a7 40 hours ago 9.7GB openzipkin/zipkin latest 6a9714eacfd9 2 days ago 153MB miked.azurecr.io/my-first-fsharp-web 96e7948ee30c 5 days ago 211MB my-first-fsharp-web latest e36fabe64a1c 5 days ago 211MB miked.azurecr.io/my-first-fsharp-web 1 e36fabe64a1c 5 days ago 211MB miked.azurecr.io/my-first-fsharp-web latest e36fabe64a1c 5 days ago 211MB counter-image latest 22dfe0305c55 7 days ago 208MB redis latest 40c68ed3a4d2 8 days ago 113MB daprio/dapr 1.5.0 bff1855a0302 2 weeks ago 214MB vsc-azure-container-apps-demo-41dcd784881293406771e08c255554b9 latest 1af591496e8a 4 weeks ago 337MB gcr.io/k8s-minikube/kicbase v0.0.28 e2a6c047bedd 8 weeks ago 1.08GB ...

            ANSWER

            Answered 2021-Nov-26 at 17:35

            It indicates if the image is used by a container (running or already stopped).

            You cannot get this via the CLI using docker images, but listing the containers docker ps -a you can see the associated image.

            Source https://stackoverflow.com/questions/70128002

            QUESTION

            Custom transport for Sleuth traces
            Asked 2021-Nov-22 at 18:38

            My project is using Spring Cloud Sleuth to participate in recording distributed spans. Communication with other systems is done over Dapr, which is not supported by Spring Cloud Sleuth. Applications communicatie with each other through a sidecar (offered by Dapr); communication between the app and the sidecar is HTTP or gRPC.

            Dapr expects distributed traces to be propaged according to the W3C standard. Using the W3C standard is possible in Sleuth by setting the following in application.yml:

            ...

            ANSWER

            Answered 2021-Nov-22 at 18:38

            Spring Cloud Sleuth does two things form a very high perspective:

            1. Gives you an API over tracing libraries (abstracts away the tracing libs)
            2. Instruments Spring projects or libraries that are supported by Spring

            Because of this, if you have a library that is not supported by Spring, you can check if the underlying tracing library supports it or not. By default the tracing lib is Brave but it does not seem it supports Dapr.

            In the case of neither your tracing library nor Sleuth does not instrument the project of your choice, you need to write your own instrumentation (you can also open an issue for Brave to support it).

            You can use Sleuth and/or Brave to write instrumentation, these parts of the docs can help:

            On top of these you need to figure out how to transfer tracing data over the wire. In most cases this happens using headers (HTTP, Kafka, AMQP/RabbitMQ, etc.) on the client side, you need to add the tracing data to your message so that it is transferred over the wire and on the server side you need to fetch this data and reuse it if any (if there is none, you need to create a Span from scratch).

            You can take a look how other ~similar transports are instrumented (in Sleuth or Brave) and do something similar, e.g.: HTTP, Kafka, AMQP/RabbitMQ, gRPC, Dubbo, etc.

            Source https://stackoverflow.com/questions/70056171

            QUESTION

            Dapr PubSub with dotnet SDK
            Asked 2021-Nov-06 at 00:08

            I'm trying to run a basic Dapr setup with dotnet. I followed documentation and sample projects but with no luck for now.

            I created a simple dotnet web API application with net5.0. API has one controller with three pairs of get/post endpoints. Each pair is for a specific pub-sub provider (nats, rabbit, Redis).

            ...

            ANSWER

            Answered 2021-Nov-06 at 00:08

            Add the [FromBody] attribute to the action method parameter.

            For example:

            Source https://stackoverflow.com/questions/69705682

            QUESTION

            Couldn't find message bus pubsub.jetstream/v1 Dapr
            Asked 2021-Oct-12 at 08:29

            I'm trying to connect dapr with nats with jetstream functionality enabled.

            I want to start everything with docker-compose. Nats service is started and when I run nats-cli with command nats -s "nats://localhost:4222" server check jetstream, I get OK JetStream | memory=0B memory_pct=0%;75;90 storage=0B storage_pct=0%;75;90 streams=0 streams_pct=0% consumers=0 consumers_pct=0% indicating nats with jetstream is working ok.

            Unfortunately, dapr returns first warning then error

            warning: error creating pub sub %!s(*string=0xc0000ca020) (pubsub.jetstream/v1): couldn't find message bus pubsub.jetstream/v1" app_id=conversation-api1 instance=50b51af8e9a8 scope=dapr.runtime type=log ver=1.3.0

            error: process component conversation-pubsub error: couldn't find message bus pubsub.jetstream/v1" app_id=conversation-api1 instance=50b51af8e9a8 scope=dapr.runtime type=log ver=1.3.0

            I followed instructions on official site.

            docker-compose.yaml

            ...

            ANSWER

            Answered 2021-Oct-12 at 08:29

            The problem was in old Dapr version. I used version 1.3.0, Jetstream support is introduced in 1.4.0+. Pulling latest version of daprio/daprd fixed my problem. Also no need for nats://host.docker.internal:4222, nats://nats:4222 works as expected.

            Source https://stackoverflow.com/questions/69495387

            QUESTION

            Minikube Nginx Ingress not finding service endpoint
            Asked 2021-Aug-31 at 08:03

            I'm having some trouble getting the Nginx ingress controller working in my Minikube cluster. It's likely to be some faults in Ingress configuration but I cannot pick it out.

            First, I deployed a service and it worked well without ingress.

            ...

            ANSWER

            Answered 2021-Aug-30 at 08:09

            Moving this out of comments so it will be visible.

            Ingress

            Main issue was with path in ingress rule since application serves traffic on online/userOnline. If requests go to online then ingress returns 404.

            Rewrite annotation is not needed in this case as well.

            ingress.yaml should look like:

            Source https://stackoverflow.com/questions/68936694

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install dapr

            See our Getting Started guide over in our docs.

            Support

            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.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries