Shared memory IPC in ATS

2018-04-08 Thread Andrew Knapp
Hi all, I've extracted some ipc code from a larger codebase. https://github.com/ajknapp/ats-nanomq It's basically a bunch of SPSC ring buffers in shared memory, and is ported from a C++ library https://github.com/rigtorp/nanomq Fair warning: there aren't many scenarios where this design is a

Re: Shared memory IPC in ATS

2018-04-08 Thread Artyom Shalkhakov
Hi Andrew, Great to see some C-style ATS code in the wild. Definitelly following this development! Make C great again. :-) 2018-04-09 11:11 GMT+06:00 Andrew Knapp : > Hi all, > > I've extracted some ipc code from a larger codebase. > > https://github.com/ajknapp/ats-nanomq > > It's basically a

Re: Shared memory IPC in ATS

2018-04-08 Thread gmhwxi
Thanks! I once tried to use zeromq. For instance, the myserver2 example is the following directory is based on zeromq: http://ats-lang.sourceforge.net/EXAMPLE/EFFECTIVATS/http-server/ >>Fair warning: there aren't many scenarios where this design is a good idea Could you elaborate? Also, how d

Re: Shared memory IPC in ATS

2018-04-08 Thread Andrew Knapp
Nanomq is as bare-bones as you can possibly get. Unlike zeromq, it only works for a small number of local processes, and makes every possible tradeoff for low latency. Nanomq (in the ATS port and original C++) only offers blocking reads in the public interface (I'll probably change this), which