Btw, as a consequence of this work, I have indeed identified some things in
mangos that can be improved. I’ve long had a plan to replace the use of
channels internally with message queues using mutexes and condvars, and I’m
convinced now that I can do this to get a nice performance boost.
I also think there are a few other areas where the code could just be
improved generally, to make it easier to extend, and clearer overall. I
hope to make some of those improvements, but right now I’m fairly focused
on getting this C version done.
Btw, my C version is passing its own internal tests thus far, using my
“Convey” framework, and is also passing valgrind cleanly. It has a few
different design goals from libnanomsg as well. It never panics / crashes,
even if out of memory, unless there is a clear a coding defect. There is
liberal use of error handling to deal with the various edge cases, and I
believe that once I reach the necessary functional capability, it will
enter life more ready for production use than libnanomsg is even now. (I’m
writing production quality code from day one, this isn’t just a design
experiment that will later try to evolve into production ready code.)
- Garrett
On Tue, Jan 3, 2017 at 10:45 AM, Garrett D'Amore <garrett@xxxxxxxxxx> wrote:
Err… “mangos”.
On Tue, Jan 3, 2017 at 10:45 AM, Garrett D'Amore <garrett@xxxxxxxxxx>
wrote:
Why would I do that? I already have! It’s called “mango” Lol :-)
On Tue, Jan 3, 2017 at 10:42 AM, Jason E. Aten <j.e.aten@xxxxxxxxx>
wrote:
Cool. Garrett, do you plan on doing a Go version?
On Tue, Jan 3, 2017 at 12:22 PM, Garrett D'Amore <garrett@xxxxxxxxxx>
wrote:
I’m about 24 hours from having TCP working. Right now the TCP
transport is not written, though I’ve written a fair bit of it locally.
The REQ/REP pattern is working now, as is PAIR, and inproc is working
quit well and totally thread safe.
As far as lockless algorithms go — I’m a big believer in mutexes. I
need mutexes and condition variables to make things work well, and in my
experience if they are used sensibly (with minimal contention), they do not
significantly impact performance.
For some things lockless data structures are superior, but you have to
have use cases that work for them; with mutexes and condvars I don’t have
to think about this; they Just Work.
It may be useful to look at alternative designs for that in the future,
but I’m only going to do that once I’ve demonstrated a clear need or
benefit (or maybe someone else will contribute at that point). Until then,
I need to focus on getting the code working with a sensible design and
avoid prematurely optimizing things.
- Garrett
On Tue, Jan 3, 2017 at 6:45 AM, Karan, Cem F CIV USARMY RDECOM ARL (US)
<cem.f.karan.civ@xxxxxxxx> wrote:
-----Original Message-----ts.org] On Behalf Of Garrett D'Amore
From: nanomsg-bounce@xxxxxxxxxxxxx [mailto:nanomsg-bounce@freelis
Sent: Monday, December 26, 2016 2:46 AMyou’d think — and a lot of details that I’ve written under the hood.
To: nanomsg@xxxxxxxxxxxxx
Subject: [Non-DoD Source] [nanomsg] status update libnng
Just a brief Christmas (western) update…
libnng is now managing connections. There’s a lot more to this than
TCP for POSIX systems, for at least the primary patterns / protocols.
I expect that by New Years I’ll have it in a functional state for
TBH,
I’m really only a couple of hours from that point.respect to things that caused grief in libnanomsg — e.g. ENOMEM
Note that the current code base is pretty much crash-immune with
errors will not impact libnng. The whole approach has been from a“correct first”, so I expect we will have fewer problems once we
actually start using this.code, I’m now at the point to receive it, understanding that there are
Things are moving apace… quite quickly actually.
If anyone is so inclined to review or give feedback on teh existing
still large swathes still unimplemented. You can’t use it for TCPfor example. But at this point I’d rather solicit feedback early rather
than
late. Don’t tell me what’s missing, but if you see problems withwhat’s already there, please *do* let me know.
work in the evenings getting the thing to a state where other folks can
I’m going on a ski trip for the next several days, but will probably
start playing with for actual experimentation.we’re gonna blow the doors off libnanomsg, at least for platforms that
I’m really looking forward to benchmarking this thing. I think
have
non-crappy pthreads. :-)
Merry Christmas everyone! :-)
Thank you for all your hard work!
BTW, when you say that you can't use it for TCP, what exactly do you
mean?
Thanks,
Cem Karan