its working pretty well,

A suggestion for  generic "server error" would be to return the J error from 
the J server instead.  Useful for the examples you are showing now.  (basically 
show lse__ as client response)



The labs and examples do eventually hang if repeated enough though.
A repeated crash on the zmq lab occurs after the lines

kill__c '' 
kill__d ''

servers_jcs_ '' still shows the c port open 65201

then "jcst port" hangs.

killp_jcs_ 65201 removes it from servers
the kill__c command later in the lab does not crash.


if qrun is repeated enough times, it will also hang the j session.
________________________________
From: Eric Iverson <[email protected]>
To: Programming forum <[email protected]> 
Sent: Thursday, September 28, 2017 1:04 PM
Subject: [Jprogramming] zmq - big step for J socket services



New addons net/zmq and net/jcs are available. They require 806.


The zmq addon has bindings between J and the zmq shared library.


The jcs addon has J client/server tools built on the zmq request/reply

pattern.


These addons make it much easier and with far less code to provide

high-performance, robust, and scalable socket services.


Start with 806-beta-6 installed from the latest zip packages. Then be sure

you have the

latest base library and the net/zmq and net/jcs addons installed.


An easy way to get started is to run the jcs lab.


start J

   load'labs/labs'

   lab'~addons/net/jcs/jcs_lab.ijs'

step through the lab


The lab will let you know if you need to install zmq and where to look for

info.


Sharing zmq install hints in the forum could save others some trouble.


***

Among other things, jcs makes it easy to start other J tasks and to use

them as servers. The lab includes a simple example of starting multiple J

tasks to service a queue of jobs.


*** from the jcs lab

zmq is an api built on top of sockets


it is available across platforms and removes almost all the mundane and

critical chores in building a solid, high-performance, scalable server


if unfamiliar with zmq, it worth looking at: www.zeromq.org

get an overview with: zguide.zeromq.org/page:all

if zmq is not installed, you'll have to look at:

zeromq.org/intro:get-the-software

----------------------------------------------------------------------

For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to