akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.69k stars 1.04k forks source link

Modify serialization process #1592

Open Horusiath opened 8 years ago

Horusiath commented 8 years ago

Currently our seialization/deserialization relies on byte[]. I think we could improve this overtime by starting to use managed buffer pools directly.

Right now we have many implementations of byte buffers (3 different ones in Akka.IO, Helios and Google.ProtocolBuffers + 1 incoming with DotNetty), but I've seen that MS is working on some common managed buffers package. And even without it we could speak with Azure team and J. Skeet about moving our implementations into one separate package to follow single standard.

Scooletz commented 8 years ago

That's a cardinal sin of majority of .NET tooling. When you take a look at WCF buffer management which has been copied to the Azure library, it's again a pool of byte arrays, which is wrong as well. Can you link to the MS version of it? So far, the most reasonable one was the one in EventStore.

mattnischan commented 8 years ago

Also see ASP.Net's KestrelHttpServer memory pool, I know those guys are very perf happy:

https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNet.Server.Kestrel/Infrastructure/MemoryPool2.cs