{"action":"created","issue":{"url":"https://api.github.com/repos/snoyberg/http-client/issues/306","repository_url":"https://api.github.com/repos/snoyberg/http-client","labels_url":"https://api.github.com/repos/snoyberg/http-client/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/snoyberg/http-client/issues/306/comments","events_url":"https://api.github.com/repos/snoyberg/http-client/issues/306/events","html_url":"https://github.com/snoyberg/http-client/pull/306","id":268842161,"number":306,"title":"Switch from network to socket","user":{"login":"tfausak","id":408753,"avatar_url":"https://avatars1.githubusercontent.com/u/408753?v=4","gravatar_id":"","url":"https://api.github.com/users/tfausak","html_url":"https://github.com/tfausak","followers_url":"https://api.github.com/users/tfausak/followers","following_url":"https://api.github.com/users/tfausak/following{/other_user}","gists_url":"https://api.github.com/users/tfausak/gists{/gist_id}","starred_url":"https://api.github.com/users/tfausak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfausak/subscriptions","organizations_url":"https://api.github.com/users/tfausak/orgs","repos_url":"https://api.github.com/users/tfausak/repos","events_url":"https://api.github.com/users/tfausak/events{/privacy}","received_events_url":"https://api.github.com/users/tfausak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-10-26T17:15:49Z","updated_at":"2017-10-27T20:58:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/snoyberg/http-client/pulls/306","html_url":"https://github.com/snoyberg/http-client/pull/306","diff_url":"https://github.com/snoyberg/http-client/pull/306.diff","patch_url":"https://github.com/snoyberg/http-client/pull/306.patch"},"body":"This pull request explores switching from the venerable [`network`](https://hackage.haskell.org/package/network) package to @lpeterse's [`socket`](https://hackage.haskell.org/package/socket) package. The switch turned out to be easier than I expected. Nevertheless, a few of the tests fail:\r\n\r\n```\r\n  test-nonet/Network/HTTP/ClientSpec.hs:188: \r\n  1) Network.HTTP.Client.Client early close on a 413\r\n       uncaught exception: SocketException (ePipe)\r\n\r\n  test-nonet/Network/HTTP/ClientSpec.hs:194: \r\n  2) Network.HTTP.Client.Client length zero and chunking zero #108\r\n       uncaught exception: SocketException (ePipe)\r\n\r\n  test-nonet/Network/HTTP/ClientSpec.hs:199: \r\n  3) Network.HTTP.Client.Client length zero and chunking\r\n       uncaught exception: SocketException (ePipe)\r\n\r\n  test-nonet/Network/HTTP/ClientSpec.hs:204: \r\n  4) Network.HTTP.Client.Client length and chunking\r\n       uncaught exception: SocketException (eProtocolType)\r\n```\r\n\r\nI didn't spend much time trying to debug those because they seem to rely on [`streaming-commons`](https://hackage.haskell.org/package/streaming-commons), which itself depends on `network` and exposes `Socket`s. \r\n\r\nMy goal here isn't actually to replace `network` with `socket` — at least not right away. I wanted to see if it was possible and how it affected performance (since `socket` uses `MVar`s behind the scenes). Sadly I don't have an off-the-shelf way to measure the performance of `http-client`. I'll have to look around for one unless someone has a better idea. I tried running `http-client/bench/threaded-stress.hs`, but after bringing it up to date I realized it doesn't really stress test the sockets. \r\n\r\ncc @eborden @snoyberg "},"comment":{"url":"https://api.github.com/repos/snoyberg/http-client/issues/comments/340083726","html_url":"https://github.com/snoyberg/http-client/pull/306#issuecomment-340083726","issue_url":"https://api.github.com/repos/snoyberg/http-client/issues/306","id":340083726,"user":{"login":"eborden","id":545655,"avatar_url":"https://avatars2.githubusercontent.com/u/545655?v=4","gravatar_id":"","url":"https://api.github.com/users/eborden","html_url":"https://github.com/eborden","followers_url":"https://api.github.com/users/eborden/followers","following_url":"https://api.github.com/users/eborden/following{/other_user}","gists_url":"https://api.github.com/users/eborden/gists{/gist_id}","starred_url":"https://api.github.com/users/eborden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eborden/subscriptions","organizations_url":"https://api.github.com/users/eborden/orgs","repos_url":"https://api.github.com/users/eborden/repos","events_url":"https://api.github.com/users/eborden/events{/privacy}","received_events_url":"https://api.github.com/users/eborden/received_events","type":"User","site_admin":false},"created_at":"2017-10-27T20:58:53Z","updated_at":"2017-10-27T20:58:53Z","author_association":"NONE","body":"I'm very tempted to produce a major epoch in `network` that steals all the good ideas in `socket`, while maintaining `network`s greater support for POSIX modifications and bespoke apis.\r\n\r\nBut before I think about that I'll have to don my powdered wig.\r\n![image](https://user-images.githubusercontent.com/545655/32125029-1b25e9ee-bb38-11e7-975b-e9f268bf71a5.png)\r\n\r\n"}}
{"actor":{"display_login":"eborden"}}