Code Monkey home page Code Monkey logo

qzmq's Introduction

Title: README

Date: 20180205

# qzmq

Qzmq provides Q bindings for CZMQ, the high-level C binding for ØMQ (ZeroMQ).

Version 3.0.2 of qzmq corresponding to the same version of CZMQ. Qzmq offers a subset of CZMQ APIs. See the CZMQ Coverage below.

Qzmq is written and maintained by Jay Han ([email protected])

Qzmq is hosted at github and it uses the issue tracker for all issues and comments.

## Contents ## News ## News This release of qzmq is different from 20160207 release:
  • merged pull request #15 from jhanna-kx/master
  • added Apache 2 license

This release of qzmq is different from 20150518 (3.0.1) release:

  • deprecated zactor or concurrency support
  • deprecated zclock, zctx, zfile
  • removed helper methods zmsg_{load,save}
  • built/tested on CentOS 7 with OS supplied CZMQ (3.0.2) and ØMQ (4.1.4) libraries
## Features of qzmq Qzmq lets Q users write
  • distributed systems connecting with systems
    • written in other languages,
    • written with many software patterns, using CZMQ and ØMQ/ZeroMQ developed by the ØMQ community.

ZeroMQ takes care of data mobility/distribution/topology (e.g. pub/sub, req/rep, etc.) over various networks and transports (threads/processes/hosts). Note that threads are not supported by qzmq.

Because q has first-class functions qzmq can move code as well as data.

## CZMQ Coverage Qzmq covers a subset of [CZMQ APIs][czmq-reference].

Mostly implemented as of 20160709:

Deprecated:

  • [zactor - simple actor framework][zactor]
  • [zclock - millisecond clocks and delays][zclock]
  • [zctx - working with ZeroMQ contexts][zctx]
  • [zfile - provides methods to work with files in a portable fashion][zfile]
  • [zthread - working with system threads][zthread]

May implement the following in the future:

  • zloop
  • zmonitor
  • zpoller

Some czmq APIs seem redundant viz-a-viz q: zuuid or UUID support, zlist or generic container, etc.

## Copyright and License
// Copyright (c) 2012-2016 Jaeheum Han <[email protected]>
// This file is part of qzmq.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// Alternatively you may use Apache 2.0 license instead of MPL
## Files of qzmq
  • README.md
  • kx/* -- k.h and c.o from kx.com for building qzmq. (see kx.com terms and conditions)
  • qzmq.c -- C bindings to be linked with CZMQ (with ØMQ) and Q (k.h and c.o).
  • qzmq.q -- q code used to load the bindings.
  • qzmq.so -- dynamic library to be loaded into q by qzmq.q.
## Building qzmq Prerequisites: kdb+ 3.0 or later, [ØMQ][zeromq] 4, [CZMQ][czmq] 3. Consult your local sysadmin for installation prerequisites.

Current version 3.0.2 of qzmq has been built with 64-bit kdb+ on CentOS 7. Instructions for builidng qzmq assumes kdb+ is in $HOME/q/ directory.

git clone git://github.com/jaeheum/qzmq
cd qzmq
gcc -DKXVER=3 \
    -shared -fPIC qzmq.c -o $HOME/q/l64/qzmq.so \
    -Wall -Wextra \
    -Wl,-rpath -Wl,/usr/lib64 \
    -I./kx/kdb+3.0 \
    -L./kx/kdb+3.0/l64 \
    `pkg-config --cflags --libs czmq`
cp qzmq.q assert.q $HOME/q/
## Running qzmq
\l qzmq.q

See qzmq_test.q for examples.

  • qzmq_test.q -- qzmq translation of CZMQ's self-tests.

ZeroMQ Guide has examples in many languages. Translation of these examples to q is under way (pulled from here). See Issue #5.

## Issues See the [issue tracker][issues].

qzmq's People

Contributors

jaeheum avatar jayhan avatar jhanna-kx avatar

Stargazers

 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

qzmq's Issues

build/release

qzmq needs a more sensible build/integration mechanism to cover different platforms/versions of kdb+, ØMQ and CZMQ.

put type guard

e.g. xt==-10h, yt==KC, yt==KG, etc. so that wrong types do not propagate downward to unsuspecting library.

redo qstr()

Either rewrite it or pair with free() as the owner of the pointer.

redo zmsg api

current interface of returning exception feels awkward.

Why was `zactor` deprecated?

Just curious. Looks like zthread.fork is also gone. I can't find the rationale in the repo for removing them.

Trailing semicolon after zsocket.bind call results in failure

Consider the following trivial example:

\l qzmq.q

ctx:zctx.new[]
socket:zsocket.new[ctx; zmq`DEALER]
zsocket.bind[socket; `$"tcp://*:9001"]
zsocket.destroy[ctx; socket]
zctx.destroy[ctx]
\\

This works fine, and you will see the port number printed out to the q console which indicates that the port bound properly. Now notice if you add a semicolon after the bind line:

\l qzmq.q

ctx:zctx.new[]
socket:zsocket.new[ctx; zmq`DEALER]
zsocket.bind[socket; `$"tcp://*:9001"];
zsocket.destroy[ctx; socket]
zctx.destroy[ctx]
\\

Now the bind does not occur. I'm still pretty new to q, but as far as I can tell semicolons shouldn't affect the calls of functions.

BTW this is KDB+ 2.7 2011.03.23 if that helps at all.

add zloop bindings

zmq_pollitem_t handling will be less than pretty -- which is why documentation needs to be written.

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.