Re: [zeromq-dev] Z/J-yre+Android

2015-02-10 Thread Yu Dongmin
Jyre was intended to make the same level of Zyre. But it is out-of-date and the community might not have enough resource to catch up with Zyre. We still need more volunteers for this project. Zyre+Jzmq(JNI) might be good start and could be migrated later. Thanks Min > On Feb 10, 2015, at 8:43

Re: [zeromq-dev] Does ZeroMQ pay a lot in terms of marshalling compared to akka and clojure.core.async?

2013-10-10 Thread Yu Dongmin
Bennie, Just FYI, JeroMQ is written with Java NIO as much as possible and has no native code. Thanks Min On Oct 11, 2013, at 12:56 PM, Bennie Kloosteman wrote: > Yes compared to native langauges all GC languages incur extra IO costs eg > When writing both languages they need to read/copy

Re: [zeromq-dev] Possible memory leak in zmq.Poller.fd_table

2013-10-06 Thread Yu Dongmin
Hi, Thanks for the reporting and the nice catching the issue. I've sent the related pull request and deployed into the public maven snapshot. Please try with the latest maven snapshot. Thanks Min On Oct 6, 2013, at 10:32 PM, Jonathan Goldstein wrote: > Hi, > > My application froze, and in t

Re: [zeromq-dev] jeromq mdlclient2 loses/lost messages

2013-09-06 Thread Yu Dongmin
Hi, I also found that there're two issues here. - At the examples, HWM is not set. so the default value, 1000 is applied. Messages can be dropped silently in broker, worker or client. - Late binding issue. So the first message can be loss. I'm going to set required socket options to the exampl

Re: [zeromq-dev] polling in jeromq

2013-07-21 Thread Yu Dongmin
27;t > poller.poll define a timeout so that it does not wait infinitely? And also > when i used polling in jzmq i did not use poller.poll() but it still worked. > Is this specific to jeromq? > > Regards, > Ashwini > > > On Thu, Jul 18, 2013 at 5:59 PM, Yu Dongmin

Re: [zeromq-dev] polling in jeromq

2013-07-18 Thread Yu Dongmin
Hi, You need to call poller.poll(timeout) before you call poller.pollin Thanks Min On Jul 19, 2013, at 12:10 AM, ashwini ramamurthy wrote: > Hi , > > I am learning to use zeromq polling in android . I am polling on a req socket > and a sub socket in the android program(client). So that this

Re: [zeromq-dev] Send more is occupied one slot in HWM?

2013-06-28 Thread Yu Dongmin
Hi Erwin, A Frame whose flag has SNDMORE doesn't count at HWM. Could you attach or upload your case? Thanks Min On Jun 28, 2013, at 10:32 PM, Erwin Karbasi wrote: > Hi Pieter, > > We're using Asynchronous client-server in Java from the sample but instead > of inproc we are using TCP. > Follo

Re: [zeromq-dev] zeromq for android

2013-06-13 Thread Yu Dongmin
Hi, At a AsyncTask subclass, you could do as the followings. But please keep in mind that I'm not a Android developer so I'm sure the doInBackground is the best place to create zeromq context. This is an example which create a worker thread then the worker thread communicate outside as a pure

Re: [zeromq-dev] efficiency of multipart messages

2013-05-23 Thread Yu Dongmin
Hi, Basically there's only length field overhead (1 or 8 byte) when we use multipart messages. Sure it requires more iteration in the ZMQ core, but it should be neglect. So I prefer a structure that I could build a program easier to understand. 20~30 multipart messages might be more hard to p

Re: [zeromq-dev] ByteBuffer API for JZMQ

2013-05-13 Thread Yu Dongmin
Hi, I'm basically agree to have bytebuffer API. JZMQ application would have more options for their purpose. And it would be excellent if we have a benchmark result using bytebuffer compared to byte[]. Thanks Min On May 13, 2013, at 9:58 AM, Trevor Bernard wrote: > In the next couple of day

