by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:04
    xiaozhitaba edited #3990
  • 10:03
    xiaozhitaba edited #3990
  • 09:54
    xiaozhitaba edited #3990
  • 09:53
    xiaozhitaba opened #3990
  • Jul 09 08:00
    thehesiod closed #1922
  • Jul 09 08:00
    thehesiod commented #1922
  • Jul 09 07:59
    stale[bot] unlabeled #1922
  • Jul 09 07:59
    bluca commented #1922
  • Jul 09 06:57
    aforsoft opened #3989
  • Jul 08 23:40
    thehesiod commented #1922
  • Jul 08 10:24
    bluca commented #3988
  • Jul 08 10:24
    bluca labeled #3988
  • Jul 08 10:15
    samyhocine opened #3988
  • Jul 07 20:36

    bluca on master

    build: fix gethrtime() function… Merge pull request #3987 from f… (compare)

  • Jul 07 20:36
    bluca closed #3987
  • Jul 07 13:46
    fanquake opened #3987
  • Jul 07 09:41
    wzli commented #3970
  • Jul 07 09:36
    wzli commented #3970
  • Jul 07 08:11

    bluca on master

    build: disable IPC when cross-c… Merge pull request #3986 from f… (compare)

  • Jul 07 08:11
    bluca closed #3986
Doron Somech
@somdoron
@Rombersoft you have the TrySend methods
Romber
@Rombersoft
@somdoron TryReceive seen but TrySend... no
Romber
@Rombersoft

I've created such server

public static void Main(string[] args)
        {
            using (var server = new ResponseSocket("@tcp://localhost:5555")) // bind
            {
                while (true)
                {
                    // Receive the message from the server socket
                    string m1 = server.ReceiveFrameString();
                    Console.WriteLine("From Client: {0}", m1);

                    // Send a response back from the server
                    server.SendFrame("Hi Back");
                }
            }
        }

and such client

public static void Main(string[] args)
        {
            using (var client = new RequestSocket(">tcp://localhost:5555"))  // connect
            {
                while (true)
                {
                    // Send a message from the client socket
                    if (client.TrySendFrame(TimeSpan.FromSeconds(5), "Hello"))
                    {
                        // Receive the response from the client socket
                        string m2 = client.ReceiveFrameString();
                        Console.WriteLine("From Server: {0}", m2);
                    }
                    else Console.WriteLine("Data is not sent");
                    Thread.Sleep(1000);
                }
            }
        }

I've started client and then server. All worked but! when I stoped server and client via Ctrl+C after restarting worked nothing. And when I change port to 5556 on client and server then all began to work. I guess that some handled did not close.
What is your opinion? Is it good?

Romber
@Rombersoft
@somdoron as for https://github.com/zeromq/netmq/blob/master/src/NetMQ/OutgoingSocketExtensions.cs#L106
that I want to have 5000 clients and one server. And I don't understand how server defines client to send reply.
Romber
@Rombersoft
Also this method does not send synchonously because it returns true even server is not running. It so bad. Only disappoints
Allie
@cite-reader
0MQ is not designed for your use case. The central abstraction is fundamentally an asynchronous message queue; if you want a synchronous request-reply dialogue you either need to build your own abstraction on top or reach for a different networking library.
Stuart Farmer
@StuartFarmer
Anyone familiar with ZMQ Auth? Trying to add CURVE keys after starting the authenticator and running into issues
Allie
@cite-reader
Passingly; what are your issues?
Stuart Farmer
@StuartFarmer
image.png
image.png
i create the key in the directory and reconfigure the curve directory
but sockets dont connect and send
the initial set in the directory at the launch of the software works, but adding certificates and reconfiguring the curve authenticator doesn't allow that key to communicate with other nodes
Allie
@cite-reader
Okay, that's PyZMQ specific APIs, so I'm afraid I can't help.
Stuart Farmer
@StuartFarmer
you think it has something to do with pyzmq and not curve?
Allie
@cite-reader
"curve directory" isn't a concept in the libzmq API or the CURVEZMQ protocol, so it's either pyzmq or you're holding it wrong.
I don't know which!
Doron Somech
@somdoron
@Rombersoft as @cite-reader mentioned, zeromq is not an rpc framework, it is a library for building protocols. If you need an ack for sending a message you have to send the ack from the client side to the server.
Stuart Farmer
@StuartFarmer
for closure here, i found my issue and it was purely on my side
implementation error, not one of zmq
vojtech-frodl
@vojtech-frodl
Hello, I'm waiting for the fix of zeromq/libzmq#3756 to be released. When do you plan the next release?
Kevin Sapper
@sappo
@somdoron what do you think?
Incubator
@incube8r
I'm thinking of using ZeroMQ to build real-time video conferencing web application, is that something ZMQ can handle?
Allie
@cite-reader
Off the top of my head it's difficult to think of where you'd use ZMQ in a product like that. The sticking point being that browser JS can't just drive the network however it wants, so it can't speak ZMTP, so it can't interoperate with ZMQ on other platforms.
Could use it to coordinate inside the server cluster I guess.
Incubator
@incube8r
@cite-reader the browser supports websocket, how about this: https://github.com/zeromq/JSMQ
Allie
@cite-reader
That'll limit your server side options until the websocket transport in libzmq makes it to a release, which maybe you're fine with. Looking more at the problem space though I'd probably want to farm out almost the entire browser component to WebRTC and let the browser vendors deal with managing latency compensation.
Incubator
@incube8r
So atm ZeroMQ does not support websocket?
I wonder why a WS socket library exists for ZeroMQ if that's the case
Allie
@cite-reader
There's code in libzmq master, but I don't think it's in a tagged release and I don't know anything about how complete the support is.
Kevin Sapper
@sappo
@somdoron what is the current state of the websocket support in libzmq? Do you feel its ready for a release?
Romber
@Rombersoft

