Giter VIP home page Giter VIP logo

Comments (5)

johanandren avatar johanandren commented on August 30, 2024

Related existing issue: #1077

from kalix-jvm-sdk.

johanandren avatar johanandren commented on August 30, 2024

Also related: akka/akka-http#4150 (but I thought we decided to accept the cost of an additional .async for all the Kalix JVM SDK component streams instead of running them in-line)

from kalix-jvm-sdk.

johanandren avatar johanandren commented on August 30, 2024

No, sorry, that was probably specifically for streaming in calls so doesn't help here.

Why is that view not replying within at most two-three seconds though?

from kalix-jvm-sdk.

octonato avatar octonato commented on August 30, 2024

Why is that view not replying within at most two-three seconds though?

It's worse than that. It seems that the CompletionStage is not scheduled until the timeout in the get() happens. We change it to other values and we see it back in the logs in the runtime. If we set a timeout to 7 seconds, we see:

15:29:39.826 DEBUG kalix.proxy.Serve$ - Received gRPC request [/com.example.action.ServiceMetaDataAction/GetServiceMetaData]
15:30:06.826 DEBUG kalix.proxy.Serve$ - Received gRPC request [/com.example.view.ServiceMetaDataMappingView/GetServiceMetaData]

After that, subsequent calls works immediately.

So I suspect that we are tweaking the thread pool inside akka-grpc (java api) and this is done lazily.

I have the impression that the timeout is triggering something that is providing a thread to complete the CompletionStage (so the call is effectively done at that moment), but then the CompletionStage will fail anyway because it already timeout.

To recap, if a timeout of 20 seconds:

  • call hit the runtime after 20 seconds
  • call fails with timeout on sdk side

from kalix-jvm-sdk.

aludwiko avatar aludwiko commented on August 30, 2024

And another one: https://discuss.kalix.io/t/how-to-call-and-get-value-from-view-in-controller/318

from kalix-jvm-sdk.

Related Issues (20)

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.