GithubHelp home page GithubHelp logo

Comments (5)

akka-ci avatar akka-ci commented on May 22, 2024

Comment by ktoso
Wednesday Jun 29, 2016 at 21:25 GMT


Please read this response which explains what you're doing to the server here: http://stackoverflow.com/questions/34641861/akka-http-blocking-in-a-future-blocks-the-server/34645097#34645097

Put a warning in the routing docs not to do this

I agree we should give more guidance, where should we put those docs you think?
Dealing with futures is as simple as *don't block!", and there's the onComplete(future) directive.

Create a 'strict' Directive which does this for you properly (See also #20096)

I like the idea, can you create a ticket specifically for it? Maybe even contribute? It would be rather simple :-)

Fix the code so that this is easily diagnosable/doesn't break

That is hard... I wonder if possible hm.

from akka-http.

akka-ci avatar akka-ci commented on May 22, 2024

Comment by Joe-Edwards
Tuesday Jul 05, 2016 at 09:51 GMT


where should we put those docs you think?

Perhaps a warning box at the bottom of the introduction to http://doc.akka.io/docs/akka/2.4.7/scala/http/routing-dsl/routes.html#routes ?

can you create a ticket specifically for it?

Done. I'll think about making some pull requests, but I need to sort out the CLA first.

from akka-http.

akka-ci avatar akka-ci commented on May 22, 2024

Comment by ktoso
Tuesday Jul 05, 2016 at 12:32 GMT


Perhaps a warning box at the bottom of the introduction to http://doc.akka.io/docs/akka/2.4.7/scala/http/routing-dsl/routes.html#routes ?

the Await block is scary. Yes, a note is likely a good idea, we could link from it to: akka/akka#20469 (which I'll attempt to merge).

Done. I'll think about making some pull requests, but I need to sort out the CLA first.

That'd be awesome :) Let me know if there's anything I could help out with there.

from akka-http.

catalin-ursachi avatar catalin-ursachi commented on May 22, 2024

Given there's an extractStrictEntity directive now, is there any more work required for this ticket?

from akka-http.

jrudolph avatar jrudolph commented on May 22, 2024

Doing some (almost) spring cleaning. Let's close this for now.

Blocking in Akka will lead to bad results in any case. It would be nice if we could offer better tools to troubleshoot situations like this but at least in this case you can get an indication of what is wrong by looking at the stack trace which will show the blocking await call. A better solution is out of scope for Akka HTTP. Maybe at some point we can offer some diagnostics in Akka or Akka Stream directly.

from akka-http.

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.