Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 20:37

    gdamore on listtest

    (compare)

  • Nov 25 20:37

    gdamore on master

    Convert list to new test framew… (compare)

  • Nov 25 08:28
    db4 opened #1360
  • Nov 25 06:18

    gdamore on listtest

    Convert list to new test framew… (compare)

  • Nov 24 18:18
    gdamore milestoned #1358
  • Nov 24 18:17

    gdamore on strtoull

    (compare)

  • Nov 24 18:17
    gdamore closed #1358
  • Nov 24 18:17

    gdamore on master

    fixes #1358 nni_strtou64 and nn… (compare)

  • Nov 24 07:10

    gdamore on strtoull

    fixes #1358 nni_strtou64 and nn… (compare)

  • Nov 24 06:52

    gdamore on testing

    (compare)

  • Nov 24 06:52

    gdamore on master

    New NUTS test framework (NNG Un… (compare)

  • Nov 24 06:28
    gdamore opened #1358
  • Nov 24 06:20

    gdamore on testing

    New NUTS test framework (NNG Un… (compare)

  • Nov 24 06:19

    gdamore on testing

    New NUTS test framework (NNG Un… (compare)

  • Nov 24 05:50

    gdamore on testing

    Windows can deliver spurious co… (compare)

  • Nov 24 01:57

    gdamore on testing

    nng_clock() might return a fair… (compare)

  • Nov 23 16:22

    gdamore on testing

    Clean up leaked thread in test. (compare)

  • Nov 23 15:20

    gdamore on testing

    Reworder imports for now. (Win… (compare)

  • Nov 23 03:40

    gdamore on testing

    fix timing (compare)

  • Nov 23 01:40

    gdamore on testing

    New NUTS test framework (NNG Un… (compare)

Garrett D'Amore
@gdamore
Also, please note that I tend to be much more responsible on Discord.
lnksz
@lnksz
I just received NNG_ECONNSHUT from nng_dialer_start (v1.3.0) but the docs do not mention this as a return value...
https://nng.nanomsg.org/man/v1.3.0/nng_dialer_start.3.html
What does it mean?
Lawrence Kok
@phr34k

Hey @gdamore I encountered some crashes with nanomsg. I am using nanomsg in production in a grocery market as a network layer, and on and off we've been receiving messages that our software would just crash; the thing is that we do capture all unhandled exceptions (c#) but this crash never gave a report for some reason. Turns out couple of days ago we discovered the network cable was bad, once we replaced the cable no more crashes.

Now I suspect the actual crash is happening somewhere in nanomsg's domain so in the c or c++ code maybe something that didn't take an error code into consideration. I just have no idea where to start really.

Garrett D'Amore
@gdamore
yeah, libnanomsg is unfortunately not as hardened against network errors as it should be.
NNG is far far better in this regard.
You're probably tripping up on an assertion somewhere in the code path, but without more info I couldn't tell you where.
Lawrence Kok
@phr34k
I have a question about how I should use nano-message, basically, I am using it from a c# and once in a while I'm receiving the same message two times. Usually, this always happens when there's a high load on the server.
I presume that this has something to do with nano message redelivery mechanism, i suspect that the socket receiving backlog of data that and it takes some time to clear-up, and redelivery is queued because no response was given.
Lawrence Kok
@phr34k
So I'm wondering what I could do on my end to identify what were duplicate message, I mean redelivery is something that was done by nanomessage itself, how do I guarentee exactly one delivery.
Nate Kent
@neachdainn
I doubt you can simultaneously avoid sending a message multiple times while guaranteeing delivery. I would look into including timeout information in the message itself (e.g., "ignore this message if the current time is after X") or giving a UUID to each message and ignoring the message if it has already been seen. Or maybe a combination of both.
Garrett D'Amore
@gdamore
The better design is to make your requests idempotent. A request Id can be used for that purpose but you have to keep track on the server.
dramthy
@dramthy
hello, every one. How Can I get sub ip in Pub/Sub mode?
Nate Kent
@neachdainn
Watch the pipe events, get the IP when a pipe is created
Garrett D'Amore
@gdamore
Or get it from the message.
But only with nng.
Or mangos.
Nate Kent
@neachdainn
Can you get the subscriber IP from an outgoing message?
Garrett D'Amore
@gdamore
Ah no.
jef-de-busser
@jef-de-busser
Ok, searched as best as I can but couldn't find the answer.
I thought nng_listen/nng_dial and protocol were orthogonal. But when I try to start 2 subscribers and 1 publisher, where the first subscriber listens and the second dials, messages are only received in the listening subscriber. Any ideas as to why that is?
1) nngcat --sub0 --listen tcp://127.0.0.1:8000 --format quoted -v -k --subscribe ""
2) nngcat --sub0 --dial tcp://127.0.0.1:8000 --format quoted -v -k --subscribe ""
And the publisher:
nngcat --pub0 --dial tcp://127.0.0.1:8000 --interval 1 -v -k -D "test msg"
jef-de-busser
@jef-de-busser
The idea is to setup a N-to-M pubsub connection
jef-de-busser
@jef-de-busser
If I start the pub connection with listen and the subscribers with dial everything works as expected.
Garrett D'Amore
@gdamore
You have sub both listening and dialing, and pub only dialing.
The dialing sub won't connect.....
While the dialer vs. listener is orthogonal to pub vs sub, it's still the case that dialers can only connect to listeners, and that pub can only peer with sub (and vice versa)
So in your case, as you have one pub, and multiple subs, I'd probably make the pub the listener and the subs the dialers.
However, you could also use both subs as listeners (but on different ports, because only one thing can listen at a given TCP address), and then make the pub dial twice (once to each sub port)
You can use multiple --dial arguments in nngcat btw.
jef-de-busser
@jef-de-busser
Ok, that makes sense.
The 1 subscriber was only for my test setup. In reality I have a setup at the moment with 4 publishers and 1 subscriber (which is why the subscriber is the listener) and I was hoping to extend this in some cases easily to 4 publishers and 2 subscribers all on the same address/URL.
Regarding your remark about multiple --dial arguments, I overlooked that in the documentation. I'll read up on that first.
Thx!
jef-de-busser
@jef-de-busser
The above should have read "The 1 publisher was only for my test setup" obviously...
jef-de-busser
@jef-de-busser
BTW: when using nngcat the dialing sub does report that it's connected:
$ nngcat --sub0 --connect-ipc /tmp/test --format quoted -v -k --subscribe ""
Connected to: ipc:////tmp/test"
Florian Hülsmann
@CBiX
Hi all, is this channel nng related? What can I use as a low latency, possibly UDP based transport? Is there a QUIC implementation for nng?
Cody Piersall
@codypiersall
The real chat happens on Discord now: https://discord.gg/byTJz6
No UDP/QUIC transports are available yet, but there are open issues for both: QUIC: nanomsg/nng#230 UDP: nanomsg/nng#168
Harris Zhu (Zhu Zhenzhong)
@zhuzhzh
I want to write one 1-to-N model (similar to telnet server/client). 1 means one server, N means n clients. clients could connects to server at the same time. N usually is less than 20. what's the suggested protocol?
JaylinYu
@JaylinYu
pub/sub I believe
Harris Zhu (Zhu Zhenzhong)
@zhuzhzh
pub/sub is unidirectional
while telnet is bidirectional
Garrett D'Amore
@gdamore
Req rep.
And I don’t really watch this channel.
Basically one to many is supported with any protocol except pair.
Harris Zhu (Zhu Zhenzhong)
@zhuzhzh
thanks. I will try it.
Cody Piersall
@codypiersall
Req rep, and have the open as many contexts as max concurrent connections. Note that even with contexts, req/rep is still stateless, and you can't rely on a single context to be associated with a single client.
d3571ny
@qdk0901
Is there any API to get remaining messages count in the queue?
Garrett D'Amore
@gdamore
I don’t really use Gitter anymore.
But the answer to your question is no.
Gary Stuart
@gstuartml_gitlab
Hi. I'm new here. If this has already been discussed, please point me to the appropriate location) I'm using NanoMsg for C++. (#include <nng/compat/nanomsg/nn.h> #include <nng/compat/nanomsg/bus.h>). I have setup pair communications, for multiple nodes, and it is communicating fine, provided I send character strings. If I send binary values, I receive matching input until it gets to a 0x00 value, and then all remaining values are 0x00. I have seen that the default mode is binary, but not in all cases. I have not succeeded in verifying this mode. Does this implementation support binary data? Do I need to do something different? Thanks