Giter Club home page Giter Club logo

Comments (13)

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024 1

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

cc @benjchristensen

from feign.

benjchristensen avatar benjchristensen commented on May 15, 2024

That makes sense, with IncrementalCallback we can support both blocking and non-blocking IO.

from feign.

benjchristensen avatar benjchristensen commented on May 15, 2024

Is there a reason to keep the synchronous method?

// existing
  Response execute(Request request, Options options) throws IOException;

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

yes because most api interactions with http are still synchronous and we
don't want to or need to eliminate "easy mode" just to facilitate advanced.

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

for example, implementing Client with url connection (a synchronous client) could reuse a base implementation of forking off the request. I've in the past made the mistake of forcing synchronous http calls through blocking futures (jclouds), and don't want to repeat that as a default, particularly as it would require sync calls to unnecessarily fire threads.

Having an interface that supports both means allows folks to decide at configuration time how they prefer to interact, whether that's making everything block on futures, use real async tasks or use async only when asked.

from feign.

aansel avatar aansel commented on May 15, 2024

Any update on this? Are you still planning to integrate this in a future release?
Thanks.

from feign.

kflorence avatar kflorence commented on May 15, 2024

Please implement support for async, it's a pretty big drawback right now when your client and MVC controller can't share the same contract because of the use of (for example) DeferredResult.

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

DeferredResult is a spring MVC type, right? If that's the goal, maybe
raise an issue in spring-cloud-netflix where the MVC contract lives?

from feign.

kflorence avatar kflorence commented on May 15, 2024

@adriancole Yes, it is a spring MVC type, however, if the underlying implementation doesn't support async I don't see how spring-cloud-netflix would be able to solve the problem. I will take your suggestion and raise an issue there, though, in the hopes that maybe there is a workaround. Thanks for the quick response!

from feign.

rstml avatar rstml commented on May 15, 2024

+1. It's quite strange that popular general purpose HTTP client doesn't support async.

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

from feign.

rstml avatar rstml commented on May 15, 2024

I see. Actually planning to use Hystrix w/ Rx. However what concerns me is the lack of non-blocking client support. Maybe I'm missing something, but it seems that Feign uses either Apache HttpClient or OkHttp - both in blocking mode? Was hoping that Async HttpClient would allow me to do non-blocking requests.

from feign.

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.