Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:22

    gdamore on testing

    Clean up leaked thread in test. (compare)

  • 15:20

    gdamore on testing

    Reworder imports for now. (Win… (compare)

  • 03:40

    gdamore on testing

    fix timing (compare)

  • 01:40

    gdamore on testing

    New NUTS test framework (NNG Un… (compare)

  • Nov 19 14:31
    gdamore milestoned #1344
  • Nov 19 14:31
    gdamore closed #1344
  • Nov 19 05:17

    gdamore on testwork

    (compare)

  • Nov 19 05:17

    gdamore on master

    Work for test refactoring. The… (compare)

  • Nov 19 05:05

    gdamore on testwork

    Work for test refactoring. The… (compare)

  • Nov 19 04:38

    gdamore on testwork

    fix posix path sep (compare)

  • Nov 19 04:24

    gdamore on testwork

    debugging wssfile (compare)

  • Nov 18 07:08

    gdamore on testwork

    Work for test refactoring. The… Try add_definitions for NNG_SUP… Add verbose output for test sui… (compare)

  • Nov 18 07:07

    gdamore on bug1355

    (compare)

  • Nov 18 07:07
    gdamore closed #1200
  • Nov 18 07:07
    gdamore closed #1355
  • Nov 18 07:07

    gdamore on master

    fixes #1355 wss4 and wss6 don't… fixes #1200 Shouldn't nng_http_… Centralize the scheme handling … (compare)

  • Nov 18 06:50

    gdamore on bug1355

    Centralize the scheme handling … (compare)

  • Nov 18 06:47

    gdamore on bug1355

    Centralize the scheme handling … (compare)

  • Nov 18 06:14

    gdamore on bug1355

    fixes #1200 Shouldn't nng_http_… (compare)

  • Nov 18 03:07

    gdamore on bug1355

    fixes #1355 wss4 and wss6 don't… (compare)

Paramita
@namo-ratna-trayaya
Execuse me. If zero-copy method is used for nanomsg, does it decrease the push/pull performance if low level zero-copy buffer is not freed immediately?@gdamore
Garrett D'Amore
@gdamore
@namo-ratna-trayaya you should not need to worry about that.
Paramita
@namo-ratna-trayaya
Excuse me. Does nanomsg TCP communication support kerberos? @gdamore
And how to support this feature? Thank you.
Garrett D'Amore
@gdamore
There is no support for kerberos in nanomsg.
And it kind of makes no sense. Kerberos is about authentication.
Not encryption.
bsdis
@bsdis

Hello. I am trying to build this example using master branch of nng: https://nanomsg.org/gettingstarted/nng/pubsub.html (It says on that docs: "This document is derived from an original post by Tim Dysinger. However, the examples here are for nng instead of nanomsg."). When i compile i get these errors:

$ gcc nngpub.c -lnng -o pubsub
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_thr_main':
posix_thread.c:(.text+0x45f): undefined reference to `pthread_sigmask'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_thr_init':
posix_thread.c:(.text+0x4e2): undefined reference to `pthread_create'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_thr_fini':
posix_thread.c:(.text+0x519): undefined reference to `pthread_join'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_init':
posix_thread.c:(.text+0x5ea): undefined reference to `pthread_mutexattr_init'
posix_thread.c:(.text+0x635): undefined reference to `pthread_mutexattr_settype'
posix_thread.c:(.text+0x65b): undefined reference to `pthread_mutexattr_destroy'
posix_thread.c:(.text+0x6a6): undefined reference to `pthread_mutexattr_destroy'
posix_thread.c:(.text+0x6dc): undefined reference to `pthread_atfork'
posix_thread.c:(.text+0x702): undefined reference to `pthread_mutexattr_destroy'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_fini':
posix_thread.c:(.text+0x77b): undefined reference to `pthread_mutexattr_destroy'
collect2: error: ld returned 1 exit status

What am I missing here?
I am compiling like this: gcc nngpub.c -lnng -o pubsub

bsdis
@bsdis
i found the issue. needed -lpthread also
manual did not mention that
bsdis
@bsdis
Cody Piersall
@codypiersall
Just posted an answer on the SO question... hopefully this helps!
Garrett D'Amore
@gdamore
The docs do need to be clearer about SUB.
bsdis
@bsdis
@codypiersall aha thanks....it helps partly...but i am still having issues when trying to send a full camera frame. Thats a char* of size 5044624 bytes
it does work for a small message like char* = "msg"; though
bsdis
@bsdis
@codypiersall Hmm is there some limit as to how many bytes i can send per message or something?
Cody Piersall
@codypiersall
Just opened this chat window back up, little late! For posterity's sake, nng used to drop messages larger than 1MB by default, and pynng hasn't been updated yet (it still uses an older version of nng).
bsdis
@bsdis
arrrg...nng/pynng was working fine for a while and now after machine restart it just stopped sending messages totally. Any idea what could be the reason?
nivihelen99
@nivihelen99
What is a suggested reactor method of NNG ( similar to zloop?) or aio is the method to go? zloop had support for inbuilt timers. if go by aio, need own implementations of timers etc?
Nate Kent
@neachdainn
I'm not 100% sure what you're asking, but AIO does have a "sleep" function that might work as a timer?
Garrett D'Amore
@gdamore
I do use the nng_sleep_aio() quite a bit to inject timers and timeouts in various places. Highly recommended if you're already using aio.
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.