Code Monkey home page Code Monkey logo

zeromq-node-windows's Introduction

zmq-windows

I needed a version of zmq 2.* bindings that would work under windows and found some projects (JustinTulloss/zeromq.node and the windows branch of mojodna/zeromq.node) that were almost there. In combination with node-gyp and bindings i seem to have gotten it working. It is far from perfect and mostly untested, though the tests work and i get about ~15000 messages/s on my machine, single threaded, push/pull via tcp.

Usage

The api is identical to the zeromq.node driver.

Compilation

If you want to compile the project, check it out and install node-gyp. Note: use node-gyp 0.3.5

  • npm install -g node-gyp
  • node-gyp configure
  • node-gyp build

which will build a release file and place it under build\Release. This is the file used by default by the tests and example.

If you want to require the package you have to copy the zeromq.node file from build\Release to compiled\0.6\win32\ia32 as described by bindings.

Changes

bindings.cc

  • I rewrote the Socket::UV_CheckFDState to use a timer and thus change the rest accordingly It uses a millisecond timer to check the socket state for new infos, dispatches it as before but before returning to the timer it repeats the check if more data has already queued up and dispatches that. If the poll does not return any data i simply return into the event loop. So the initial latency should be 1ms, with more messages being faster if they batch up.

  • I changed the binding name from 'binding' to 'zeromq'. In the bindings.cc.

bindings.gyp

A small, windows only gyp file.

zeromq-node-windows's People

Contributors

matthiasg avatar gulinss avatar

Stargazers

 avatar Truong Hoang Dung avatar Brian Carlson avatar LEI Zongmin avatar Tobias Persson avatar Gregg Irwin avatar  avatar Tuan Kuranes avatar

Watchers

 avatar James Cloos avatar  avatar

zeromq-node-windows's Issues

Unable to load shared library

On Windows Server Enterprise (32bit) I got the followin error messge, running the examples:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Unable to load shared library c:\Users\bvarga\test\zeromq-node-windows\c
ompiled\0.6\win32\ia32\zeromq.node
    at Object..node (module.js:472:11)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at bindings (c:\Users\bvarga\test\zeromq-node-windows\node_modules\bindings
\bindings.js:72:15)
    at Object.<anonymous> (c:\Users\bvarga\test\zeromq-node-windows\lib\index.j
s:9:29)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)

with node 0.6.14
any ideas? thx.

x64?

This is a great project, as I just can't get the zeromq binding to build for node.

Any chance you could compile for x64 as well?

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.