Coder Social home page Coder Social logo

Comments (5)

Lukasa avatar Lukasa commented on August 17, 2024 2

The fallback to concurrent connections idea should be part of a wider pooling discussion. The correct abstraction for a connection pool from the perspective of the rest of the code is "ask for a connection, get back a future that fulfils with one". How that future is fulfilled is an implementation strategy of the pool. In general, the pool should do N-ary connnections except for protocols that explicitly require multiplexing (e.g. HTTP/2).

Re DNS caching, I'm highly suspicious of solving this separately from the resolver. The resolver should own caching.

Rather than support outputting traffic to PCAP files, it would likely be better to provide an escape hatch for pipeline configuration that would allow users to add PCAP handlers themselves, as you've suggested separately.

from async-http-client.

artemredkin avatar artemredkin commented on August 17, 2024 1

Thank you for feedback!

Regarding custom redirects, what do you think about API similar to URLSession:

protocol HTTPDelegate {
    func willRedirect(to url: URL) -> Bool
}

from async-http-client.

PopFlamingo avatar PopFlamingo commented on August 17, 2024

@Lukasa Thanks again for your feedback. As discussed I'll soon open an issue to get pool design ideas so that anyone who wants can use it as a starting point for an implementation. I'll give it a go and see where this leads me.

@artemredkin Thank you! The points I'm thinking about are:

  • Should we consider some redirection policies as needed commonly enough to be implemented by the client itself?
  • Regarding the potential need to download the content of a redirect response: there probably are cases where this would be wanted, if there is a redirection delegate maybe it could also get to choose wether or not it wants to read response contents?
  • Should we use a delegate or a closure?

from async-http-client.

weissi avatar weissi commented on August 17, 2024

Just in case someone wanted to work on the pcap stuff, I happened to have a WIP patch lying around anyway: pcaps.txt

If you save the pcaps.txt as pcaps.patch (sorry, github doesn't allow .patch extensions!?!) you should be able to git apply pcaps.patch.

from async-http-client.

PopFlamingo avatar PopFlamingo commented on August 17, 2024

@weissi Thank you!

Will close this issue for now since I opened a new issue regarding pooling design advice (#25 ).

from async-http-client.

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.