<div dir="ltr">Hi Compl,<div><br></div><div>Thanks for your blessing, and we're happy to answer your questions. We have published a paper about how did we combine libuv's event loop with GHC lightweight threads, it's on the old [repo](<a href="https://github.com/ZHaskell/stdio/blob/master/docs/A%20High-Performance%20Multicore%20IO%20Manager%20Based%20on%20libuv%20(Experience%20Report).pdf">https://github.com/ZHaskell/stdio/blob/master/docs/A%20High-Performance%20Multicore%20IO%20Manager%20Based%20on%20libuv%20(Experience%20Report).pdf</a>), which is somehow a little bit outdated, but the design is mainly the same.</div><div><br></div><div>> does it touch the internals of GHC RTS scheduler?</div><div><br></div><div>No, the concurrency primitives in base(`MVar`, `forkIO`, `yield`, etc) are enough. </div><div><br></div><div> > Seems libuv would have to be deeply integrated, how is that done?<br></div><div><br></div><div>Basically, it consists of three parts:</div><div><br></div><div>1. Start an IO manager thread per capability, which is responsible for polling libuv's eventloop.</div><div>2. Write bindings to libuv's async functions and wait for the IO manager.</div><div>3. Manage memory allocations and how data passing across FFI.</div><div><br></div><div> Cheers~</div><div>Dong</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 7, 2021 at 2:58 PM YueCompl <<a href="mailto:compl.yue@icloud.com">compl.yue@icloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Congratulations and thanks for the public release!<div><br></div><div>Wish Z a fast growth and wide adoption.</div><div><br></div><div>At a glance I'm especially curious how </div><div><br></div><div>> <i style="box-sizing:border-box;color:rgb(232,230,227);font-family:system-ui,-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px;font-variant-ligatures:normal;background-color:rgb(156,0,56)">M</i><span style="color:rgb(232,230,227);font-family:system-ui,-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px;font-variant-ligatures:normal;background-color:rgb(156,0,56)"> GHC lightweight threads scale on </span><i style="box-sizing:border-box;color:rgb(232,230,227);font-family:system-ui,-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px;font-variant-ligatures:normal;background-color:rgb(156,0,56)">N</i><span style="color:rgb(232,230,227);font-family:system-ui,-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px;font-variant-ligatures:normal;background-color:rgb(156,0,56)"> event loops</span></div><div><div><br></div><div>is achieved, does it touch the internals of GHC RTS scheduler? Seems libuv would have to be deeply integrated, how is that done?</div><div><br></div><div>Sincerely,</div><div>Compl</div><div><br><blockquote type="cite"><div>On 2021-04-07, at 12:13, Dong Han <<a href="mailto:winterland1989@gmail.com" target="_blank">winterland1989@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div>Dear Haskellers:</div><div><br></div>After having a discussion with HF guys, I decide to announce [Z.Haskell](<a href="http://z.haskell.world/" target="_blank">http://z.haskell.world/</a>) project, It's available on Hackage and very much usable now, the document is also pretty adequate.<br><br>To recap the document from Z.Haskell, Z.Haskell provides:<br><br>+ Array, vector(array slice), sorting, searching<br>+ Text based UTF-8, basic Unicode manipulating, regex<br>+ FFI utilities<br>+ Fast parsing and building monad<br>+ JSON encoding and decoding<br>+ IO resource management, resource pool<br>+ File system operations<br>+ Network: DNS, TCP, UDP and IPC<br>+ Buffered input and output<br>+ Process management<br>+ Environment settings<br>+ High performance logger<br>+ High performance low-resolution timer<br><br>The project's goal is not to compete with the base, but to provide an alternative engineering toolkit, which is more suitable for writing practical network/storage services. Similar to [netty](<a href="https://netty.io/" target="_blank">https://netty.io/</a>) for java or [nodejs](<a href="https://nodejs.org/" target="_blank">https://nodejs.org/</a>) for javascript. Welcome to join Z.Haskell if you have a similar use case. Currently, we're heading with the following roadmap:<br><br>+ Crypto library based on [botan](<a href="https://github.com/ZHaskell/z-botan" target="_blank">https://github.com/ZHaskell/z-botan</a>).<br>+ TLS network stack.<br>+ HTTP framework.<br>+ Distributed system algorithms.<br><br>Happy hacking!<br>Z.Haskell Contributors<br></div>
_______________________________________________<br>Haskell-Cafe mailing list<br>To (un)subscribe, modify options or view archives go to:<br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>Only members subscribed via the mailman list are allowed to post.</div></blockquote></div><br></div></div></blockquote></div>