Hello developers again I have such client

DealerSocket client = new DealerSocket();
client.Options.Identity = BitConverter.GetBytes(4208);
client.Connect("tcp://localhost:1013");

and such server

_server = new RouterSocket("@tcp://0.0.0.0:10130");

I do send Multipartmessage from client to server inside for cycle when my server does not work

for(...)
client.TrySendMultipartMessage(TimeSpan.FromSeconds(5), messageToServer);

and this method TrySend... return true many many times and soon become to return false
And Question: how to do in order to this method return falseat once?

Allie
@cite-reader
You can't. You are having a fundamental disagreement with ZMQ about how networking ought to work. ZMQ is, in the background, continuously trying to establish a connection because maybe that endpoint will appear later and queuing up your messages to send out immediately when that happens. There is no API for making a dealer socket reject messages when it has no connected peers at that exact moment.
Allie
@cite-reader
Anyway in other news, I've been using my suddenly copious spare time to slowly hack on an interoperable ZMTP 3.1 implementation, and I've started collecting notes on where libzmq's behavior differs from the protocol docs. Should I file errata for the RFCs or bugs for libzmq?
Kevin Sapper
@sappo
The RFC is the truth, so file a bug with libzmq. We may then decide to create version of that RFC.
Allie
@cite-reader
Okay, I'll do that.
Kevin Sapper
@sappo
@cite-reader thanks :)
Jacob Floyd
@cognifloyd
Not sure if this is the best place for this.
Is there a good rule of thumb for selecting which go bindings to use for zeromq?
I see both pebbe/zmq4 and zeromq/goczmq on https://zeromq.org/languages/go/, but no indication of why use one or the other.
Kevin Sapper
@sappo
zmq4 wraps zeromq/libzmq and goczmq wraps zeromq/czmq.
Not sure how conveniently zmq4 wraps libzmq if it's just a thin wrapper goczmq might provide you with more functionality
OliverNChalk
@OliverNChalk
what's the best way to understand ZeroMQ's discovery/connection strategy? i.e. if I bind a publisher to an endpoint, what's the typical latency for subscribers on the same local network to connect to it?
Allie
@cite-reader

Assuming TCP, NULL security mechanism, and no ZAP handler, the peer that bound can begin sending messages to the peer that connects after about 3.5x the ping time between nodes. The connecting peer needs another half an RTT before it can begin sending messages; in the PUB/SUB use case that includes the connecting peer's subscription messages, so you can't expect messages any sooner than 4.5x the ping. If connecting to a DNS endpoint rather than an IP address literal, every connect attempt also does a DNS resolution at the beginning, which is an additional source of latency.

The reconnection attempt interval is configurable, and set to 100ms by default. The library will apply random jitter to that interval to help avoid the thundering-herd problem in case of server failure.

Erkan Tairi
@etairi
Can one have some form of peer-to-peer communication with ZeroMQ? It seems with REQ/REP one achieves classic server/client type communication, where it should involve round robin communication. On the other hand, SUB/PUB seems to work fine for just sending or receiving messages, but PUB sends the same message to multiple peers connected. How can I have something like SUB/PUB, but where every connection to PUB is a separate connection, and when PUB sends something, it sends to one designated SUB only?
Kevin Sapper
@sappo
@etairi Chapter 8 of the zguide targets peer to peer communication http://zguide.zeromq.org/page:chapter8
Also there's zyre which https://github.com/zeromq/zyre
Doron Somech
@somdoron
@etairi also checkout the new PEER socket type. Which binding/language are you using?
jdeng
@joeuo
anyone see this on windows10 with af_unix support using ipc PUB/SUB, - - libzmq: libzmq-v141-x64-4_3_2
  • github.com/pebbe/zmq4: v1.2.1
    Error when binding soc a file:
    error:An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.