Re: [zeromq-dev] ZMQ hanged :(

2013-04-11 Thread Yu Dongmin
Based on a discussion, https://github.com/zeromq/jeromq/pull/54 Java 1.6 is the official supported java version. Not sure how the later snapshot was built with java 5. There's a fork for 5 at https://github.com/steve-o/jeromq and related discussion http://comments.gmane.org/gmane.network.zeromq

Re: [zeromq-dev] ZMQ hanged :(

2013-04-11 Thread Yu Dongmin
New pull request has been sent. https://github.com/zeromq/jeromq/pull/57 Thanks Min On Apr 11, 2013, at 2:44 PM, Yu Dongmin wrote: > Hi, > > I was able to reproduce your case. > > Basically, creating and closing ZMQ socket per every message might not be a > good prac

Re: [zeromq-dev] ZMQ hanged :(

2013-04-10 Thread Yu Dongmin
Hi, I was able to reproduce your case. Basically, creating and closing ZMQ socket per every message might not be a good practice. I would recommend to connect once at a program start (ex, the next line of ZMQ.context) Even though, jeromq seems to have a bug at handling frequent socket creatio

Re: [zeromq-dev] ROUTER and queue overflow

2013-04-05 Thread Yu Dongmin
Hi Joel, What version of zmq are you using? https://github.com/zeromq/libzmq/commit/a0cecc718d3d95279dcc7b0d9b6c1d09fb4cfd97 The patch let send method block when the pipe is full with the mandatory option. Or if you send message with DONTWAIT, it will return -1 with EAGAIN. Thanks Min On Apr 6

Re: [zeromq-dev] JeroMQ or ZeroMQ Java Binding for Java 1.5?

2013-03-26 Thread Yu Dongmin
Hi, ArrayDeque was used to support add/pop/get or First/Last operation in ZMsg with ZFrame. Preference for Array than List is because Array collections has better performance in general. But in ZMQ, multi part length is usually less than 5. Performance difference would be neglect. Thanks Mi

Re: [zeromq-dev] Pub/Sub - Occasional loss of messages

2013-03-17 Thread Yu Dongmin
Hi, Right zero is the right value for the unlimited. I was not able to run you example as the attached was not full sources of your case. Anyway, I suggested the unlimited HWM to find out HWM was reached through OOM. Otherwise, try adding a small sleep at your pub at every N (a smaller value

Re: [zeromq-dev] Pub/Sub - Occasional loss of messages

2013-03-10 Thread Yu Dongmin
Hi, HWM 1000 might not be big enough in some PUB/SUB patterns. Please increase the value or unlimited (-1). Or please update your test case somewhere as other can reproduce it. Thanks Min On Mar 9, 2013, at 9:00 PM, Erwin Karbasi wrote: > Hello All, > > We are using Pub/Sub paradigm in 0MQ

Re: [zeromq-dev] Question for java users

2013-02-11 Thread Yu Dongmin
It means that moving a 'in-process' concurrent application to a 'out-of-process' concurrent application would require tons of codes. But for ZMQ, we only need to change socket type. Thanks Min On Feb 10, 2013, at 12:48 AM, Trevor Bernard wrote: >> For the best optimised multithread applicati

Re: [zeromq-dev] Question for java users

2013-02-08 Thread Yu Dongmin
ZLoop is a just wrapper of ZMQ poll facility which can provide multiplexing on ZMQ sockets (and raw sockets). If you see the example lbbroker, lbbroker2 and lbbroker3, you would know they solve a sample problem differently. Actually I like using ZMQ poller directly :) The problem could be s

Re: [zeromq-dev] Zeromq messages getting dropped

2013-01-27 Thread Yu Dongmin
e. Thanks Min On Jan 27, 2013, at 12:42 AM, Yu Dongmin wrote: > Hi, > > My guess was it might have an issue on libzmq (zeromq c library) when large > messages were heavily sent. > > Thanks > Min > > On Jan 26, 2013, at 4:01 PM, Ritesh Adval wrote: > >>

[zeromq-dev] A discussion about consolidating jeromq namespace with jzmq

2013-01-26 Thread Yu Dongmin
Hello, I want to listen opinions from community about consolidating JeroMQ namespace with jzmq. When we use JeroMQ, it starts the following import statement import org.jeromq.ZMQ; import org.jeromq.ZMQ.Socket; ... For jzmq import org.zeromq.ZMQ; import org.zeromq.ZMQ.Socket; ... Other than

Re: [zeromq-dev] jzmq is built without ZThread.

2013-01-26 Thread Yu Dongmin
Oh, There're a missing entry. I've sent a pull request, https://github.com/zeromq/jzmq/pull/153 Thanks Min On Jan 14, 2013, at 9:12 PM, crocket wrote: > On Windows, I built it with Visual Studio 2010 Express. > On Linux, I built it with "./configure; make" > > > On Mon, Jan 14, 2013 at 9:11

Re: [zeromq-dev] Zeromq messages getting dropped

2013-01-26 Thread Yu Dongmin
Hi, My guess was it might have an issue on libzmq (zeromq c library) when large messages were heavily sent. Thanks Min On Jan 26, 2013, at 4:01 PM, Ritesh Adval wrote: > Hi Min, > > Thanks for the update.Just to confirm, > Are you saying that this issue is on zeromq c library or jzmq c wrap

Re: [zeromq-dev] JZMQ Clarification: ZContext destroySocket setLinger

2013-01-21 Thread Yu Dongmin
When we destroy a socket contained in a ZContext (zctx_t at czmq), it uses same linger of the ZContext. We can change the linger value. But if we want to change the linger for a specific socket only in the ZContext, it will not work. The intention for the catch block is to ignore the ZMQ_TERM exc

Re: [zeromq-dev] Maintaining multiple zeromq contexts simultaneously

2013-01-01 Thread Yu Dongmin
Hi, Dic you happen to get a performance issue on your environment ? When you create a new context, it allocates blocks for mailboxes and create one reaper thread and io thread(s). Reaper thread is mostly idle and it'll not affect performance. If you have multiple cores, I guess maximum 4 conte

Re: [zeromq-dev] Design advise

2012-12-29 Thread Yu Dongmin
Nishant, As you know, Router does fair-queuing at the receiving. But 0MQ is so fast that the first requests can be delivered to the workers before the second request. You should invent a credit based control. Please refer the guide about an example of the credit based control on the FileMQ. Th

Re: [zeromq-dev] Discussion on ROUTER action

2012-12-09 Thread Yu Dongmin
ATORY to this. Mandatory means > > the message must be deliverable, or you get an error. > > > > -Pieter > > > > On Thu, Dec 6, 2012 at 4:36 AM, Yu Dongmin wrote: > >> Hello, > >> > >> As we all know, ROUTER drop messages when 1) a counter

[zeromq-dev] ZPER - Kafka inspired persistence broker

2012-12-07 Thread Yu Dongmin
Hello, I started a fun project ZPER, zeromq persistence broker. https://github.com/miniway/zper This works similar as Apache kafka does. Here's the sample of producer code. Then broker will store message as ZMTP 2.0 raw format. Context ctx = ZMQ.context (1); Socket sock

[zeromq-dev] Discussion on ROUTER action

2012-12-05 Thread Yu Dongmin
Hello, As we all know, ROUTER drop messages when 1) a counter part doesn't exist and 2 ) a counter part is full. In case of 1) we can catch the case by setting ZMQ_ROUTER_MANDATORY. But in case of 2) ROUTER drop message silently and the send returns 0. Server side ROUTER-DEALER pattern includ

Re: [zeromq-dev] Zyre: interface selection and implementation separation

2012-12-02 Thread Yu Dongmin
Hello, Zyre is trying to use the wireless NIC as possible. SIOCGWINAME is used as the last non-loopback interface is not always wireless nic. please refer, https://github.com/zeromq/zyre/issues/25 As far as I know, when a system that doesn't have proper ioctl option (that's why we have #ifdef

Re: [zeromq-dev] zeromq assertion error with jzmq

2012-11-15 Thread Yu Dongmin
Ok, The exception occurs when the pointer of c++ bound socket is null. If we use ZMQ.Socket after ZMQ.Socket.close is called, this exception could occur. I know how it the storm works. The storm doesn't do complex stuffs with the zeromq. So I don't think it misuse the zeromq. Does the word co

Re: [zeromq-dev] zeromq assertion error with jzmq

2012-11-15 Thread Yu Dongmin
Could you please show us the java code which you tested with ? This might help to look into the problem. Thanks Min On Nov 16, 2012, at 12:52 PM, 陈竞 wrote: > hi, i use jzmq in my project, i use jzmq 2.10, zeromq 2.1.7, but i get a > problem: i get assertion error in zeromq. i get the core

Re: [zeromq-dev] fun with Java API

2012-11-15 Thread Yu Dongmin
When I share the context between threads before creating a socket, I set the actual context manually ZContext ctx = new ZContext (); ctx.setContext (ZMQ.context (1)); Thanks Min On Nov 16, 2012, at 10:11 AM, Pieter Hintjens wrote: > On Fri, Nov 16, 2012 at 7:13 AM, Peter Frie

Re: [zeromq-dev] jzmq, Empty messages with PubSub example

2012-11-12 Thread Yu Dongmin
ompiled jzmq > > cd ../jzmq > make clean > make > make install > export JAVA_HOME=`/usr/libexec/java_home -v 1.7` > mvn clean install > > and rebuild my application but still get empty error messages. > > > [1] git://github.

Re: [zeromq-dev] jzmq, Empty messages with PubSub example

2012-11-12 Thread Yu Dongmin
I couldn't reproduce the test failure on jzmq in my macbook having osx 10.8.2. The differences is that I installed libzmq from the git not by the brew. Cloud you please clean old lbzmq shared objects and build/install from the latest libzmq/zeromq3-x git ? Thanks Min On Nov 12, 2012, at 5:11