Git Product home page Git Product logo

components-go-sdk's People

Contributors

aaroncrawfis avatar arturotrenard avatar artursouza avatar italypaleale avatar mcandeia avatar philliphoff avatar tmacam avatar yaron2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

components-go-sdk's Issues

Create `/tmp/dapr-components-sockets` on startup

Is your feature request related to a problem? Please describe.

If /tmp/dapr-components-sockets folder does not exist, the application will fail to start.

Describe the solution you'd like

To improve the standalone developer experience, if the /tmp/dapr-components-sockets folder does not exist, the pluggable components infrastructure should create it on startup.

Describe alternatives you've considered

Kubernetes (or even Docker Compose) deployments are unlikely to be affected as they will already have a volume mounted to /tmp/dapr-components-sockets.

Add support for state store semantics errors over gRPC

Is your feature request related to a problem? Please describe.

See the related dapr/dapr issue dapr/dapr#5520.

Describe the solution you'd like

The main idea is to map from statestore errors to gRPC errors accordingly to the expected gRPC status code defined at dapr runtime. It should be done at wrapper level in a fully-transparent way to support built-in components as well. The errors should be reused from components-contrib.

Describe alternatives you've considered

Additional context

Move to latest version of Dapr dependencies

The SDK currently imports 1.9.x versions of Dapr (e.g. components-contrib) dependencies. The SDK should move to the latest 1.10.x versions as they include some breaking API changes (e.g. inclusion of context in pub-sub methods) and it would be better to pull those in sooner than later.

question about channel pendingAck implementation.

I see that pluggable component go-sdk transforms streaming into unary mode. In a question-and-answer implementation, there is a paragraph in github.com/dapr-sandbox/components-go-sdk/bindings/v1/handle.go code snippet about pendingAck:

 84                 select {
 85                 case resp := <-pendingAck:
 86                         return resp.data, resp.err
 87                 case <-ctx.Done():
 88                         return nil, ErrAckTimeout
 89                 }

If the channel pendingAck receives data timeout (default: 1s), the ACK API will directly return nil, but after executing the Send API, waiting for pendingAck will hang in/out, and the select <-ctx.Done here is to wait for the upstream to actively complete the request. and returns ErrAckTimeout. In fact, the ErrAckTimeout returned here is not suitable, it should be the upstream end of the request.

I think the correct approach should be: AcknowledgementManager.Ack API should also take ackTimeoutFlagFunc API as a return parameter, and then uniformly handle timeout, is it more appropriate? similar:

                msgID, pendingAck, cleanup, ackTimeoutFlagFunc := ackManager.Get()
                ......
                select {
                case resp := <-pendingAck:
                        return resp.data, resp.err
               case <-ackTimeoutFlagFunc(): // return Ack timeout flag.
                       return nil, ErrAckTimeout
                case <-ctx.Done():
                        return nil, nil
                }

include pubsub/bindings/state...

My main point is that when the Ack API has a processing timeout (default: 1s), the pendingAck returned by the Get API also needs to know this timeout, and then return directly without blocking waiting and relying on upstream active processing. Or should there be absolutely no packet loss?

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.