zmq4: pure-Go ZeroMQ-4 package

blov · 2018-06-16 01:30:20 · 2379 次点击    
这是一个分享于 2018-06-16 01:30:20 的资源,其中的信息可能已经有所发展或是发生改变。

hi there,

I've just pushed a few examples for my pure-Go implementation of ZeroMQ-4 sockets:

Implemented so far (with tests against the C bindings of pebbe/zmq4):

  • pub/sub
  • push/pull
  • req/rep

Implemented (but not tested yet):

  • xpub/xsub
  • router/dealer
  • pair

Enjoy! (and send PRs :stuck_out_tongue_winking_eye:)


评论:

Ungoliantsspawn:

I've been using pebbe/zmq4 for some time now, I greatly appreciate a pure Go version, Thx!

I will be watching your repo closely, cheers!

jasonmoo:

I’m not well versed in zmq but saw inproc wasn’t implemented. Is that something that could be implemented with a channel that satisfied the net interfaces your lib expects?

sbinet:

yes, definitely. IIRC, that's what go-mangos/mangos (a pure Go implementation of nanomsg) is doing.

alternatively, and as a short gap solution, one could use either os.Pipe or net.Pipe.

net.Pipe already uses a couple of chans already:

icholy:

Sweet! This let's me say goodbye to cgo for one of my projects XD

sbinet:

Aha :)

I'll post a few histograms comparing latency between cgo-based transport and pure-Go based transport in my favorite application. Nothing earth shattering, between the pure-Go transport has a better figure of merit.

sbinet:

here is the initial preliminary little study:

and my favorite application:


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

2379 次点击  
加入收藏 微博
1 回复  |  直到
15502013269
15502013269 · #1 · 5年之前

你好,请教下我在windows或linux,使用zmq4库操作zeromq都无法正常编译运行、报image.png zheyan这样的错误,你有遇到过吗?

添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传