Giter Club home page Giter Club logo

gomq's People

Contributors

dvrkps avatar hintjens avatar indradhanush avatar myzhan avatar prepor avatar rgbkrk avatar sappo avatar sbinet avatar somdoron avatar taotetek avatar vyskocilm avatar xaqq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gomq's Issues

[Question] Zero-copy

Hey

Hopefully it's ok to ask questions.
So, since it's pure Go, does that mean that the sending of the ZMQ message payload can be done with zero-copy mechanics? Since writing to a socket in Go does not copy, it seems very possible. But it will depend on internal buffering schemes that I know that (at least) libzmq got.

Thoughts and plans on that?

Problem: We cannot send a message

The first goal is simply sending a message. We are now exchanging protocol IDs and versions successfully, so that's a start.

Some good references:

To start with let's just get a pure Go implementation sending to a GoCZMQ Pull socket. On the Go side, I've started by using a slightly modified Channeler API from GoCZMQ. Working code should look like this:

func main() {
        // create a dealer channeler
        push, err := NewPushChanneler("tcp://127.0.0.1:9999")
        if err != nil {
            panic(err)
        }
        defer push.Destroy()

        // send a hello message
        push.SendChan <- [][]byte{[]byte("Hello")}
}

I'm not that concerned with what the internals look like or if we want to refactor things later - I assume we'll have some false starts API wise and things will evolve over time as we go forward.

I also don't care about handling connections to multiple endpoints, load balancing, or any other zmq features until we hit the milestone of completing the handshake and sending a message.

Remember: solve one problem at a time.

pushpull: missing Connect for push and Bind for pull

hi,

right now, the following code panics:

var pull *gomq.PullSocket = ...
_ = pull.(gomq.Server) // panicks, no Bind method

var push *gomq.PushSocket = ...
_ = push.(gomq.Client) // panicks, no Connect method

I have been reading the specs for pushpull: https://rfc.zeromq.org/spec:30/PIPELINE
and it's not clear to me whether a pull socket couldn't/shouldn't bind to an address.
ditto for a push socket.

The C++ implementation actually does actively test that:
https://github.com/zeromq/libzmq/blob/master/tests/test_spec_pushpull.cpp

shouldn't we add the corresponding methods to PullSocket and PushSocket to make them implement (resp.) Server and Client ?

(I can send a PR)

Status of project?

Is this project still in development? The readme says the code is young but there hasnt been a commit since 2020.

If development has stalled due to a technical problem, I would like to know.

Problem: ZMTP Protocol is not complete

The ZMTP protocol is not yet complete, the greeting still missing the mechanism, as server, filler and the ready command.

As we only implement the NULL mechanism I would suggest to start with ZMTP v2.0 which is easier to implement.

What do you think?

Socket.recv() panics when tcp read timeout

boomer is using gomq to pull message from master like this.

Sometimes I got a panic(index out of range) from inside gomq, generated by this line.

Then I print out msg.Err, it's read tcp i/o timeout.

func (s *Socket) Recv() ([]byte, error) {
	msg := <-s.recvChannel
	if msg.MessageType == zmtp.CommandMessage {
	}
	if msg.Err != nil {
		fmt.Printf("%v\n", msg.Err)
		return []byte(""), msg.Err
		// os.Exit(-1)
	}
	return msg.Body[0], msg.Err
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.