Proposal: Merge network-bytestring into network

Hi all, network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers. The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable. The network-bytestring package can be found at http://hackage.haskell.org/package/network-bytestring Discussion deadline: 2 weeks Johan

Hi again,
On Wed, Oct 27, 2010 at 3:03 PM, Johan Tibell
Discussion deadline: 2 weeks
I realized that I don't need approval* to make this change, as the package isn't managed by libraries@. That being said, I always appreciate user feedback, even if it's just "I like this". *network is in HP. My understanding is that this doesn't force the maintainer to have changes approved by the community, as the HP can choose to not pick up newer versions of the package, if the community doesn't think that the changes should be in HP. Perhaps this is worth discussing. Johan

I fully support this change, and would even appreciate a big warning (to be
encoding-aware) on functions that send/receive Strings over the network.
On Wed, Oct 27, 2010 at 6:03 PM, Johan Tibell
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable.
The network-bytestring package can be found at http://hackage.haskell.org/package/network-bytestring
Discussion deadline: 2 weeks
Johan _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

Johan Tibell
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
Enthusiastic +1.
G
--
Gregory Collins

On Wed, Oct 27, 2010 at 6:03 PM, Johan Tibell
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable.
+1! This is a very positive change. Anthony

On Wed, Oct 27, 2010 at 5:03 PM, Johan Tibell
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable.
The network-bytestring package can be found at http://hackage.haskell.org/package/network-bytestring
Discussion deadline: 2 weeks
+1 Thanks for the excellent work with network libraries! Paulo

On 10/27/10 6:03 PM, Johan Tibell wrote:
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable.
The network-bytestring package can be found at http://hackage.haskell.org/package/network-bytestring
Discussion deadline: 2 weeks
+1. My only request would be to update the documentation for the old network functions in order to (a) make them match the quality of the docs in network-bytestring, and (b) to warn people that they should be using the bytestring functions anyways. -- Live well, ~wren

On Wed, Oct 27, 2010 at 4:37 PM, wren ng thornton
My only request would be to update the documentation for the old network functions in order to (a) make them match the quality of the docs in network-bytestring, and (b) to warn people that they should be using the bytestring functions anyways.
I've done a) for functions that appear in both packages. I will do b) as soon as the packages are merged. Johan

On 10/28/10 3:47 AM, Johan Tibell wrote:
On Wed, Oct 27, 2010 at 4:37 PM, wren ng thornton
wrote: My only request would be to update the documentation for the old network functions in order to (a) make them match the quality of the docs in network-bytestring, and (b) to warn people that they should be using the bytestring functions anyways.
I've done a) for functions that appear in both packages. I will do b) as soon as the packages are merged.
sweet :) -- Live well, ~wren

I'm all for it! I also approve of fixing the IPv6 insanity, even if it breaks stuff. (for example, the fact that you can not write library code which uses the SockAddrInet6 constructor because you don't if it is going to be there). - jeremy On Oct 27, 2010, at 5:03 PM, Johan Tibell wrote:
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable.
The network-bytestring package can be found at http://hackage.haskell.org/package/network-bytestring
Discussion deadline: 2 weeks
Johan _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Wed, Oct 27, 2010 at 5:03 PM, Johan Tibell
Hi all,
network-bytestring addresses two serious problems with the network package: performance and a semantically incorrect type for network data. Both problems are addressed by using ByteStrings instead of Strings in the types of e.g. recv and send. In addition, network-bytestring supports vectored I/O (also know as scatter/gather I/O) which yields better performance in many common use cases, such as HTTP servers.
The merge doesn't break any old code: it introduces new APIs under Network.Socket.ByteString and Network.Socket.ByteString.Lazy but leaves the old API intact. The network-bytestring package is also better documented and tested that the network package. The API is portable.
Have you given any thought to having the Network.ByteString and Network.ByteString.Lazy modules re-export the symbols in the Network module? It isn't necessary, but it would make them nicer to use. Either way this sounds like a good idea. Antoine

On Thu, Oct 28, 2010 at 6:57 AM, Antoine Latter
Have you given any thought to having the Network.ByteString and Network.ByteString.Lazy modules re-export the symbols in the Network module?
It isn't necessary, but it would make them nicer to use.
I did consider it as some point, but I decided against it for reasons I can't remember. If there's a strong case for users to only have to import the ByteString modules, I'd be happy to change it. Any thoughts? Johan
participants (8)
-
Anthony Cowley
-
Antoine Latter
-
Daniel Peebles
-
Gregory Collins
-
Jeremy Shaw
-
Johan Tibell
-
Paulo Tanimoto
-
wren ng thornton