Comments (5)
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.
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.
@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.
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.
@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)
- Shutdown does not close HTTP2 connection
- Linker Error on using AsyncHTTPClient while using Vapor inside XCode Project HOT 2
- crashed: free(): corrupted unsorted chunks #2617 HOT 5
- Support for SSE (EventSource) HOT 3
- _
- Different results for the same request on mac OS and Linux HOT 1
- README.md async/await example does not compile HOT 1
- Crash: precondition failure in HTTPConnectionPool+HTTP2Connections.swift:209 HOT 2
- Remove swift-docc-plugin dependency
- Too low of a decompression ratio in `HTTPClient.shared` settings HOT 11
- `Connection refused` not throwing right away HOT 6
- Rename and clarify the `body.collect(upTo:)` API which gets used in an insecure way all the time HOT 1
- How to initiate a request using a socks5 proxy with authentication? HOT 3
- OOM if setting `concurrentHTTP1ConnectionsPerHostSoftLimit: .max`
- `HTTPClient.execute(...) async throws` API violates Structured Concurrency HOT 17
- Canceling a download `Task` doesn't actually cancel it? HOT 3
- 7% of the overall runtime spent in `SelectableEventLoop.debugDescription`
- > 8% overall wall time spent for simple HTTP request on NSURL initialisation & related things
- Undesired (as in older faster than newer) perf delta between older and newer APIs
- Proxy server implementation example needed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async-http-client.