[zeromq-dev] Would like to contribute to The Guide examples

2024-04-01 Thread Osiris Pedroso
Hello Zmqers,

I'm back after a long hiatus and would like to contribute some examples for
the Guide using the Rust language.

I would love to have someone that could mentor me with stupid questions
like, where is the repository for The Guide that I could start working on a
PR.

Thank you very much in advance,
Osiris Pedroso
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] SAL annotations

2023-10-17 Thread Osiris Pedroso
Hi Axel,

Sounds wonderful since it won't affect other platform targets and give us
extra benefits when compiling with MSbuild. You got my vote.

Best regards,
Osiris



On Tue, 17 Oct 2023, 06:56 Axel R.,  wrote:

> Hi ZeroMQ devs,
>
> I want to see how you guys feel about adding SAL 2 annotations to the code
> (https://learn.microsoft.com/en-us/cpp/c-runtime-library/sal-annotations
> 
> )
>
> The goal is to give hints to (Microsoft’s) static analyzers beyond what
> can be inferred from the code itself, with the hope to enforce correct
> usage, verify assumptions at compile time, and ultimately reduce defects.
>
> We have a couple of static analyzers at work that use the annotations, the
> public version of one of them (PREfast) ships with Visual Studio and can be
> used by anyone.
>
> It is possible to #define out all annotations for non-MSVC builds. The
> PREfast analysis itself is opt-in so it’s possible to annotate with zero
> side effect save for a little more work for the preprocessor.
>
> What I did was adding a new zmq_sal.h header (next to zmq_utils.h) and
> simply included it #ifdef _MSC_VER from zmq.h
>
> The new header either includes  from the Windows SDK for MSVC, or
> adds a bunch of #defines that resolve to nothing for other compilers.
>
> The next step is to annotate all the exported functions, then
> progressively move inwards to internal functions and methods and check that
> in.
>
> From there, anyone can opt to enable code analysis on MSVC builds and
> review/address the more insightful warnings. Any resulting code changes
> would be separate things.
>
> Thoughts?
>
> Axel
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Dealer socket pkts are not drained by I/O thread

2021-11-16 Thread Osiris Pedroso
Hi Siva,

What Stephane meant was to write some code that shows the issue you are
experiencing.

Yes, it's more work, but it would speed up wonders how fast you get a
solution for your issue.

Best regards,
Osiris

On Tue, Nov 16, 2021, 10:14 donthamsetty sivaprasad via zeromq-dev <
zeromq-dev@lists.zeromq.org> wrote:

>
> Stephane .
> Thanks for the response.
> To simplify the question ,
> If more than 8192(output_batch_size) bytes is lying in the dealer socket
> pipe , will the I/O thread get more than one notification to drain the
> pipe.?  My understanding  sender will not notify the I/O thread unless pipe
> is completely drained.
>
> Please correct me if i am wrong .
>
> Thanks
> Siva
> On Tuesday, November 16, 2021, 02:35:37 PM GMT+5:30, Stephane Vales <
> va...@ingenuity.io> wrote:
>
>
> Hello Siva,
>
> Rather than pointing the code by itself, maybe it would be better if you
> could write some minimal examples testing your assumptions. Then, if they
> are confirmed, you could use them to expose problems in this list or to
> create issues on github.
>
> Cheers.
>
>
> Stéphane.
>
>
> Le 16 nov. 2021 à 07:51, donthamsetty sivaprasad via zeromq-dev <
> zeromq-dev@lists.zeromq.org> a écrit :
>
> Hi ,
> The stream engine ( ZMQ dealer=>ZMQ dealer using TCP connection) in the
> I/O thread at a time reads at most 8172 from the below code. But the writer
> sends the notification to the I/O thread only if it completely drains the
> queue in ypie.hpp: flush() based on the compare and swap _c_ptr .
>
> src/config.hpp:out_batch_size = 8192,
> src/stream_engine.cpp:while (_outsize < static_cast
> (out_batch_size)) {
> src/stream_engine.cpp:size_t n = _encoder->encode (,
> out_batch_size - _outsi
>
>
> Could you please confirm if this is a real problem ? If more than 8172
> bytes are lying in pipe and I?O threads drains only 8172 , How does writer
> sends read notification to I/O thread since it is not fully drained?
>
> Could you please answer this ?
>
> Thanks
> Siva
> On Sunday, November 14, 2021, 08:49:10 AM GMT+5:30, donthamsetty
> sivaprasad via zeromq-dev  wrote:
>
>
> The version used is zeromq 4.3.1
>
> Thanks in advance .
> Response is highly appreciated.
>
> Thanks
> Siva
>
> On Sunday, November 14, 2021, 08:42:00 AM GMT+5:30, donthamsetty
> sivaprasad via zeromq-dev  wrote:
>
>
> Hi ,
> The pipe_t between Dealer socket and I/O thread has been stuck in the
> sense that msgs are continuously written into the pipe but not drained. And
> the sender is not doing the flush because the compare and swap pointer is
> NOT null.
> I have gone through the code. After the sender has notified the I/O thread
> for read , I/O thread reads atmost output_batch_size(8072).. Please correct
> me if I am wrong . If the I/O thread does not fully drain the pipe for any
> reason , the sender will not notify again since sender depends on c_ptr
> (cas ptr) being NULL , which will not be set to NULL unless the I/O thread
> drains the pipe fully.
> Basically the case is sender is NOT nitifying the I/O thread sicne the
> c_ptr is not NULL at all and I/O thread is not reading because it will not
> get the notifcation ..The pipe is continuously filled and messages are not
> sent out to the ultimate destination due to this..
>
> OR
> The above situtation could be there is some race in multi core
> environment where compare and swap operation is not operating consistently
> . Our system is ARM v7 system .
>
> Please let me know if there are known problems.
>
> THanks
> Siva
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Using ZMQ with Rust

2021-05-12 Thread Osiris Pedroso
Hello ZMQers,

I am starting a new job where we use Rust as the main language.
I am preparing myself by learning Rust the language and I would like to
write some ZMQ sample code using it.

I checked the website and there are lots of examples but there is not a
starting guide.
The only hint is to add the string "zmq = "0.9" under "[Dependencies]" in
the projects Cargo.toml file to get access to ZMQ libraries.

I installed Rust on a Windows machine.
After successfully executing "cargo new rust-zmq-hello-world" which creates
a a project of this name which compiles and runs fine like this:

  PS C:\Users\opedroso\rust-zmq-hello-world> cargo check
Checking rust-zmq-hello-world v0.1.0
(C:\Users\opedroso\rust-zmq-hello-world)
Finished dev [unoptimized + debuginfo] target(s) in 1.57s


I then added the string above to my Cargo.toml project file. No other
changes.
After that when I execute "cargo check" or "cargo run" on this project
directory, I get this error:

PS C:\Users\opedroso\rust-zmq-hello-world> cargo check
Blocking waiting for file lock on package cache
Updating crates.io index
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
   Compiling pkg-config v0.3.19
   Compiling error-chain v0.10.0
   Compiling toml v0.2.1
   Compiling libc v0.2.94
   Compiling bitflags v1.2.1
   Compiling log v0.4.14
   Compiling zmq v0.9.2
Checking cfg-if v1.0.0
   Compiling metadeps v1.1.2
   Compiling zmq-sys v0.11.0
error: failed to run custom build command for `zmq-sys v0.11.0`

Caused by:
  process didn't exit successfully:
`C:\Users\opedroso\rust-zmq-hello-world\target\debug\build\zmq-sys-7f0b989f3761c178\build-script-main`
(exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBZMQ_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBZMQ_STATIC
  cargo:rerun-if-env-changed=LIBZMQ_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'Unable to locate libzmq:
  Failed to run `"pkg-config" "--libs" "--cflags" "libzmq" "libzmq >=
4.1"`: The system cannot find the file specified. (os error 2)',
C:\Users\opedroso\.cargo\registry\src\github.com-1ecc6299db9ec823\zmq-sys-0.11.0\build\pkg_config.rs:26
:17
  note: run with `RUST_BACKTRACE=1` environment variable to display a
backtrace

Appreciate any pointers on passing this hurdle.

Best regards,
Osiris Pedroso
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Download page missing Windows instructions

2021-05-12 Thread Osiris Pedroso
Hello ZMQers,

I just noticed that the Download page (https://zeromq.org/download/) does
not have instructions for downloading ZMQ for Windows.

Could somebody please add it?

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] cppzmq "tour"

2020-04-16 Thread Osiris Pedroso
Still reading it, but great doc!

Thanks for sharing.

On Thu, Apr 16, 2020, 02:09 Brett Viren  wrote:

> Hi,
>
> I wrote up a "tour" of cppzmq in order to drive me to learn more about
> it.
>
>   https://brettviren.github.io/cppzmq-tour/
>
> Maybe it's of use or interest to others.
>
> Cheers,
> -Brett.
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Static zmq context in Windows DLL

2019-12-09 Thread Osiris Pedroso
Sorry, my previous email was sent without much time (I had an online class
to attend...).

The idea is to define a single instance that holds your context.
When instantiating this singleton, make sure there is nothing else in the
source file (the singleton instantiation is the last executable statement
in the source file).
Then, in the line above this source line, add this pragma:

#pragman init_seg(lib)

MyClassHasAContext myContext;

//... no more code after it ...


The explanation for this pragma can be found here:
https://docs.microsoft.com/en-us/cpp/preprocessor/init-seg?view=vs-2019

Bottom line, all variables are normally defined with the default #pragma
init_seg(compiler).
All variables defines in the init_seg "lib" will be initialized (have their
constructors executed or their initializer functions executed) before any
functions from the init_seg "compiler".

This also works in reverse order when the DLL is shutting down. The classes
instantiated in the segment "lib" will have their destructors executed
after all static instances defined in the segment "compiler" have been
destroyed.

Obviously you can have more definitions after the pragma, but when defining
timing dependent code like this, it is better to separate the critical code
to a separate source file and make sure that only the items you need the
strict lifetime control are there.
Obviously the lifetime of object will be in the order they are defined in
the source file. If this is the only file with the init_seg "lib", the
first defined variable will have the all encompassing lifetime, the next
line, one bit less, and so on (for class instances). If you have more than
one source file with this pragma, it becomes more difficult to control
their lifetimes unless you control the linking order of the objects
generated. I would avoid that.

I also suggest you enable ... Native ... under Debug Options. When you set
a break in the debugger in your constructor, if you loaded the source code
for the C++ runtime (during DevStudio installation), you will be able to
see function name of the C++ runtime calling your constructor, find it in
the C++ runtime source code and understand what it is doing.

Hope it helps,
Osiris

On Mon, Dec 9, 2019 at 2:18 PM Attila Magyari  wrote:

> Hello,
>
> I've encountered this issue: https://github.com/zeromq/czmq/issues/1788
> Basically when exiting the application, I get this error: *Assertion
> failed: Successful WSASTARTUP not yet performed.*
>
> I am using ZeroMQ on windows inside a DLL. I have a global static zeromq
> context, because I want it persistent across multiple instances of my
> objects, and there is no central place I could pass it from otherwise.
>
> The proposed solution is to call zsys_shutdown() before exiting the
> application, but I don't know how and where:
>
>- This function is not available through the API that I am using
>(zmq.h/zmq.hpp)
>- Not sure where would I call it, as I don't know when the application
>exits. In my library there is no main object that could control the
>lifetime of the zmq layer
>
> Any idea how to approach this?
>
> Kinds regards,
> Attila
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Static zmq context in Windows DLL

2019-12-09 Thread Osiris Pedroso
In a Windows Dll, that function is named DllMain. Look for it's
documentation, and there is an argument for when shutdown is happening.
But it's not necessarily always called, i.e. when TerminateProcess() is
called.

Best bet is to define s Singleton class, define it's instance within a
#pragma lib (which forces its initializer to be executed before anything
else and it's destruction to be the last thing happening.

On Mon, Dec 9, 2019, 17:23 Simon Giesecke  wrote:

> Hi,
>
> The problem will be that the destruction order is not what you expect it
> to be.
>
> I think overall, the least painful way to address this is to not use a
> global static zeromq context in your DLL, and rather pass one instance
> explicitly to all objects that require it.
>
> If you really don't want to go this way, one alternative is that your DLL
> exposes a shutdown function to the application, which calls that shutdown
> function when it exits. The shutdown function then closes the global static
> zeromq context. (This is what the mentioned zsys_shutdown function does for
> czmq)
>
> Best wishes
> Simon
>
> On Mon, Dec 9, 2019 at 2:16 PM Attila Magyari  wrote:
>
>> Hello,
>>
>> I've encountered this issue: https://github.com/zeromq/czmq/issues/1788
>> Basically when exiting the application, I get this error: *Assertion
>> failed: Successful WSASTARTUP not yet performed.*
>>
>> I am using ZeroMQ on windows inside a DLL. I have a global static zeromq
>> context, because I want it persistent across multiple instances of my
>> objects, and there is no central place I could pass it from otherwise.
>>
>> The proposed solution is to call zsys_shutdown() before exiting the
>> application, but I don't know how and where:
>>
>>- This function is not available through the API that I am using
>>(zmq.h/zmq.hpp)
>>- Not sure where would I call it, as I don't know when the
>>application exits. In my library there is no main object that could 
>> control
>>the lifetime of the zmq layer
>>
>> Any idea how to approach this?
>>
>> Kinds regards,
>> Attila
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
> --
>
> Dr.-Ing. Simon Giesecke
> Lehmbruckstr. 18 - 10245 Berlin (Friedrichshain)
> Tel.: 030-29360491
> Tel.: 0179-6868999 (Mobil)
> E-Mail: simon.giese...@gmxpro.de
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] max PUB/SUB topics

2019-05-15 Thread Osiris Pedroso
>* sort of like how I got into the habit of putting [IMPLICITNONE] at the
start of every FORTRAN module

That bring memories... :-)

On Wed, May 15, 2019, 19:07 Brian T. Carcich 
wrote:

> On Wed, May 15, 2019 at 8:40 AM Bekritsky, Benjamin via zeromq-dev <
> zeromq-dev@lists.zeromq.org> wrote:
>
>> Turns out Justin’s original suggestion to “to set SNDHWM=0 on the SUB
>> socket and RCVHWM=0 on the PUB socket” resolves the issue. In particular on
>> the SUB socket.  I had mistakenly set the *RCV*HWM for the SUB socket.
>>
>
>
> On Wed, May 15, 2019 at 6:23 AM James Harvey 
> wrote:
>
>> [...]
>>
> 1. subscriptions make it through to the publisher, this is where the
>> filtering happens (apart from pgm/mcast transport)
>>
>
>
> Thank you/aHA/Eureka/the light just came on:  each
> setsockopt/ZMQ_SUBSCRIBE by the subscriber ***S*e*ND*s** a message **to**
> the publisher, which is why the subscriber needs to set *SND*HWM to 0 (I
> suppose anything over 65535 woould work for 16-bit topics).
>
> I updated my example code
> , and it now works
> as expected.
>
>
>
> Philosophical sidebar:  why does it seem that we always end up in the
> internals?  Stated another way, why doesn't the library just work all the
> time for every case  (Although if it did, wouldn't many of us be out of a
> job;-)?
>
> #1 I am not saying anything against 0MQ; on the contrary, I think it's
> amazing.
>
> I guess the answer is the Pareto Principle (80/20), i.e. that any single
> library cannot handle all edge cases with its default settings, so we spend
> 80% of our time, digging into the internals, for the 20% that are edge
> cases.
>
> For example, the default HWMs of 1000 are not unreasonable; they work fine
> until a case like Benjy's comes along,  Then, to solve his problem we
> needed those (Justin, James) who understand the internals to provide the
> answer.  Maybe the default HWM should be zero (i.e. infinite; damn the
> torpedoes, full speed ahead!;-), and let developers who need finite HWMs
> set them up themselves*. Then we'd be fine (until the next edge case;-).
>
> * sort of like how I got into the habit of putting [IMPLICITNONE] at the
> start of every FORTRAN module.
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ZeroMQ Slack

2019-02-18 Thread Osiris Pedroso
ZeroMQers?
I do. Should I add anybody else as an admin?

Sent from my iPad

> On Feb 18, 2019, at 19:39, Luca Boccassi  wrote:
> 
>> On Mon, 2019-02-18 at 13:20 -0500, Trevor Bernard wrote:
>> Does anyone know who owns the zeromq slack channel?
>> 
>> -Trev
> 
> I have access, just invited you. Not used at all at the moment. We have
> a separate one for the hackatons/meetings.
> 
> -- 
> Kind regards,
> Luca Boccassi
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] RIP Pieter Hintjens

2018-12-03 Thread Osiris Pedroso
Today is the birthday of Pieter Hintjens.
This year I will have a German weissbeer in your honor.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Help using VSCode to build libzmq

2018-11-02 Thread Osiris Pedroso
Hello,

Coming back from a hiatus, I would like to work on the Github #3263 issue
(a Windows crash in libzmq).
I would like to use VSCode to build LIBZMQ, if possible.
Are there any VSCode users out there that could give me some pointers on
how to build LIBZMQ (or any of the ZMQ projects) using VSCode?

Appreciate any pointers,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] follow up on crash in issue #3263

2018-11-02 Thread Osiris Pedroso
Hi Peter,

I will take a look at it this weekend.

Osiris

On Fri, Nov 2, 2018 at 2:19 AM Peter Djalaliev via zeromq-dev <
zeromq-dev@lists.zeromq.org> wrote:

> Hello,
>
>
>
> I would like to follow up with a crash in ZeroMQ reported in GitHub issue
> #3263: https://github.com/zeromq/libzmq/issues/3263.
>
> We believe that this is a security vulnerability in ZeroMQ. Can somebody
> take a look at it?
>
>
>
> Best regards,
>
>
>
> Peter Djalaliev
>
> Sr. Product Security Engineer, Symantec PSIRT
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Unsubscribe

2018-09-27 Thread Osiris Pedroso
Ok, dirty laundry has been cleaned, I feel loved again. 
Please keep me in the mail list

 I'll set a goal to make another attempt.
Hopefully I'll have something to show by the time February rolls by.

PS: Luca, I no longer have that file. Thanks for the offer.

On Thu, Sep 27, 2018, 12:48 Luca Boccassi  wrote:

> On Thu, 2018-09-27 at 06:18 +0200, Osiris Pedroso wrote:
> > Yes, I am sad to say so.
> > The problem is that I never really contributed.
>
> Computer says yes :-)
>
> bluca@precision:~/git/libzmq (master)$ git log --author=Osiris --oneline
> | wc -l
> 13
>
> > I did attempt once in the very beginning when I naively wrote a
> > Windows
> > Office document detailing how to get and build the several ZeroMQ
> > projects
> > in the Windows environment, but my PR was rejected because it
> > contained a
> > file in a DOC format. I remember I spent a day working on it, making
> > sure
> > it was correct and looked good. I was very proud of my first
> > submission...
>
> We talked about this last year - I'm truly sorry you felt that way, but
> again the issue is purely technical and was simply about the file being
> in binary format, which wreaks havoc in git (every time you change even
> one character the file is duplicated in the history, so pretty soon the
> repository size explodes). It's not just .doc - it's any non-text file
> format that can't be accepted in a git repo. Once added, it's forever
> +X MBs in size, and it can never go down.
>
> We talked about of adding a link in the README, and have the file
> hosted elsewhere instead (cloud office 365 I think? Or the wiki? Can't
> recall) to avoid this issue, and you seemed to appreciate the idea at
> the time if I remember correctly?
>
> Would you like to send a PR to get this added?
>
> > Even though the C4 guidelines, which ZeroMQ projects are supposed to
> > adhere, say nothing of restricting Windows related contributions,
> > that in
> > fact seems to me is what happens. Even though most questions on the
> > mailing
> > list seem to come from Windows users, the ZeroMQ developers as a
> > group seem
> > to be Windows bigots.
> >
> > I always wanted to work on Linux, but my career was such that I
> > stayed in
> > Windows for over 30 years (my first 4 years were using AT Unix
> > System V,
> > a precursor even to BSD, then Windows).
> >
> > The last couple of years I've watched the mailing list.
> > Last Hackathon I wanted to do something significant. One of the
> > projects
> > Luca Bocassi said we're of interest was using AF sockets in Windows
> > 10, now
> > that this is available. I looked at it, and at the time it was only
> > available on a Window Dev build (it is probably available in Windows
> > 10
> > mainstream now).
> > Bottom line, I did not get anywhere. Plus I had the feeling that if I
> > were
> > to ask any questions it would not be well received by the group,.
> > This
> > discouraged me to pursue it any further.
> >
> > This year my life has changed quite a bit.
> > I have moved to Nürnberg, Germany working for a database company. In
> > addition to starting a new job in a new country, I am learning German
> > which
> > takes all of my free time. And since this company products are Linux
> > based,
> > I am re-learning how to develop in this environment.
> >
> > Funny that now when it would be much cheaper to attend the
> > Hackathons, I
> > have decided that my contributions are not worth it.
> >
> > Now that Microsoft embraced Open Source, making tools such as VSCode
> > (the
> > Windows Development IDE) available as Open Source in all platforms
> > (Linux,
> > MacOS, Windows), it would be a great thing if ZeroMQ could be
> > built/developed in this integrated environment (from my Windowzy
> > point of
> > view), allowing for debugging in any of these platforms in a single
> > way,
> > but I can already hear the cringe of some members just from hearing
> > the
> > proposal.
>
> I think this is a bit too harsh :-) There's plenty of Windows devs
> working on the project - lots of work has happened in the past year,
> for example to make the CMake stuff better, and to have binaries
> available for Windows too online (I think the platform is called
> Conda?).
> For example, you should be able to now use CMake seamlessly from VSCode
> (or any other versions of VS) and get the exact same build results as
> you'd get on *nix.
>
> Also a Windows version of epoll was merged a few months back to make
> internal polling faster

Re: [zeromq-dev] Unsubscribe

2018-09-26 Thread Osiris Pedroso
Yes, I am sad to say so.
The problem is that I never really contributed.

I did attempt once in the very beginning when I naively wrote a Windows
Office document detailing how to get and build the several ZeroMQ projects
in the Windows environment, but my PR was rejected because it contained a
file in a DOC format. I remember I spent a day working on it, making sure
it was correct and looked good. I was very proud of my first submission...

Even though the C4 guidelines, which ZeroMQ projects are supposed to
adhere, say nothing of restricting Windows related contributions, that in
fact seems to me is what happens. Even though most questions on the mailing
list seem to come from Windows users, the ZeroMQ developers as a group seem
to be Windows bigots.

I always wanted to work on Linux, but my career was such that I stayed in
Windows for over 30 years (my first 4 years were using AT Unix System V,
a precursor even to BSD, then Windows).

The last couple of years I've watched the mailing list.
Last Hackathon I wanted to do something significant. One of the projects
Luca Bocassi said we're of interest was using AF sockets in Windows 10, now
that this is available. I looked at it, and at the time it was only
available on a Window Dev build (it is probably available in Windows 10
mainstream now).
Bottom line, I did not get anywhere. Plus I had the feeling that if I were
to ask any questions it would not be well received by the group,. This
discouraged me to pursue it any further.

This year my life has changed quite a bit.
I have moved to Nürnberg, Germany working for a database company. In
addition to starting a new job in a new country, I am learning German which
takes all of my free time. And since this company products are Linux based,
I am re-learning how to develop in this environment.

Funny that now when it would be much cheaper to attend the Hackathons, I
have decided that my contributions are not worth it.

Now that Microsoft embraced Open Source, making tools such as VSCode (the
Windows Development IDE) available as Open Source in all platforms (Linux,
MacOS, Windows), it would be a great thing if ZeroMQ could be
built/developed in this integrated environment (from my Windowzy point of
view), allowing for debugging in any of these platforms in a single way,
but I can already hear the cringe of some members just from hearing the
proposal.

Although I love the idea of participating in an Open Source project, it is
possible that ZeroMQ is not the best fit for my skill set.

But thank you for asking, Benjamin.
You seem to care, and I appreciate that.

On Wed, Sep 26, 2018, 18:36 Benjamin Henrion  wrote:

> Are we loosing you?
>
> On Wed, Sep 26, 2018, 17:55 Osiris Pedroso  wrote:
>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Unsubscribe

2018-09-26 Thread Osiris Pedroso

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] FOSDEM 2018 - ZeroMQ gathering/hackaton?

2018-01-26 Thread Osiris Pedroso
I will have to miss it.
My flight arrives on Thursday at 7:15am...

Do we plan anything for Saturday?

On Fri, Jan 26, 2018 at 8:05 AM Luca Boccassi 
wrote:

> Hi,
>
> I'll try to be there early on Thursday as well.
>
> I'll arrive Wednesday evening as well - anybody else? Shall we grab a
> beer somewhere?
>
> On Thu, 2018-01-25 at 16:39 +0100, Kevin Sapper wrote:
> > Hi Benjamin,
> >
> > I'll arrive in Brussels on Wednesday evening and will be able to be
> > at HXBL
> > on Thursday at 8am to take the keys.
> >
> > See you next week.
> >
> > Cheers
> > Kevin
> >
> > Am 24.01.2018 10:16 nachm. schrieb "Benjamin Henrion"  > om>:
> >
> > On Wed, Jan 24, 2018 at 9:54 PM, Luca Boccassi  > om>
> > wrote:
> > > On Sun, 2017-08-27 at 18:20 +0100, Luca Boccassi wrote:
> > > > Hello,
> > > >
> > > > FOSDEM 2018 dates have been announced, it will be on Saturday 3rd
> > > > and
> > > > Sunday 4th of February. [1]
> > > >
> > > > Would people be interested in replicating last year's 2-days ZMQ
> > > > gathering/hackaton before FOSDEM?
> > > >
> > > > Benjamin, would the hacker space we were at be available again?
> > > >
> > > > Kind regards,
> > > > Luca Boccassi
> > > >
> > > > [1] https://fosdem.org/2018/
> > >
> > > Hey all,
> > >
> > > Just a week to go!
> > >
> > > If you have proposed an idea for the hackaton, and it requires some
> > > non-trivial setup or dependencies, could you please consider
> > > preparing
> > > a short how-to before the event and post it as a comment on the
> > > page?
> > >
> > > http://zeromq.org/event:zeromq-pre-fosdem-hackaton-thu-1-fri-2-feb-
> > > 2018
> > >
> > > This way we can more easily and quickly bring who is interested up
> > > to
> > > speed.
> > >
> > > I'll go first - I've built Ubuntu/Debian packages for DPDK and over
> > > the
> > > weekend I'll prepare a quick howto.
> >
> > Some practical things:
> >
> > 1. I will be there on Friday the whole day, on Thursday I will have
> > to
> > work and I will come to open the doors of HSBXL early in the morning
> > (like 8am), and come back in the afternoon. There are 4 doors/gates
> > to
> > pass, so I would need someone to be there with me to take the keys. I
> > will try to go there the day before, and warm up the place;
> > 2. On the friday evening at 6PM, there is a Kubernetes meetup with 40
> > people, so I will need the help of you guys to move stuff around
> > (tables, seats, etc...), as I broke my back last year and I cannot
> > lift heavy things;
> >
> > See you next week!
> >
> > --
> > Benjamin Henrion (zoobab)
> > Email: zoobab at gmail.com
> > Mobile: +32-484-566109 <+32%20484%2056%2061%2009>
> > Web: http://www.zoobab.com
> > FFII.org Brussels
> > "In July 2005, after several failed attempts to legalise software
> > patents in Europe, the patent establishment changed its strategy.
> > Instead of explicitly seeking to sanction the patentability of
> > software, they are now seeking to create a central European patent
> > court, which would establish and enforce patentability rules in their
> > favor, without any possibility of correction by competing courts or
> > democratically elected legislators."
> > ___
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> > ___
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> --
> Kind regards,
> Luca Boccassi___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Windows dll build errors.

2018-01-22 Thread Osiris Pedroso
>From your other email, seems like you passed this build problem.
What was the solution/root problem?

Thanks,
Osiris

On Sat, Jan 13, 2018 at 8:05 AM Stephen Gray  wrote:

> I’m trying to compile a .dll on Windows 10.  It  #includes .  I’m
> getting a mass of errors:  https://pastebin.com/Vzfg4DQV relating to
> Windows networking functionality; ws2.def, WinSock2.h, ws2ipdef.h etc…..
>
>
>
> In the past I’ve built similar .dlls on Windows using ONLY #include
>  and it was necessary to #define _*WINSOCK2API*_ to get the dll to
> compile.  I tried that in this case, but still get errors.
>
>
>
> Does anyone please know how to solve the issue and get the dll to compile?
>
>
>
> With thanks,
>
>
>
> Stephen
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Client API with zactor

2018-01-19 Thread Osiris Pedroso
Peter used to say that the way to handle threaded code was to send a
message that only the intended thread processed, therefore all the
interactions would be executed in that thread's context.

On this page (http://zeromq.org/intro:read-the-manual) there is a link to
this paper (close to the bottom)
Backgrounders and Whitepapers

   - Pieter Hintjens and Martin Sustrik explain
    how ZeroMQ
   solves the challenge of creating large multicore applications in any
   language. Also in PDF (8 pages)
   

   .

See if this is what you are looking for.

On Fri, Jan 19, 2018 at 2:52 PM Kevin Wang  wrote:

> Hello everyone,
>
> I am building a client API that abstracts away sockets and the Zeromq
> and CZMQ layer. To do that, my class has a zactor containing a zloop,
> polling on all the various sockets in the class.
>
> I eventually want my users to define their own "events", which are
> messages containing an event name (string) and associated data in the
> next frame, and for them to write their own functions that are called by
> the zloop when their messages arrive. I am doing this by creating a
> virtual function for them to override, which they can use to define
> their own behavior.
>
> And everything was good, until I realized that their defined function
> would be called in the zactor thread, not the user's thread. If they
> chose to define their function to change some variable or call some
> other function, that would cause a race condition.
>
> At least, that is what I think could happen. I realize that this is only
> loosely related to zeromq, and more about API design, but is there
> anyone else that has run into this problem? Is this a valid concern?
>
> My proposed solution would be to push these event messages to the user
> thread, and make the user call a processEvents() function when they can,
> which pulls the event messages and acts on them.
>
> Similar to:
>
> while(!quitCondition){
>
> client.processEvents()
>
> //Run other code
>
> }
>
> I am new to dealing with threads and am not sure if this is a common
> pattern, or if there is something basic I am missing.
>
>
> Thanks
>
> Kevin
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Syncronising / isolating zsys layer between dlls

2018-01-18 Thread Osiris Pedroso
The count you keep, where does it live?
Seems like it should live in the main executable or another DLL that
outlives both origin.dll and client.dll.
That way the count would be shared and only after both DLLs stop using
zsys, zsys_shutdown would be called.
Also make sure count is updated with InterlockedIncrement and
InterlockedDecrement APIs so there are no race conditions.

Don't know if an option, but have you considered using static library links
of the zsys code?

On Jan 18, 2018 06:09, "Stephen Gray"  wrote:

> I’ve got two dlls;  origin.dll & client.dll, both use the CZMQ api are
> running on the same Windows computer as my custom extensions to a
> proprietary app.
>
>
>
> I’m having issues with the scoping of zsys.  I think there is one instance
> of zsys layer serving both dlls.  But my understanding of how zsys layer
> works is hazy.
>
>
>
> Inside each dll at runtime are multiple instances of a class using the
> CZMQ api.  I call zsys_init() on instantiation of the first class then I
> keep count of the instances as they come and go.  When the count goes to
> zero I call zsys_shutdown().  This causes an issue when, for example,
> client.dll is shutting down but origin.dll is still running.  The client
> shuts down the zsys layer which pulls the rug from under origin.dll then
> everything gets untidy, inelegant and crashes.
>
>
>
> Is there a way to give each dll a dedicated zsys layer?  Or a way to
> synchronise the shutdown? Or some other way to solve the problem?
>
>
>
> This is the final issue in getting my scheme to function!  So close……
>
>
>
> Thanks,
>
>
>
> Stephen
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] FOSDEM 2018 - ZeroMQ gathering/hackaton?

2018-01-17 Thread Osiris Pedroso
Do I need more than add my name to list of participants on
http://zeromq.org/event:zeromq-pre-fosdem-hackaton-thu-1-fri-2-feb-2018  to
register?
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] RFC: Better control of growing malamute mailbox queues

2017-12-15 Thread Osiris Pedroso
And if anybody, after seeing your implementation believes they have an
improvement, they are free to provide that as well.

Organic software growth, solving problems that really exist for everybody
with each person's contribution counting towards the solution.

On Fri, Dec 15, 2017 at 3:29 AM Michal Vyskocil <michal.vysko...@gmail.com>
wrote:

> Hi,
>
> The beauty of C4 proces is that you will decide how to do solve the
> problem. If your solution will work for you, just submit it there. We can
> give you an advice, nothing more
>
> Michal
>
> Dne 12. 12. 2017 4:26 odpoledne napsal uživatel "Marek, Michal" <
> michalmar...@eaton.com>:
>
> Hi Michal,
>>
>> regarding limits, there already is a configurable hard limit on the
>> mailbox size. What I want to add is a soft limit to print a warning,
>> plus analogous limits for message age. For my use case, I'm primarily
>> interested in the soft limits, to get a log message as soon as things
>> start to go wrong.
>>
>> Regarding a) (for the rest of the audience, fty-rest is our "gateway"
>> between HTTP and malamute): It certainly is possible, but the respective
>> HTTP request can time out anyway and delivering the mailbox message at
>> this point is a waste of cycles...
>>
>> Regarding b), that's what I considered in my original email, but it's
>> not as simple as it looks: The broker would need to keep track of past
>> ephemeral clients, so as not to queue mail for them, so either its
>> memory consumption would gradually grow beyond limits, or it would have
>> to forget clients after some time, which means that there would have to
>> be an arbitrary limit... Which means we are back to square one ;). That
>> said, I can go for either solution, just let me know which one is
>> preferable. But keep in mind that it's a choice between two evils:
>> Either a configurable pattern match, which works fine, but is admittedly
>> a hack, or a per-client ephemeral flag, which is a cleaner interface,
>> but the implementation would have to deal with a growing set of past
>> client connections.
>>
>> Thanks,
>> Michal
>>
>> On 2017-12-12 11:42, Michal Vyskocil wrote:
>> > Hi Michal,
>> >
>> > I am not happy with limits, they are hard to get right and will probably
>> > break legal cases. My proposal is to
>> >
>> > a) Fix fty-rest to use malamute client pool
>> > https://github.com/42ity/fty-rest/blob/master/src/shared/tntmlm.cc
>> > exclusively. This way you will have fixed number of mlm clients, which
>> > will regularly read their mailboxes. Theoretically it is possible that
>> > their mailbox will grow indefinitely, but that'd be very pathological
>> > case - like only one thread issuing long replies and timeouts all the
>> time.
>> >
>> > b) Extend malamute protocol, so clients can mark themselves as
>> > "ephemeral". Adding broker based configuration just brings additional
>> > hidden protocol. Client always knows if he wants to have persistent
>> > mailbox or not. Don't forget this does not work with mlm client pool :-)
>> > See following example (and please come with better names :-)
>> >
>> > |// Set client's mailbox as temporary, so messages won't be queued if
>> > client is not connected.
>> > // Return 0 if successful, -1 otherwise (interrupted, not supported)
>> > int mlm_client_set_temporary_mailbox (mlm_client_t *);
>> >
>> > //...
>> >
>> > mlm_client_t *client = mlm_client_new ();
>> > mlm_client_set_temporary_malbox (client); mlm_client_connect (...); |
>> >
>> > ​
>> > The limits inside broker looks really complicated and impossible to
>> > setup in real use cases. Plus if you really know that if client is gone
>> > you're not interested in messages, "ephemeral" clients is what you want
>> to.
>> >
>> > Bye
>> > Michal
>> >
>> >
>> > On Mon, Dec 11, 2017 at 12:23 PM, Osiris Pedroso <opedr...@gmail.com
>> > <mailto:opedr...@gmail.com>> wrote:
>> >
>> > Sounds like a good improvement on Malamute's current implementation.
>> > Go ahead a submit your PR wit these changes.
>> > If someone deems them improvable, they will do so by doing a new PR.
>> >
>> > PS: About the limits, I suggest a much smaller limit for the
>> warning:
>> >  size-limit-warn = 65536
>> >
>> >
>> >
>> > On Fri, Dec 8, 2017 at 8:07 AM 

Re: [zeromq-dev] RFC: Better control of growing malamute mailbox queues

2017-12-11 Thread Osiris Pedroso
Sounds like a good improvement on Malamute's current implementation.
Go ahead a submit your PR wit these changes.
If someone deems them improvable, they will do so by doing a new PR.

PS: About the limits, I suggest a much smaller limit for the warning:
 size-limit-warn = 65536



On Fri, Dec 8, 2017 at 8:07 AM Marek, Michal  wrote:

> Hi,
>
> I've been debugging issues in our project, where malamute's memory usage
> increases due to undelivered mailbox messages. The mailbox/size-limit
> config option helps in some cases, but it does not cover everything.
> E.g., we have client connections that are ephemeral -- they connect with
> a randomly generated address, send a request to some other client's
> mailbox and either receive a response or disconnect after a timeout. The
> result is that if the system is under higher load, malamute ends up with
> bunch of queues holding one message each. Another issue is that it's
> difficult to debug such cases, because the mailbox engine is rather
> silent. Would you guys take patches that
>
> A) add some "soft" limit for the queue size to log a warning when the
>mailbox grows too much? I'm thinking of something like
>mlm_server
>  mailbox
> size-limit = 524288
> size-limit-warn = 262144
>
> B) add an aging mechanism for messages? The idea is that a message
>undelivered for a long period of time can a sign of a problem, either
>on the sender or the receiver. In fact, in our use case, all the
>clients are supposed to be connected, so actually any queued message
>is an anomaly.
>
> C) implement some special handling of ephemeral clients, so that
>messages directed to them are either delivered directly or dropped.
>Now the problem is that if the clients are to advertise their
>ephemeral nature, malamute would have to keep track of past clients,
>so the memory usage would just accumulate elsewhere :). How about
>keying this off the client address somehow, e.g. via a configurable
>regex:
>mlm_server
>  mailbox
>no-queue-pattern = ^temp\..*
>and the clients would set their address to "temp.XX".
>
> The above also applies to service queues to some extent, we just do not
> use this model in our project. What do you think?
>
> Thanks,
> Michal
>
> --
> Michal Marek Eaton European Innovation Center
> Open Source DeveloperBořivojova 2380
> 42ity.org252 63  Roztoky
> Tel: +420 211 151 532 <+420%20211%20151%20532>www.eaton.cz
>
>
>
>
>
> -
> Eaton Elektrotechnika s.r.o. ~ Sídlo společnosti, jak je zapsáno v
> rejstříku: Komárovská 2406, Praha
> 
> 9 - Horní Počernice, 193 00, Česká Republika ~ Jméno, místo, kde byla
> společnost zaregistrována: Praha ~ Identifikační číslo (IČO): 498 11 894
>
> -
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] R.I.P. Pieter Hintjens

2017-12-03 Thread Osiris Pedroso
Today is Pieter's birthday.

Thank you Pieter for all your guidance and knowledge over the years.

I knew you for just a little bit, but you still are a great influence in my
professional life.

Thanks for your contributions to ZeroMQ and to Open Source communities at
large.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] If we compile ZeroMQ sources without modifying them, and link the resulting DLL to an executable that is part of our commercial product , does this make our whole product become a sof

2017-11-13 Thread Osiris Pedroso
An even better solution is to submit a PR for your later version of
compiler which then everybody can use (including you) without "compiling
it".

On Mon, Nov 13, 2017 at 4:41 AM Am Shalem, Shlomo [BWIIL] <
sams...@its.jnj.com> wrote:

> Thanks!
>
> -Original Message-
> From: zeromq-dev [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf
> Of Luca Boccassi
> Sent: Monday, November 13, 2017 12:19 PM
> To: ZeroMQ development list 
> Subject: [EXTERNAL] Re: [zeromq-dev] If we compile ZeroMQ sources without
> modifying them, and link the resulting DLL to an executable that is part of
> our commercial product , does this make our whole product become a software
> under LGPL license?
>
> On Mon, 2017-11-13 at 06:48 +, Am Shalem, Shlomo [BWIIL] wrote:
> > Hello
> >
> > We are two people in our company, who are getting to opposite
> > conclusions, when reading the license and the license FAQ...
> > Could you please help us with the doubt?
> >
> > If we compile ZeroMQ sources without modifying them, and link the
> > resulting DLL to an executable that is part of  our  commercial
> > product ,
> >
> >   1.  Does this make our whole product become a software under LGPL
> > license?
> >   2.  OR does this maintain it as legal, closed-source software?
> >
> > Thanks
> >
> > Motivation: We are interested in compiling the sources because we are
> > using a late version of VisualStudio for which we did not find
> > compiled DLL in the ZeroMQ depository.
>
> The short answers is the 2, the license of your code is not affected.
>
> The verboser explanation is that any LGPL code can be dynamically linked
> to software of any license without affecting it. libzmq offers an
> additional grant of top of that which also allows statically linking.
>
> https://github.com/zeromq/libzmq/blob/master/COPYING.LESSER#L169
>
> --
> Kind regards,
> Luca Boccassi
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Is the Zyre protocol avaiable in .NET?

2017-11-09 Thread Osiris Pedroso
I wonder if there is an implementation of the Zyre protocol that can be
used in .NET.

Are any of you aware of such an implementation?

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] NetMQ unexpected early exit

2017-10-07 Thread Osiris Pedroso
Can anybody comment on this issue:
https://github.com/opedroso/NetMQSamples/issues/1

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] NetMQ behavior question

2017-10-04 Thread Osiris Pedroso
I got one of this example from
http://netmq.readthedocs.io/en/latest/transports/#tcp
'''
using (var end1 = new PairSocket())
using (var end2 = new PairSocket())
{
end1.Bind("inproc://inproc-demo");
end2.Connect("inproc://inproc-demo");

var end1Task = Task.Run(() =>
{
Console.WriteLine("ThreadId = {0}",
Thread.CurrentThread.ManagedThreadId);
Console.WriteLine("Sending hello down the inproc pipeline");
end1.SendFrame("Hello");
});
var end2Task = Task.Run(() =>
{
Console.WriteLine("ThreadId = {0}",
Thread.CurrentThread.ManagedThreadId);
var message = end2.ReceiveFrameString();
Console.WriteLine(message);
});
Task.WaitAll(new[] { end1Task, end2Task });
}
'''

And separated it in two, changing from inproc to tcp:

Producer:
=
'''
using NetMQ;
using NetMQ.Sockets;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace NetMQInprocProducer
{
class Program
{
static void Main(string[] args)
{
using (var end1 = new PairSocket())
{
end1.Bind("tcp://*:");

var end1Task = Task.Run(() =>
{
Console.WriteLine("ThreadId = {0}",
Thread.CurrentThread.ManagedThreadId);
Console.WriteLine("Sending hello down the inproc
pipeline");
end1.SendFrame("Hello");
});
Task.WaitAll(new[] { end1Task });
}
Console.ReadLine();
}
}
}
'''

Consumer:
=
'''
using NetMQ;
using NetMQ.Sockets;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace NetMQInprocConsumer
{
class Program
{
static void Main(string[] args)
{
using (var end2 = new PairSocket())
{
end2.Connect("tcp://localhost:");

var end2Task = Task.Run(() =>
{
Console.WriteLine("ThreadId = {0}",
Thread.CurrentThread.ManagedThreadId);
var message = end2.ReceiveFrameString();
Console.WriteLine(message);
});
Task.WaitAll(new[] { end2Task });
}
Console.ReadLine();
}
}
}
'''

It all runs fine. I can start either consumer or producer and they wait for
each other.
Notice that both end in a Console.ReadLine() statement, which holds the
process alive until I press ENTER on either console that has reached that
statement.

My question is why do both processes exit when I press ENTER in either of
them?
Same behavior is reproducible if I started multiple consumers and a single
producer.

When I run producer, one of the consumers gets the message, but now if I
press ENTER on the producer or the consumer that received the message, all
instances of both consumer and producer exit they processes.
One has exit code 0, the others with exit code -1.
The Visual Studio IDE does not indicate that any exceptions were thrown.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] zyre and upw/limited platform

2017-02-27 Thread Osiris Pedroso
I downloaded netmq-4.0.0.1.zip and tried building it. Same problems.

This is the DevStudio version I am using (as downloaded over the weekend):
Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586



On Sun, Feb 26, 2017 at 6:30 AM Osiris Pedroso <opedr...@gmail.com> wrote:

> Hi Doron,
>
> Update:
>
>1. I read the ZTMP specs and understood what I have to do on a message
>by message.
>
>2. I rebuilt my machine by installing Windows 10 Anniversary edition
>and enabling the Linux subsystem on it (
>https://msdn.microsoft.com/en-us/commandline/wsl/about)
>
>3. I cloned and successfully built the following projects in Linux:
>1. zeromq\libzmq
>   2. zeromq\czmq
>   3. zeromq\libzmtp
>   4. zeromq\zmtp
>
>   4. I cloned and attempted to build the following projects in
>Windows:
>   1. zeromq\ZMTP.NET (success)
>   2. zeromq\NETMQ  (failed to compile using Dev2015)
>
> I looked at the code existing in zeromq\ZMTP.NET.
> There seems to be a NetMQ program.cs that is in no way related to the
> ZMTP.NET implementation as far as I see. Please correct me if I am wrong.
>
> My plan was using the zeromq\zmtp (C) implementation that Pieter did to
> test the zeromq\ZMTP.NET existing code, since he has ZMTP v1.0, v2.0 and
> v3.0 implementations there.
> Then I would do something like add support to multiple frame messages.
> Current implementation only supports single frame messages.
>
> It would be really helpful to have a sample of two nodes (client &
> server?) talking to each other using todays ZMTP.NET implementation in C#
> for me to get further.
>
> Appreciate your guidance,
> Osiris
>
>
> On Thu, Feb 23, 2017 at 10:17 AM Osiris Pedroso <opedr...@gmail.com>
> wrote:
>
> Ok, I will do my research and start adding a socket type.
> Then make it a nugget.
>
> On Thu, Feb 23, 2017 at 10:01 AM Doron Somech <somdo...@gmail.com> wrote:
>
> We can, v2 is  simpler to implement. Also NetMQ only support v2.
> However, I'm fine with v3 as well, NetMQ will catch along.
>
> On Thu, Feb 23, 2017 at 5:47 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
>
> Oops, just realized that are seven ZMTP protocol versions:
> stable: 23 (24 and 25)
> draft: 37 (and 38)
> deprecated: 13 and 15
>
> Doron, I like the incremental approach and the two first tasks.
> I will start working on them and post questions if I get stuck.
>
> But should we not be following at least the stable (23/ZMTP) protocol? I
> hate to write throwaway code.
> It seems that all further protocols depend on 23, so why not implement it
> since the work is not done yet?
> The extensions depend on it.
>
> https://rfc.zeromq.org/spec:23/ZMTP/
>
>1. This document describes ZMTP 3.0. The major change in this version
>is the addition of security mechanisms and the removal of hard-coded
>connection metadata (socket type and identity) from the greeting.
>
> 24/ZMTP-PLAIN and 25 ZMTP-CURVE seem variations to add encryption.
>
> https://rfc.zeromq.org/spec:37/ZMTP/
>
>- This document describes ZMTP 3.1. This version adds SUBSCRIBE,
>CANCEL, PING and PONG commands, and endpoint resources.
>
> 38/ZMTP-GSSAPI  is an addon to 23/ZMTP to add security as specified by
> rfc2743 <https://tools.ietf.org/html/rfc2743>
>
>1. The ZMTP GSSAPI mechanism provides secure authentication and
>confidentiality for ZMTP 3.0. This mechanism utilizes the Generic Security
>Service Application Interface, which provides security services to callers
>in a generic fashion.
>
>
>
> On Thu, Feb 23, 2017 at 9:09 AM Osiris Pedroso <opedr...@gmail.com> wrote:
>
> Under the subtitle "The Socket-Type Property" in the protocol
> <https://rfc.zeromq.org/spec:23/ZMTP/>shows that all your needs would be
> covered in the ZMTP implementation.
>
>
> On Thu, Feb 23, 2017 at 9:01 AM brunobodin . <brunobo...@gmail.com> wrote:
>
> For my project, I need REQ, PUB, SUB, (all connected, no bind), but also
> polling (in a LVC pattern), and PAIR for thread communication... I do not
> have a clear view but it seems it exceed ZMTP ?
> where does signalling interfere with this ? polling ? (I already have the
> REQ working in a native zmq compiled over uwp)
>
> Bruno
>
>
> On Thu, Feb 23, 2017 at 3:49 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
>
> Doron,
>
> What is needed next on it?
> I see that there is a Dealer type socket only implemented. Implement other
> socket types?
>
> What would actually be the ultimate goal/API surface for a ZMTP compatible
> libr

Re: [zeromq-dev] zyre and upw/limited platform

2017-02-23 Thread Osiris Pedroso
Oops, just realized that are seven ZMTP protocol versions:
stable: 23 (24 and 25)
draft: 37 (and 38)
deprecated: 13 and 15

Doron, I like the incremental approach and the two first tasks.
I will start working on them and post questions if I get stuck.

But should we not be following at least the stable (23/ZMTP) protocol? I
hate to write throwaway code.
It seems that all further protocols depend on 23, so why not implement it
since the work is not done yet?
The extensions depend on it.

https://rfc.zeromq.org/spec:23/ZMTP/

   1. This document describes ZMTP 3.0. The major change in this version is
   the addition of security mechanisms and the removal of hard-coded
   connection metadata (socket type and identity) from the greeting.

24/ZMTP-PLAIN and 25 ZMTP-CURVE seem variations to add encryption.

https://rfc.zeromq.org/spec:37/ZMTP/

   - This document describes ZMTP 3.1. This version adds SUBSCRIBE, CANCEL,
   PING and PONG commands, and endpoint resources.

38/ZMTP-GSSAPI  is an addon to 23/ZMTP to add security as specified by
rfc2743 <https://tools.ietf.org/html/rfc2743>

   1. The ZMTP GSSAPI mechanism provides secure authentication and
   confidentiality for ZMTP 3.0. This mechanism utilizes the Generic Security
   Service Application Interface, which provides security services to callers
   in a generic fashion.



On Thu, Feb 23, 2017 at 9:09 AM Osiris Pedroso <opedr...@gmail.com> wrote:

> Under the subtitle "The Socket-Type Property" in the protocol
> <https://rfc.zeromq.org/spec:23/ZMTP/>shows that all your needs would be
> covered in the ZMTP implementation.
>
>
> On Thu, Feb 23, 2017 at 9:01 AM brunobodin . <brunobo...@gmail.com> wrote:
>
> For my project, I need REQ, PUB, SUB, (all connected, no bind), but also
> polling (in a LVC pattern), and PAIR for thread communication... I do not
> have a clear view but it seems it exceed ZMTP ?
> where does signalling interfere with this ? polling ? (I already have the
> REQ working in a native zmq compiled over uwp)
>
> Bruno
>
>
> On Thu, Feb 23, 2017 at 3:49 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
>
> Doron,
>
> What is needed next on it?
> I see that there is a Dealer type socket only implemented. Implement other
> socket types?
>
> What would actually be the ultimate goal/API surface for a ZMTP compatible
> library for UWP in C#?
>
> Is it implementing the ZMTP protocol
> <https://rfc.zeromq.org/spec:23/ZMTP/> in .NET?
>
> Osiris
>
>
>
> On Thu, Feb 23, 2017 at 7:31 AM Doron Somech <somdo...@gmail.com> wrote:
>
> UWP is problematic, you just cannot run zeromq or netmq on it.
>
> I started working on zmtp compatible library for UWP (in C#), you can find
> it here:
>
> https://github.com/somdoron/ZMTP.NET
>
> There is a lot of demand lately for zmtp/zeromq/netmq compatible library
> for UWP.
>
> Someone just need to lead the project, ZMTP.NET is good beginning, which
> I actually think will work on your case (can you use C# in your project?),
> but it is not a complete library yet and in need of a maintainer.
>
> On Thu, Feb 23, 2017 at 3:18 PM, brunobodin . <brunobo...@gmail.com>
> wrote:
>
> Doron,
>
> thanks for the heads up. The point I do not understand then is how I could
> run a test on uwp platform, using a connected REQ socket on uwp side and a
> bound REP on a server side ?
>
> Thanks
>
> Bruno
>
> On Thu, Feb 23, 2017 at 11:08 AM, Doron Somech <somdo...@gmail.com> wrote:
>
> Zeromq internally use socket (for signaling) and binds it (at least on
> windows). Zyre also requires bind, as you already figure out.
> Bottom line I don't think you can use zyre or zeromq on UWP, or at least
> until bind is supported on UWP.
>
>
> On Thu, Feb 23, 2017 at 10:59 AM, brunobodin . <brunobo...@gmail.com>
> wrote:
>
> Hi,
>
> I would like to leverage zyre in my application, but some nodes of the
> application will have to run on uwp platform :-( (not my choice)
>
> From my first tests I am able to build and run zmq, and czmq on uwp
> plaform, using slighly modified
> dll, see  https://github.com/bbdb68/czmq/tree/uwp and
> https://github.com/bbdb68/libzmq/tree/uwp,
> but it seems (even if winsock is said to run on uwp platform...) that I
> cannot bind sockets.
> Zyre builds nicely on uwp.
>
> For now this is not an issue in my design, since only the client nodes are
> supposed to run on the uwp node.
>
> Regarding zyre, I made some experimentation and :
> * discovery step can work thanks to the gossip mode. UDP mode fails
> * but communication fails, most probably because the node's router socket
> cannot bind.
>
> So my question is : do you think it is possible to design a "

Re: [zeromq-dev] zyre and upw/limited platform

2017-02-23 Thread Osiris Pedroso
Under the subtitle "The Socket-Type Property" in the protocol
<https://rfc.zeromq.org/spec:23/ZMTP/>shows that all your needs would be
covered in the ZMTP implementation.

On Thu, Feb 23, 2017 at 9:01 AM brunobodin . <brunobo...@gmail.com> wrote:

> For my project, I need REQ, PUB, SUB, (all connected, no bind), but also
> polling (in a LVC pattern), and PAIR for thread communication... I do not
> have a clear view but it seems it exceed ZMTP ?
> where does signalling interfere with this ? polling ? (I already have the
> REQ working in a native zmq compiled over uwp)
>
> Bruno
>
>
> On Thu, Feb 23, 2017 at 3:49 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
>
> Doron,
>
> What is needed next on it?
> I see that there is a Dealer type socket only implemented. Implement other
> socket types?
>
> What would actually be the ultimate goal/API surface for a ZMTP compatible
> library for UWP in C#?
>
> Is it implementing the ZMTP protocol
> <https://rfc.zeromq.org/spec:23/ZMTP/> in .NET?
>
> Osiris
>
>
>
> On Thu, Feb 23, 2017 at 7:31 AM Doron Somech <somdo...@gmail.com> wrote:
>
> UWP is problematic, you just cannot run zeromq or netmq on it.
>
> I started working on zmtp compatible library for UWP (in C#), you can find
> it here:
>
> https://github.com/somdoron/ZMTP.NET
>
> There is a lot of demand lately for zmtp/zeromq/netmq compatible library
> for UWP.
>
> Someone just need to lead the project, ZMTP.NET is good beginning, which
> I actually think will work on your case (can you use C# in your project?),
> but it is not a complete library yet and in need of a maintainer.
>
> On Thu, Feb 23, 2017 at 3:18 PM, brunobodin . <brunobo...@gmail.com>
> wrote:
>
> Doron,
>
> thanks for the heads up. The point I do not understand then is how I could
> run a test on uwp platform, using a connected REQ socket on uwp side and a
> bound REP on a server side ?
>
> Thanks
>
> Bruno
>
> On Thu, Feb 23, 2017 at 11:08 AM, Doron Somech <somdo...@gmail.com> wrote:
>
> Zeromq internally use socket (for signaling) and binds it (at least on
> windows). Zyre also requires bind, as you already figure out.
> Bottom line I don't think you can use zyre or zeromq on UWP, or at least
> until bind is supported on UWP.
>
>
> On Thu, Feb 23, 2017 at 10:59 AM, brunobodin . <brunobo...@gmail.com>
> wrote:
>
> Hi,
>
> I would like to leverage zyre in my application, but some nodes of the
> application will have to run on uwp platform :-( (not my choice)
>
> From my first tests I am able to build and run zmq, and czmq on uwp
> plaform, using slighly modified
> dll, see  https://github.com/bbdb68/czmq/tree/uwp and
> https://github.com/bbdb68/libzmq/tree/uwp,
> but it seems (even if winsock is said to run on uwp platform...) that I
> cannot bind sockets.
> Zyre builds nicely on uwp.
>
> For now this is not an issue in my design, since only the client nodes are
> supposed to run on the uwp node.
>
> Regarding zyre, I made some experimentation and :
> * discovery step can work thanks to the gossip mode. UDP mode fails
> * but communication fails, most probably because the node's router socket
> cannot bind.
>
> So my question is : do you think it is possible to design a "limited" zyre
> node that could run on such a platform, without performing any bind, while
> connecting to an existing network of zyre nodes ?
>
> I suppose this would require some kind of proxy node that would be bound
> and used as a intermediate between the "limited" nodes and the regular
> node, at least for socket setup.
>
> Any ideas ?
>
> Regards
>
> Bruno
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] zyre and upw/limited platform

2017-02-23 Thread Osiris Pedroso
Doron,

What is needed next on it?
I see that there is a Dealer type socket only implemented. Implement other
socket types?

What would actually be the ultimate goal/API surface for a ZMTP compatible
library for UWP in C#?

Is it implementing the ZMTP protocol 
in .NET?

Osiris



On Thu, Feb 23, 2017 at 7:31 AM Doron Somech  wrote:

> UWP is problematic, you just cannot run zeromq or netmq on it.
>
> I started working on zmtp compatible library for UWP (in C#), you can find
> it here:
>
> https://github.com/somdoron/ZMTP.NET
>
> There is a lot of demand lately for zmtp/zeromq/netmq compatible library
> for UWP.
>
> Someone just need to lead the project, ZMTP.NET is good beginning, which
> I actually think will work on your case (can you use C# in your project?),
> but it is not a complete library yet and in need of a maintainer.
>
> On Thu, Feb 23, 2017 at 3:18 PM, brunobodin . 
> wrote:
>
> Doron,
>
> thanks for the heads up. The point I do not understand then is how I could
> run a test on uwp platform, using a connected REQ socket on uwp side and a
> bound REP on a server side ?
>
> Thanks
>
> Bruno
>
> On Thu, Feb 23, 2017 at 11:08 AM, Doron Somech  wrote:
>
> Zeromq internally use socket (for signaling) and binds it (at least on
> windows). Zyre also requires bind, as you already figure out.
> Bottom line I don't think you can use zyre or zeromq on UWP, or at least
> until bind is supported on UWP.
>
>
> On Thu, Feb 23, 2017 at 10:59 AM, brunobodin . 
> wrote:
>
> Hi,
>
> I would like to leverage zyre in my application, but some nodes of the
> application will have to run on uwp platform :-( (not my choice)
>
> From my first tests I am able to build and run zmq, and czmq on uwp
> plaform, using slighly modified
> dll, see  https://github.com/bbdb68/czmq/tree/uwp and
> https://github.com/bbdb68/libzmq/tree/uwp,
> but it seems (even if winsock is said to run on uwp platform...) that I
> cannot bind sockets.
> Zyre builds nicely on uwp.
>
> For now this is not an issue in my design, since only the client nodes are
> supposed to run on the uwp node.
>
> Regarding zyre, I made some experimentation and :
> * discovery step can work thanks to the gossip mode. UDP mode fails
> * but communication fails, most probably because the node's router socket
> cannot bind.
>
> So my question is : do you think it is possible to design a "limited" zyre
> node that could run on such a platform, without performing any bind, while
> connecting to an existing network of zyre nodes ?
>
> I suppose this would require some kind of proxy node that would be bound
> and used as a intermediate between the "limited" nodes and the regular
> node, at least for socket setup.
>
> Any ideas ?
>
> Regards
>
> Bruno
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] How to get transactions from bitcoind?

2017-01-16 Thread Osiris Pedroso
Hi Andy,

1) Wild guess here for the first one. Instead of
std::vector msg_parts;
try
std::vector msg_parts;

This will work if the encoding of the message being received is UNICODE as
opposed to ASCII encoding.

2) The zmq_getsockopt API
indicates ZMQ_RCVMORE is an integer property,
so, instead of
char optbuf[256];
size_t optlen;
try
int optbuf = 0
size_t optlen = sizeof(optbuf);
and in the loop:
replace
} while (optlen==0);
with this
} while (optbuf == 1);

Osiris

On Mon, Jan 16, 2017 at 8:00 AM Andy  wrote:

> Progress. I am using this C library instead C++ wrapper and is:
> https://gist.github.com/borneq/cb5f3fc89f851a93be271d3a886153e4
>
> But I have notes:
> 1. there are odd chars like:
> hashtx
> F��d� .��:�i6��"]s�|�5#� �
>
> rawtx .��:�i6��"]s�|�5#� �
>
> hashtx
> 0% ���m�M
> lUˠUy�u F o��v��Ӝ��x�� �
> rawtxUy�u F o��v��Ӝ��x�� �
>
> whereas hashtx,rawtx are correct but data no.
> 2.zmq_getsockopt(socket, ZMQ_RCVMORE, optbuf, );
> optlen always = 0
> 3.For Windows zmq_recv is blocked, moreover, Python program is also
> blocked.
>
>
>
>
> 2017-01-13 16:48 GMT+01:00 Andy :
>
> I write gist:
> https://gist.github.com/borneq/b72ecf68ea489d0a457041af2fd12a60
> but still do nothing after
>
> bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://
> 127.0.0.1:28332 &
>
> whereas python zmq_sub.py does
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq

2016-12-03 Thread Osiris Pedroso
I meant quick stab at zdump.h...

On Sat, Dec 3, 2016 at 7:18 PM Osiris Pedroso <opedr...@gmail.com> wrote:

> Quick stack at zdump.h included
>
>
> On Sat, Dec 3, 2016 at 7:04 PM Osiris Pedroso <opedr...@gmail.com> wrote:
>
> I thought some more about this and I think I would like to implement this
> functionality as an actor named zdump.
>
> Implementing it as an actor would allow any programs that use CZMQ actors
> to add the ability to save minidumps on exceptions, and they would only be
> active if the developer intended and created an instance of zdump in the
> process.
>
> So while instantiated, it would hook itself as a the handler of last
> resort in the C Run Time library.
> When this actor's instance is destroyed it removes itself, therefore no
> more minidumps would be created.
> The messages that this actor would accept would be:
> "ENABLE" "DEFAULT", specific exception code (e.g. 0xc005 is access
> violation, 0x80004005 is access denied,...)
> "DISABLE" "DEFAULT", specific exception code
> "WHERE" "root-dir-where-to-save-dumps\", default "%TEMP%"
> "ROOTNAME" "DUMP", default current's executable rootname
>
> DEFAULT could be a name for access violation exception code, since this is
> the most common and important exception that ones wants to know is
> happening in their programs. Depending how the program is written, it could
> be swallowed silently by implementation. Creating the minidumps would let
> the developer/user know that is taking place, plus save a the exact context
> where it happened.
>
> Multiple instances can be created, since handler of last resort can be
> chained (defining one returns the function pointer to the previous one).
>
> I don't know if it should be part of CZMQ or just an object out there that
> people could use.
> Obviously as part of CZMQ many more people would know about it and use it.
> But writing those XML files to generate interface and code are
> complicated...
>
> Toughts?
>
>
> On Thu, Nov 24, 2016 at 5:37 AM Luca Boccassi <luca.bocca...@gmail.com>
> wrote:
>
> Hi,
>
> I have done something along those lines a while back for *nix. If
> libunwind is available at build time then this code will print a
> gdb-style backtrace on abort:
>
> https://github.com/zeromq/libzmq/blob/master/src/err.cpp#L391
>
> Need to be careful with core dumps and backtraces as they might expose
> private data about proprietary applications, so it should be opt-in to
> avoid nasty surprises for enterprise users and the like.
>
> But I don't see any problem in principle, as long as it's a
> well-documented opt-in.
>
> On Thu, 2016-11-24 at 08:40 +, Auer, Jens wrote:
> > Hi,
> >
> > Thinking about it, I may change my mind. It may be interesting to be
> able to generate a core dump (mini dump) in the zmq_assert statements if it
> can be switched on or off, e.g. by a define or even context property. I
> think this would help finding issues in ZeroMQ.
> >
> > Cheers,
> > Jens
> >
> > --
> > Dr. Jens Auer | CGI | Software Engineer
> > CGI Deutschland Ltd. & Co. KG
> > Rheinstraße 95 | 64295 Darmstadt | Germany
> > T: +49 6151 36860 154 <+49%206151%2036860154>
> > jens.a...@cgi.com<mailto:jens.a...@cgi.com>
> > Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie
> unter de.cgi.com/pflichtangaben<http://de.cgi.com/pflichtangaben>.
> >
> > CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging
> to CGI Group Inc. and its affiliates may be contained in this message. If
> you are not a recipient indicated or intended in this message (or
> responsible for delivery of this message to such person), or you think for
> any reason that this message may have been addressed to you in error, you
> may not use or copy or deliver this message to anyone else. In such case,
> you should destroy this message and are asked to notify the sender by reply
> e-mail.
> >
> > From: zeromq-dev [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf
> Of Auer, Jens
> > Sent: 23 November 2016 14:17
> > To: ZeroMQ development list
> > Subject: Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq
> >
> > Hi,
> >
> > I had a similar experience when I included crashrpt to a Windows
> application I was working on. It greatly increases the ability to fix bugs,
> discuss priorities and fight the “the software is getting worse with every
> release” flames from other people.
> >
> > However, I don’t think this should be included in ZeroMQ. ZeroMQ is 

Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq

2016-12-03 Thread Osiris Pedroso
Quick stack at zdump.h included

On Sat, Dec 3, 2016 at 7:04 PM Osiris Pedroso <opedr...@gmail.com> wrote:

> I thought some more about this and I think I would like to implement this
> functionality as an actor named zdump.
>
> Implementing it as an actor would allow any programs that use CZMQ actors
> to add the ability to save minidumps on exceptions, and they would only be
> active if the developer intended and created an instance of zdump in the
> process.
>
> So while instantiated, it would hook itself as a the handler of last
> resort in the C Run Time library.
> When this actor's instance is destroyed it removes itself, therefore no
> more minidumps would be created.
> The messages that this actor would accept would be:
> "ENABLE" "DEFAULT", specific exception code (e.g. 0xc005 is access
> violation, 0x80004005 is access denied,...)
> "DISABLE" "DEFAULT", specific exception code
> "WHERE" "root-dir-where-to-save-dumps\", default "%TEMP%"
> "ROOTNAME" "DUMP", default current's executable rootname
>
> DEFAULT could be a name for access violation exception code, since this is
> the most common and important exception that ones wants to know is
> happening in their programs. Depending how the program is written, it could
> be swallowed silently by implementation. Creating the minidumps would let
> the developer/user know that is taking place, plus save a the exact context
> where it happened.
>
> Multiple instances can be created, since handler of last resort can be
> chained (defining one returns the function pointer to the previous one).
>
> I don't know if it should be part of CZMQ or just an object out there that
> people could use.
> Obviously as part of CZMQ many more people would know about it and use it.
> But writing those XML files to generate interface and code are
> complicated...
>
> Toughts?
>
>
> On Thu, Nov 24, 2016 at 5:37 AM Luca Boccassi <luca.bocca...@gmail.com>
> wrote:
>
> Hi,
>
> I have done something along those lines a while back for *nix. If
> libunwind is available at build time then this code will print a
> gdb-style backtrace on abort:
>
> https://github.com/zeromq/libzmq/blob/master/src/err.cpp#L391
>
> Need to be careful with core dumps and backtraces as they might expose
> private data about proprietary applications, so it should be opt-in to
> avoid nasty surprises for enterprise users and the like.
>
> But I don't see any problem in principle, as long as it's a
> well-documented opt-in.
>
> On Thu, 2016-11-24 at 08:40 +, Auer, Jens wrote:
> > Hi,
> >
> > Thinking about it, I may change my mind. It may be interesting to be
> able to generate a core dump (mini dump) in the zmq_assert statements if it
> can be switched on or off, e.g. by a define or even context property. I
> think this would help finding issues in ZeroMQ.
> >
> > Cheers,
> > Jens
> >
> > --
> > Dr. Jens Auer | CGI | Software Engineer
> > CGI Deutschland Ltd. & Co. KG
> > Rheinstraße 95 | 64295 Darmstadt | Germany
> > T: +49 6151 36860 154 <+49%206151%2036860154>
> > jens.a...@cgi.com<mailto:jens.a...@cgi.com>
> > Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie
> unter de.cgi.com/pflichtangaben<http://de.cgi.com/pflichtangaben>.
> >
> > CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging
> to CGI Group Inc. and its affiliates may be contained in this message. If
> you are not a recipient indicated or intended in this message (or
> responsible for delivery of this message to such person), or you think for
> any reason that this message may have been addressed to you in error, you
> may not use or copy or deliver this message to anyone else. In such case,
> you should destroy this message and are asked to notify the sender by reply
> e-mail.
> >
> > From: zeromq-dev [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf
> Of Auer, Jens
> > Sent: 23 November 2016 14:17
> > To: ZeroMQ development list
> > Subject: Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq
> >
> > Hi,
> >
> > I had a similar experience when I included crashrpt to a Windows
> application I was working on. It greatly increases the ability to fix bugs,
> discuss priorities and fight the “the software is getting worse with every
> release” flames from other people.
> >
> > However, I don’t think this should be included in ZeroMQ. ZeroMQ is a
> library that application developer use, and the same developer must decide
> if a crash reporter should be used or not.
> >
> 

Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq

2016-12-03 Thread Osiris Pedroso
om>
> > Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie
> unter de.cgi.com/pflichtangaben<http://de.cgi.com/pflichtangaben>.
> >
> > CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging
> to CGI Group Inc. and its affiliates may be contained in this message. If
> you are not a recipient indicated or intended in this message (or
> responsible for delivery of this message to such person), or you think for
> any reason that this message may have been addressed to you in error, you
> may not use or copy or deliver this message to anyone else. In such case,
> you should destroy this message and are asked to notify the sender by reply
> e-mail.
> >
> > From: zeromq-dev [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf
> Of Osiris Pedroso
> > Sent: 23 November 2016 11:39
> > To: zeromq-dev@lists.zeromq.org<mailto:zeromq-dev@lists.zeromq.org>
> > Subject: Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq
> >
> > I know how to generate minidumps in Windows and create a small (~20Kb)
> file that would have a snapshot of the stack and lots of other goodies.
> > To access it, one opens the generated .DMP file with "WinDBG.exe -k
> minidump.dmp", enter the command ".ecxr" then "kvn" to see stack at the
> failure point in time.
> > If PDB symbol files for the correct version of the DLLs being used are
> available at their build locations, the "kvn" command will even tell you
> the source file and line number where the exception happened and you will
> be able to see local variable values for the functions on the stack by
> typing "dv" in WinDBG for each stack frame.
> >
> > Obviously this is Windows only functionality.
> >
> > Earlier in the year I made a contribution to documentation of ZeroMQ
> using a .DOC file and I felt shunned by the community when my PR was denied
> because it used a Windows document format.
> > I even offered to format the same file as PDF, because the important
> thing was the information it contained, not the format, to no avail.
> > At the time, (and even now) it felt to me like a betrayal of the C4
> tenets, but lets not get into religious wars here.
> >
> > I can tell you that in my professional work, I have brought down my
> company's main product from 10 crashes/DAY/user to 0.5 crashes/MONTH/user
> by iterating on generating these minidumps, asking the users to send them
> in, analyzing them and fixing the problems they brought to our attention,
> so this is proven technology.
> >
> > If the community feels that this is a good idea (add a Windows specific
> code to generate minidumps when exceptions happen), I would love to invest
> the time to this effort.
> >
> >
> > On Mon, Nov 14, 2016 at 1:30 PM Aaron Friesen <afrie...@spirae.com
> <mailto:afrie...@spirae.com>> wrote:
> > All,
> >
> > Getting an SEHException 0x80004005 from ZeroMQ (4.1.0.21) / libzmq
> (4.1.5.0)
> >
> > Multiple processes went down with the same exception at the same time.
> >
> > Was not able to get a dump but the application logs showed the following
> stack trace:
> >
> > System.Exception System.Runtime.InteropServices.SEHException
> (0x80004005): External component has thrown an exception.
> > at ZeroMQ.lib.zmq.zmq_msg_send(IntPtr msg, IntPtr socket, Int32 flags)
> > at ZeroMQ.ZSocket.SendFrame(ZFrame frame, ZSocketFlags flags, ZError&
> error)
> > at ZeroMQ.ZSocket.SendFrames(IEnumerable`1 frames, Int32& sent,
> ZSocketFlags flags, ZError& error)
> > at ZeroMQ.ZSocket.SendFrames(IEnumerable`1 frames, ZSocketFlags flags,
> ZError& error)
> > at ZeroMQ.ZSocket.SendMessage(ZMessage msg, ZSocketFlags flags, ZError&
> error)
> > at ZeroMQ.ZSocket.SendMessage(ZMessage msg, ZSocketFlags flags)
> > at ZeroMQ.ZSocket.SendMessage(ZMessage msg)
> > at xx.SocketsThread(Object eventWaitHandle)
> >
> > No line numbers available, but based on the logged message, it would
> have occurred in the following code.  Because the stack trace does not
> include any of the calls within the try block (PollIn, ProcessRequest,
> ProcessSubscription), I am at a loss as to what exactly was executing at
> the time of the exception that was calling SendMessage.
> >
> > Does anyone have any ideas as to what I might be doing wrong, or what
> the problem might be and how to avoid it?
> >
> >
> >
> > ZSocket[] sockets = new ZSocket[] { _requestSocket,
> _subscriberSocket };
> > ZPollItem[] pollItems = new ZPollItem[]

[zeromq-dev] Happy Pieter Hintjens Day

2016-12-03 Thread Osiris Pedroso
Today is the birthday of Pieter Hintjens
 (3 December 1962 – 4
October 2016). After Pieter's death earlier this year I decided I will
commemorate his birthday every year going forward, keeping his memory alive.

I just started reading today his unfinished Scalable-C
 book and I am
loving it. It answers so many of my questions on the first two months since
I found ZeroMQ on how to participate in the process.

In your conversations with Pieter, has anybody made notes of the scope that
he intended for this book? It would be great for us as a community to
complete his work. I am willing to help, but I would need some guidance on
the scope, if that is known.

Anyways, just wanted to wish you all a Happy Pieter Hintjens Day. I am
drinking a Belgium beer in his honor today.

To Pieter!

PS: If there is internet access where he is, I am sure he got a smile on
his face right now.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] ZMQ 4.2.0 stack overflow on Windows

2016-11-30 Thread Osiris Pedroso
You can enable Stop on All Exceptions on Dev2012 and run your process.
As soon as an exception happens, it will stop on that instructions and you
will be able to see the stack and environment variables for all frames,
which may help you find out what is wrong.

If you install the WinDBG debugger ("Debugging Tools For Windows"
),
there is a tool called ADPLUS that can be used to script a debugging
session that attaches to your process and generate minidumps of the
exceptions it encounters (includes crash dumps). This is useful if you will
send the minidump to somebody else to analyze for you. With it comes a
adplus.doc file that explains how to use the tool.

One would need the same WinDBG and open it with these commands:
CMD> windbg.exe -k minidump.dmp
windbg>.ecxr
windbg>kvn
windbg>dv
windbg>.frame 1
windbg>dv
windbg>.frame 2
windbg>dv
winsbg>q

These commands above would:
.ecxr - search in the saved minidump for the stack where the exception was
recorded.
kvn - show the stack at that time of the exception starting with a stack
frame number for each line
dv - show the local (stack) variables for the current frame
.frame n - changes the frame to nth line
q - quit the (minidump) debugging session
qd - if you ever debugging a live process that should not be killed when
the WinDBG exists, use qd to "detach and quit"

On Wed, Nov 30, 2016 at 1:37 PM Robin Scher  wrote:

> For testing purposes, no I am creating the context, creating the socket
> and binding the socket from a single thread (the main thread). There are
> other threads in my process, but none that interact with the ZeroMQ
> objects. I have not build a minimal sample to reproduce yet. Once this is
> resolved, my original code does pass the socket between threads, using a
> mutex to ensure that it is only accessed from a single thread, but I am not
> using that at the moment for testing.
>
> The crash happens just after the main thread calls zmq_bind. There are no
> other uses of the socket object, for testing purposes, once it gets bound,
> the main thread just goes into an infinite loop that does nothing at all.
> No other thread is using any part of zmq for any purpose, and no other
> process is running that is trying to connect to this open socket or send
> any data to it.
>
> Thanks for any other help anyone can provide.
> -robin
>
> Robin Scher  |  +1 (213) 448-0443 <(213)%20448-0443>  |
> ro...@uberware.net  |  www.uberware.net
>
> -Original Message-
> From: zeromq-dev [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf
> Of Luca Boccassi
> Sent: Wednesday, November 30, 2016 3:42 AM
> To: ZeroMQ development list 
> Subject: Re: [zeromq-dev] ZMQ 4.2.0 stack overflow on Windows
>
> When you refer to main thread, are you by any chance creating a socket in
> a thread and using it from another?
>
> On Tue, 2016-11-29 at 13:54 -0800, Robin Scher wrote:
> > I am trying to update from 4.1.x to 4.2.0 for my project, and when I
> > run it linked to the 4.2.0 library, I get a stack overflow in a ZeroMQ
> > background thread when I bind a socket:
> >
> >
> >
> > MyProgram.exe!__chkstk() Line 117
> >
> > MyProgram.exe!std::map > short,zmq::select_t::family_entry_t,std::less > short>,std::allocator ,zmq::select_t::family_entry_t> > >::operator[](const unsigned short &
> > _Keyval) Line 191
> >
> > MyProgram.exe!zmq::select_t::add_fd(unsigned __int64 fd_,
> > zmq::i_poll_events
> > * events_) Line 77
> >
> > MyProgram.exe!zmq::socket_base_t::start_reaping(zmq::select_t *
> > poller_) Line 1312
> >
> > MyProgram.exe!zmq::reaper_t::process_reap(zmq::socket_base_t *
> > socket_) Line
> > 128
> >
> > MyProgram.exe!zmq::object_t::process_command(zmq::command_t & cmd_)
> > Line 135
> >
> > MyProgram.exe!zmq::reaper_t::in_event() Line 98
> >
> > MyProgram.exe!zmq::select_t::loop() Line 318
> >
> > MyProgram.exe!zmq::select_t::worker_routine(void * arg_) Line 393
> >
> > MyProgram.exe!thread_routine(void * arg_) Line 47
> >
> > msvcr110d.dll!_callthreadstartex() Line 354
> >
> > msvcr110d.dll!_threadstartex(void * ptd) Line 337
> >
> > kernel32.dll!7ffd243013d2()   Unknown
> >
> > ntdll.dll!7ffd246054e4()   Unknown
> >
> >
> >
> > The executable has done nothing but create the context, create the
> > socket, set a few socket options, and then calls zmq_bind on it. The
> > issue does not happen in the main thread, and the main thread does not
> > report any errors or have any faults. No other client is running on
> > this or any networked machine that is trying to connect to the process
> yet.
> >
> >
> >
> > I am using MSVC 2012. Stack size is at the default.
> >
> >
> >
> > Any ideas of where I can look to resolve this? I would like to use the
> > current version of the library, if possible. Thank you,
> >
> > -robin
> >
> >
> >
> > Robin Scher  |  +1 (213) 448-0443 <(213)%20448-0443>  |  

Re: [zeromq-dev] SEHException 0x80004005 from ZeroMQ/libzmq

2016-11-23 Thread Osiris Pedroso
I know how to generate minidumps in Windows and create a small (~20Kb) file
that would have a snapshot of the stack and lots of other goodies.
To access it, one opens the generated .DMP file with "WinDBG.exe -k
minidump.dmp", enter the command ".ecxr" then "kvn" to see stack at the
failure point in time.
If PDB symbol files for the correct version of the DLLs being used are
available at their build locations, the "kvn" command will even tell you
the source file and line number where the exception happened and you will
be able to see local variable values for the functions on the stack by
typing "dv" in WinDBG for each stack frame.

Obviously this is Windows only functionality.

Earlier in the year I made a contribution to documentation of ZeroMQ using
a .DOC file and I felt shunned by the community when my PR was denied
because it used a Windows document format.
I even offered to format the same file as PDF, because the important thing
was the information it contained, not the format, to no avail.
At the time, (and even now) it felt to me like a betrayal of the C4 tenets,
but lets not get into religious wars here.

I can tell you that in my professional work, I have brought down my
company's main product from 10 crashes/DAY/user to 0.5 crashes/MONTH/user
by iterating on generating these minidumps, asking the users to send them
in, analyzing them and fixing the problems they brought to our attention,
so this is proven technology.

If the community feels that this is a good idea (add a Windows specific
code to generate minidumps when exceptions happen), I would love to invest
the time to this effort.


On Mon, Nov 14, 2016 at 1:30 PM Aaron Friesen  wrote:

> All,
>
>
>
> Getting an SEHException 0x80004005 from ZeroMQ (4.1.0.21) / libzmq
> (4.1.5.0)
>
>
>
> Multiple processes went down with the same exception at the same time.
>
>
>
> Was not able to get a dump but the application logs showed the following
> stack trace:
>
>
>
> System.Exception System.Runtime.InteropServices.SEHException (0x80004005):
> External component has thrown an exception.
>
> at ZeroMQ.lib.zmq.zmq_msg_send(IntPtr msg, IntPtr socket, Int32 flags)
>
> at ZeroMQ.ZSocket.SendFrame(ZFrame frame, ZSocketFlags flags, ZError&
> error)
>
> at ZeroMQ.ZSocket.SendFrames(IEnumerable`1 frames, Int32& sent,
> ZSocketFlags flags, ZError& error)
>
> at ZeroMQ.ZSocket.SendFrames(IEnumerable`1 frames, ZSocketFlags flags,
> ZError& error)
>
> at ZeroMQ.ZSocket.SendMessage(ZMessage msg, ZSocketFlags flags, ZError&
> error)
>
> at ZeroMQ.ZSocket.SendMessage(ZMessage msg, ZSocketFlags flags)
>
> at ZeroMQ.ZSocket.SendMessage(ZMessage msg)
>
> at xx.SocketsThread(Object eventWaitHandle)
>
>
>
> No line numbers available, but based on the logged message, it would have
> occurred in the following code.  Because the stack trace does not include
> any of the calls within the try block (PollIn, ProcessRequest,
> ProcessSubscription), I am at a loss as to what exactly was executing at
> the time of the exception that was calling SendMessage.
>
>
>
> Does anyone have any ideas as to what I might be doing wrong, or what the
> problem might be and how to avoid it?
>
>
>
>
>
>
>
> ZSocket[] sockets = new ZSocket[] { _requestSocket,
> _subscriberSocket };
>
> ZPollItem[] pollItems = new ZPollItem[] { 
> ZPollItem.CreateReceiver(),
> ZPollItem.CreateReceiver() };
>
> ZMessage[] messages = null;
>
>
>
> try
>
> {
>
> TimeSpan timeout = TimeSpan.FromMilliseconds(100);
>
>
>
> while (_run)
>
> {
>
> if (ZPollItems.PollIn(sockets, pollItems, out
> messages, out error, timeout))
>
> {
>
> if (error == ZError.EAGAIN)
>
> continue;
>
>
>
> if (error == ZError.ETERM)
>
> break;
>
>
>
> if (messages == null)
>
> continue;
>
>
>
> if (messages[0] != null)// Request
>
> ProcessRequest(messages[0]);
>
>
>
> if (messages[1] != null)// Subscription
>
> ProcessSubscription(messages[1]);
>
> }
>
> else
>
> {
>
> if (error == ZError.EAGAIN)
>
> continue;
>
>
>
> if (error != ZError.None)
>
> break;
>
> }
>
> }
>
> }
>
> catch (Exception ex)
>
> {
>
> if (!(ex is ThreadAbortException))
>
> {
>
> 

Re: [zeromq-dev] malloc() memory corruption at zsock_new_req

2016-11-17 Thread Osiris Pedroso
You are most likely corrupting the heap a couple of lines back in this code:
char *endpoint = (char*) malloc(sizeof(30));
sprintf(endpoint, "tcp://%s:%d", c_address, port);

The sprintf() function returns how many characters it wrote tot the buffer.
Make sure it is returning less than 29 otherwise you corrupted the next
block of memory that follows in the heap.

In Windows, the sprintf() function has been deprecated for a _sprintf_s()
version, which takes as second argument the size of the buffer, such that
is always returns a valid, NULL terminated string even if the format would
have it overwrite the buffer. In this case, it would be truncated to
maximum size possible.

Check if there is another sprintf() in the C runtime you are using and
prefer it instead.

On Thu, Nov 17, 2016 at 12:53 AM Bachmair Florian - flexSolution GmbH <
florian.bachm...@flexsolution.eu> wrote:

> Hi. I'm using czmq via a jni wrapper, and when I execute this method(See
> methode at the bottom of this message), the application crashes at the RED
> Codeline with
>
> Any Ideas why this happens?
>
> *** Error in `java': malloc(): memory corruption: 0x64e01218 ***
> === Backtrace: =
> /usr/lib/libc.so.6(+0x65180)[0x76e36180]
> /usr/lib/libc.so.6(+0x6bc3c)[0x76e3cc3c]
> /usr/lib/libc.so.6(+0x6df90)[0x76e3ef90]
> /usr/lib/libc.so.6(__libc_calloc+0xd4)[0x76e41cd8]
> === Memory map: 
> 8000-9000 r-xp  fd:00 58702  /opt/jdk1.8.0_111/bin/java
> 0001-00011000 rw-p  fd:00 58702  /opt/jdk1.8.0_111/bin/java
> 01735000-01756000 rw-p  00:00 0  [heap]
> 61a43000-61a46000 ---p  00:00 0
> 61a46000-61a93000 rw-p  00:00 0
> 61a93000-61a96000 ---p  00:00 0
> 61a96000-61ae3000 rw-p  00:00 0
> 61ae3000-61ae4000 ---p  00:00 0
> 61ae4000-622e3000 rw-p  00:00 0
> 622e3000-622e4000 ---p  00:00 0
> 622e4000-62ae3000 rw-p  00:00 0
> 62ae3000-62ae4000 ---p  00:00 0
> 62ae4000-632e3000 rw-p  00:00 0
> 632e3000-632e4000 ---p  00:00 0
> 632e4000-63ae3000 rw-p  00:00 0
> 63ae3000-63c14000 r-xp  fd:00 11181
> /usr/lib/libstdc++.so.6.0.22
> 63c14000-63c23000 ---p 00131000 fd:00 11181
> /usr/lib/libstdc++.so.6.0.22
> 63c23000-63c28000 r--p 0013 fd:00 11181
> /usr/lib/libstdc++.so.6.0.22
> 63c28000-63c2a000 rw-p 00135000 fd:00 11181
> /usr/lib/libstdc++.so.6.0.22
> 63c2a000-63c2c000 rw-p  00:00 0
> 63c2c000-63c75000 r-xp  fd:00 7
> /usr/lib/libpgm-5.2.so.0.0.122
> 63c75000-63c84000 ---p 00049000 fd:00 7
> /usr/lib/libpgm-5.2.so.0.0.122
> 63c84000-63c85000 r--p 00048000 fd:00 7
> /usr/lib/libpgm-5.2.so.0.0.122
> 63c85000-63c86000 rw-p 00049000 fd:00 7
> /usr/lib/libpgm-5.2.so.0.0.122
> 63c86000-63c8a000 rw-p  00:00 0
> 63c8a000-63d2 r-xp  fd:00 26440
> /usr/local/lib/libczmq.so.3.0.0
> 63d2-63d3 ---p 00096000 fd:00 26440
> /usr/local/lib/libczmq.so.3.0.0
> 63d3-63d32000 rw-p 00096000 fd:00 26440
> /usr/local/lib/libczmq.so.3.0.0
> 63d32000-63d8c000 r-xp  fd:00 11166
> /usr/lib/libsodium.so.18.1.1
> 63d8c000-63d9b000 ---p 0005a000 fd:00 11166
> /usr/lib/libsodium.so.18.1.1
> 63d9b000-63d9c000 r--p 00059000 fd:00 11166
> /usr/lib/libsodium.so.18.1.1
> 63d9c000-63d9d000 rw-p 0005a000 fd:00 11166
> /usr/lib/libsodium.so.18.1.1
> 63d9d000-63ded000 r-xp  fd:00 11283  /usr/lib/libzmq.so.5.0.1
> 63ded000-63dfd000 ---p 0005 fd:00 11283  /usr/lib/libzmq.so.5.0.1
> 63dfd000-63dff000 r--p 0005 fd:00 11283  /usr/lib/libzmq.so.5.0.1
> 63dff000-63e0 rw-p 00052000 fd:00 11283  /usr/lib/libzmq.so.5.0.1
> 63e0-63ea rw-p  00:00 0
> 63ea-63f0 ---p  00:00 0
> 63f0-63f3f000 rw-p  00:00 0
> 63f3f000-6400 ---p  00:00 0
> 6400-6410 rw-p  00:00 0
> 6410-6420 rw-p  00:00 0
> 6420-642de000 rw-p  00:00 0
> 642de000-6430 ---p  00:00 0
> 6433c000-643cc000 r-xp  00:20 14253  /tmp/
> sqlite-3.7.151-arm-libsqlitejdbc.so
> 643cc000-643ce000 rw-p 0009 00:20 14253  /tmp/
> sqlite-3.7.151-arm-libsqlitejdbc.so
> 643ce000-643cf000 rw-p  00:00 0
> 643cf000-643dd000 r-xp  fd:00 58921
> /opt/jdk1.8.0_111/jre/lib/arm/libnio.so
> 643dd000-643e4000 ---p e000 fd:00 58921
> /opt/jdk1.8.0_111/jre/lib/arm/libnio.so
> 643e4000-643e5000 rw-p d000 fd:00 58921
> /opt/jdk1.8.0_111/jre/lib/arm/libnio.so
> 643e5000-6440 r--s 001d2000 fd:00 58856
> /opt/jdk1.8.0_111/jre/lib/ext/nashorn.jar
> 6440-6450 rw-p  00:00 0
> 6450-645fe000 rw-p  00:00 0
> 645fe000-6460 ---p  00:00 0
> 6460-6462c000 rw-p  00:00 0
> 6462c000-6470 ---p  00:00 0
> 6470a000-6470d000 r-xp  fd:00 10836  /usr/lib/libcap.so.2.25
> 6470d000-6471c000 ---p 3000 fd:00 10836  /usr/lib/libcap.so.2.25
> 6471c000-6471d000 rw-p 

Re: [zeromq-dev] ZeroMQ Architectural Patterns & Quality Attributes for Research

2016-10-18 Thread Osiris Pedroso
Hi Michael,

You should read the following document (it is a book really) that will have
answers to most of your questions above.
http://zguide.zeromq.org/page:all

After you invest that time, then it would make sense to ask
pointed/specific questions for items that were not clear from the link
above.

You may think this is too much investment, but believe me I learned so much
from reading it.
I believe it will also help you in your learning of software architectural
patterns and in your professional career if you do read it.

Cheers,
Osiris

On Tue, Oct 18, 2016 at 4:27 AM Michael Skeen  wrote:

> Hello ZeroMQ Community,
>
>
> I am part of an undergraduate research group focusing on software
> architecture patterns and quality attributes at Utah Valley University. We
> recently analyzed the work published on ZeroMQ in the Architecture of
> Open Source Applications  (AOSA) and
> referenced it in a paper we presented at the 13th Working IEEE/IFIP
> Conference on Software Architecture (WICSA), as attached.  As a part of our
> continuing research we wish to validate our architectural analysis for ZeroMQ
> with the current developers.
>
>
> We would like to know if we are missing any patterns or quality attributes
> that may have been included in ZeroMQ, or if there are any we listed that
> aren’t used. Any additional comment on these topics you might have would
> also, of course, be welcome.
>
>
> We believe we found the following software architectural patterns in this
> application:
>
>
> * Pattern Name | Is This Found in the Architecture? (yes / no / don't
> know) | Comments (optional)*
>
> Broker Event System Layers Peer to Peer Pipes & Filters Publish Subscribe
> State Based
>
> Other?
>
>
> We also identified the following quality attributes:
>
>
> * Attribute Name | Is This Found in the Architecture? | Comments
> (optional)*
>
> Scalability Usability Extensibility Performance Maintainability
>
> Other?
>
>
> For your convenience, we have a complete list below of the patterns and
> quality attributes we referred to when conducting our research. To clarify,
> we are specifically studying architectural patterns, rather than design
> patterns such as the GoF patterns.
>
>
> Architectural Patterns Considered
>
> Quality Attributes Considered
>
> Active Repository
>
> Scalability
>
> Batch
>
> Usability
>
> Blackboard
>
> Extensibility
>
> Broker
>
> Performance
>
> Client Server
>
> Portability
>
> Event System
>
> Flexibility
>
> Explicit Invocation
>
> Reliability
>
> Implicit Invocation
>
> Maintainability
>
> Indirection Layer
>
> Security
>
> Interceptor
>
> Testability
>
> Interpreter
>
> Capacity
>
> Layers
>
> Cost
>
> Master and Commander
>
> Legality
>
> Microkernel
>
> Modularity
>
> Model View Controller
>
> Robustness
>
> Peer to Peer
>
>
> Pipes and Filters
>
>
> Plugin
>
>
> Presentation Abstraction Control
>
>
> Publish Subscribe
>
>
> Reflection
>
>
> Rule-Based System
>
>
> Shared Repository
>
>
> Simple Repository
>
>
> State Based
>
>
> Virtual Machine
>
>
>
> Please respond by October 25th, if possible.
>
> Thank you for considering our request, and for your continued work on
> ZeroMQ.
>
>
> Sincerely,
>
>
> Michael Skeen, with
>
> Erich Gubler,
>
> Danielle Skinner,
>
> Brandon Leishman,
>
> Neil Harrison, Ph.D. (advisor)
>
>
> Reference: Neil B. Harrison, Erich Gubler, Danielle Skinner, "Software
> Architecture Pattern Morphology in Open-Source Systems",WICSA, 2016, 2016
> 13th Working IEEE/IFIP Conference on Software Architecture (WICSA), 2016
> 13th Working IEEE/IFIP Conference on Software Architecture (WICSA) 2016,
> pp. 91-98, doi:10.1109/WICSA.2016.8
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] BDFL literally

2016-10-05 Thread Osiris Pedroso
Could you please list them?
I would like to sponsor a few, but would like to check them out first.

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Oct 5, 2016, at 17:49, Ewen McNeill  wrote:
> 
>> On 20/04/16 6:16, Pieter Hintjens wrote:
>> So without further ado I'd like to hand the stage over to my dear
>> friend, Mr Did You Really Add UDP Support to Libzmq In One Day
>> Doron  dramatic pause... SOMECH!!
> 
> For the record, Doron and I have now transferred the ZeroMQ domains that were 
> previously owned by Pieter over to Doron (Doron already had administrative 
> control over them; this just changes the Registrant field as well).
> 
> Thanks to Doron for assisting with the transfer, and for paying the 
> US$7.50/domain transfer fee.
> 
> Pieter does have some other domains (mostly related to his books or 
> non-ZeroMQ related projects) which will expire over the next 12 months. For 
> some of these I am trying to finalise transfers of the domains to other 
> people (who I have emailed directly).  A few of these (mostly iMatix related 
> ones) will renew at least while there are still funds available in Pieter's 
> registrar account.  For the others it is likely they will just be allowed to 
> expire over the next 12 months.
> 
> If there is a domain name that you know that Pieter holds for which you would 
> like to see the project it is related to continue, feel free to get in touch. 
>  Where there's a clear community supported successor to look after the 
> domain/project I'm happy to help facilitate a transfer of the domain 
> ownership.
> 
> Alternatively the .org/.com/.net registry model does allow _anyone_ to pay 
> the renewal fee on a domain, even one that they don't own.  So if you don't 
> want to assume ownership of a domain, but do want to see it "stick round 
> longer", then paying the renewal for another year could be a good option.  
> This is probably most relevant to the domains related to Pieter's books.  
> (All Pieter's domains are at Gandi, who definitely allow payment by anyone 
> with a Gandi account for any domain at Gandi.)
> 
> Finally, thanks to the people who paid to renew:
> 
> restms.org
> imatix.com
> 
> over the last month (imatix.com now expires in 2021; and restms.org now 
> expires in 2020).
> 
> Ewen
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Question about context and/or socket creation

2016-10-04 Thread Osiris Pedroso
I tried to compile, but I don't have the zmq.hpp file it includes.
What github project to I need to get it?

On Tue, Oct 4, 2016 at 11:36 AM James Chapman  wrote:

> I suspect there is a bug within ZMQ, that or I'm doing something stupid.
> Actually, the latter is probably more likely as I'd like to think that this
> would have surfaced elsewhere if it was a bug. Attached is minimal test
> program which reproduces the issue on my system. In my test, ZMQ is
> statically linked to the test program. This is a Windows program compiled
> in Visual Studio 2015. Once running, after roughly 2 mins 40 seconds it
> crashes. There's an error message that says "abort() has been called".
>
> Could someone please confirm that they also see the crash, and if I am
> doing something stupid please feel free to tell me.
>
> James
>
>
>
>
>
> On 30 September 2016 at 11:49, James Chapman  wrote:
>
> Thanks, I'll move to a shared context that persists for the duration of
> the process.
>
> ​Sockets are one per thread, in fact, as the threads are re-used, each
> thread will create many sockets over its lifetime.​
>
> -​James​
>
>
>
> On 30 September 2016 at 11:24, Luca Boccassi 
> wrote:
>
> You can (and probably should as best practise) reuse the context,
> which is thread safe.
>
> Do not use the same socket from multiple threads. There is a new
> category of thread-safe sockets in libzmq master but the API is not
> yet finalised.
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Bye bye Pieter

2016-10-04 Thread Osiris Pedroso
Does anybody know Pieter's birth date?
I would like to set myself a reminder to commemorate his life
accomplishments on that date every year going forward...

Thanks

On Tue, Oct 4, 2016 at 11:11 AM Jacques Richer  wrote:

> I found him a kind and very special man. He will be missed.
>
>
> On October 4, 2016 9:09:57 AM MST, Arnaud Loonstra 
> wrote:
>
> On 2016-10-04 16:35, Godefroid Chapelle wrote:
>
>  On 04/10/16 16:29, Benjamin Henrion wrote:
>
>  Dear Pieter,
>
>  I wanted to say a last goodbye at noon at the hospital, but you told
>  me to come at 3pm.
>
>  Now that you are gone, I can't stop crying.
>
>  --
>  Benjamin Henrion 
>
>
>  Check http://stallmanism.wikidot.com/, it might make you smile !
>
>  --
>  Godefroid
>
>
> I've been amazed by his spirit especially in his last months. We've
> lost a very inspirational friend. My condolences to all!
>
> Rg,
>
> Arnaud
> --
>
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Bye bye Pieter

2016-10-04 Thread Osiris Pedroso
RIP Pieter.

On Tue, Oct 4, 2016 at 10:13 AM YANG Fan  wrote:

> RIP Pieter
>
> On Tue, Oct 4, 2016 at 10:35 PM Godefroid Chapelle 
> wrote:
>
> On 04/10/16 16:29, Benjamin Henrion wrote:
> > Dear Pieter,
> >
> > I wanted to say a last goodbye at noon at the hospital, but you told
> > me to come at 3pm.
> >
> > Now that you are gone, I can't stop crying.
> >
> > --
> > Benjamin Henrion 
>
> Check http://stallmanism.wikidot.com/, it might make you smile !
>
> --
> Godefroid
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> --
>
> --
> YANG Fan
> PhD Candidate, The Chinese University of Hong Kong
> (852) 59333775  |  http://www.husky-project.com
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] ZeroMQ Reliable Multicast just halts and never continues

2016-06-15 Thread Osiris Pedroso
Have you used Wireshark to see if that traffic is actually making to the
client box when your application stops receiving it?

That would prove if problem resides in your application or the network
itself.

On Wed, Jun 15, 2016 at 9:23 AM Paul Krauss 
wrote:

> Hi Folks – I am using 0MQ and CLRZMQ wrapper for C# on Windows 7.
>
> I have a client app running on a Windows box that receives reliable
> multicast from 6 different server processes.
>
> The server processes are all sending reliable multicast using 0MQ. Each
> server uses different ports and groups.
>
>
>
> About once a week, one of my clients will just stop receiving the reliable
> multicast from ALL sources and it will not receive data again until we
> restart the client app.
>
>
>
> I know the data is being sent from the servers correctly because all of my
> other clients receive all the data from the servers during the same
> time-frame.
>
>
>
> It’s very frustrating and I’m not sure what causes it or what to do.
>
> Any ideas, or thoughts?
>
> Thank you - Paul
> This e-mail message (together with any attached documents) is strictly
> confidential and intended solely for the addressee (including the
> addressee's employing organization, assigns and affiliates). It may contain
> information that is proprietary to Geneva Trading USA LLC, its affiliates
> and assigns. It is controlled by law, or is covered by legal, professional
> or other privilege. If you are not the intended addressee nor associated
> with the intended addressee’s organization, you must not use, disclose or
> copy this transmission, and are asked to notify the sender of its receipt.
> Please be further advised that the unauthorized interception or retrieval
> of e-mail may be a criminal violation of the Electronic Communications
> Privacy Act.
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Adding new tests to Malamute

2016-05-06 Thread Osiris Pedroso
Here is the code:
```
zmsg_t *mlm_client_content (mlm_client_t *self)
{
assert (self);
return self->content;
}
```
Can't add lots of printfs, at least not smart ones.

I thought it was an implicit contract that when an API says it returns a
pointer to type X, that the returned pointer points to a valid object of
type X.
I should be able to all methods on that class at least.

Here is the documentation for zmsg_is ():
```
//  Probe the supplied object, and report if it looks like a zmsg_t.
CZMQ_EXPORT bool zmsg_is (void *self);
```
If one calls zmsg_is() on the pointer returned by the API above, it returns
false.

This means that the returned zmsg_t* does not look like a zmsg.

Further looked into calling other methods on the zmsg_t* received:
```
//  Return size of message, i.e. number of frames (0 or more).
size_t zmsg_size (zmsg_t *self)
{
assert (self);
assert (zmsg_is (self));

return zlist_size (self->frames);
}
```
The check on zmsg_is () prevents calling any further methods.

I searched the whole zeromq for every place "content =" appears. They are
always zmsg_new(), zmsg_dup(), zmsg_recv(), mlm_client_recv(). I would
expect all of these returns to return true when calling zmsg_is().



On Thu, May 5, 2016 at 4:28 PM Kevin Sapper <kevinsappe...@gmail.com> wrote:

> I agree enabled verbose and add lots of printf statements. Expect that it
> will take you a day or two to understand.
> Am 05.05.2016 10:32 nachm. schrieb "Pieter Hintjens" <p...@imatix.com>:
>
>> The best way to understand what's going on is to look at the code for
>> mlm_client_content () and possibly debug by adding printfs as it runs.
>> This is really educational and will help you use Malamute better.
>>
>> Please do read & follow coding style on all patches, space before '('
>> and noNamesLikeThis.
>>
>> Cheers :)
>> Pieter
>>
>> On Thu, May 5, 2016 at 5:25 PM, Osiris Pedroso <opedr...@gmail.com>
>> wrote:
>> > I am in the process of adding a few new tests to malamute self tests,
>> > learning its API in the process.
>> >
>> > They will target specific portions of the APIs:
>> >
>> > mlm_stream_api_test  (single broadcaster, single listener)
>> > mlm_service_api_test  (single requester, single service provider)
>> > mlm_services_api_test(multiple requesters, multiple service
>> providers)
>> > mlm_mailbox_api_test
>> >
>> > I am midway through the services API (#3) test and encountered an
>> unexpected
>> > behavior (see last code line):
>> > ```
>> > // define that requesters will generate printJob events
>> > rc = mlm_client_set_producer(requester1, "printServiceStream");
>> > assert(rc == 0);
>> > rc = mlm_client_set_producer(requester2, "printServiceStream");
>> > assert(rc == 0);
>> > // define that workers will listen to printJob events related to
>> requests
>> > rc = mlm_client_set_consumer(worker1, "printServiceStream",
>> "request.*");
>> > assert(rc == 0);
>> > rc = mlm_client_set_consumer(worker2, "printServiceStream",
>> "request.*");
>> > assert(rc == 0);
>> >
>> > rc = mlm_client_sendx(requester1, "request", "start", NULL);
>> > assert(rc == 0);
>> >
>> > rc = mlm_client_recvx(worker1, , , NULL);
>> > assert(rc != -1);
>> >
>> > assert(mlm_client_status(worker1) == 0);
>> > assert(streq(mlm_client_command(worker1), "STREAM DELIVER"));
>> > assert(mlm_client_reason(worker1) == NULL);
>> > assert(streq(mlm_client_address(worker1), "printServiceStream"));
>> > assert(streq(mlm_client_sender(worker1), "requesterAddress1"));
>> > assert(streq(mlm_client_subject(worker1), "request"));
>> > assert(mlm_client_tracker(worker1) == NULL);
>> > zmsg_t *zmsg_content = mlm_client_content(worker1);
>> > assert(zmsg_content != NULL);
>> > int isZmsg = zmsg_is(zmsg_content);
>> > assert(isZmsg == 0); // don't understand why, but this is the return
>> value
>> > ```
>> >
>> > The problem is that the zmsg* returned by mlm_client_content() does not
>> seem
>> > like a valid zmsg* according to zmsg_is(). The tag value in the message
>> is
>> > 0xfeeefeee, but the expected value is 0x0003cafe
>> >
>> > Since it is a zmsg_t* returned by malamute itself , I expected it to be
>> a
>> > valid zmsg.
>> >
>> > Please advise.
>> >
>> >
>> > ___
>> > zeromq-dev mailing list
>> > zeromq-dev@lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] Adding new tests to Malamute

2016-05-05 Thread Osiris Pedroso
I am in the process of adding a few new tests to malamute self tests,
learning its API in the process.

They will target specific portions of the APIs:

   1. mlm_stream_api_test  (single broadcaster, single listener)
   2. mlm_service_api_test  (single requester, single service provider)
   3. mlm_services_api_test(multiple requesters, multiple service
   providers)
   4. mlm_mailbox_api_test

I am midway through the services API (#3) test and encountered an
unexpected behavior (see last code line):
```
// define that requesters will generate printJob events
rc = mlm_client_set_producer(requester1, "printServiceStream");
assert(rc == 0);
rc = mlm_client_set_producer(requester2, "printServiceStream");
assert(rc == 0);
// define that workers will listen to printJob events related to requests
rc = mlm_client_set_consumer(worker1, "printServiceStream", "request.*");
assert(rc == 0);
rc = mlm_client_set_consumer(worker2, "printServiceStream", "request.*");
assert(rc == 0);

rc = mlm_client_sendx(requester1, "request", "start", NULL);
assert(rc == 0);

rc = mlm_client_recvx(worker1, , , NULL);
assert(rc != -1);

assert(mlm_client_status(worker1) == 0);
assert(streq(mlm_client_command(worker1), "STREAM DELIVER"));
assert(mlm_client_reason(worker1) == NULL);
assert(streq(mlm_client_address(worker1), "printServiceStream"));
assert(streq(mlm_client_sender(worker1), "requesterAddress1"));
assert(streq(mlm_client_subject(worker1), "request"));
assert(mlm_client_tracker(worker1) == NULL);
zmsg_t *zmsg_content = mlm_client_content(worker1);
assert(zmsg_content != NULL);
int isZmsg = zmsg_is(zmsg_content);
assert(isZmsg == 0); // don't understand why, but this is the return value
```

The problem is that the zmsg* returned by mlm_client_content() does not
seem like a valid zmsg* according to zmsg_is(). The tag value in the
message is 0xfeeefeee, but the expected value is 0x0003cafe

Since it is a zmsg_t* returned by malamute itself , I expected it to be a
valid zmsg.

Please advise.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] New version of C4 (C4.2?)

2016-05-05 Thread Osiris Pedroso
If you are reviewing RFC 42 and it is policy to not accept contributions in
certain file format, I believe it is time to put those in the RFC, so it is
clear to contributors what is not allowed.

Pieter, you yourself was quoted in an article as having impressed a person
when he suggested you should not accept PR unless a certain quality
threshold was achieved.
You answer, that so impressed that person, was that "Who am I to decide
what are the quality standards for this project?"

But if you have such a rule though, you are the person who defines which
file formats can and can not be added to the projects.

Which one of you, zeromq developers, on your daily workings do not open a
DOC, a PDF, or an XML file?
You do know all these file formats also have XML representations, right?
Are XML files allowed to be added to the projects?
They seem to be since, we have several already part of GSL, CZMQ, ZPROJECT,
ZYRE and MALAMUTE just to name a few.

If so, are we going to depend on the contents of XML files that can be
checked in?
So can I check in a Word document that was SavedAs XML format or not?

I propose you revise the RFC 42 and make it clear what kind of
contributions are allowed.

Otherwise you will get annoyed contributors that read the RFC, work for
hours on a submission and get slapped on the hand for doing what s/he
thought was a benefit for the community.


On Thu, May 5, 2016 at 1:57 AM Pieter Hintjens  wrote:

> OK, I'm going to answer my own (stupid) question.
>
> - RFC 22 will be deprecated
> - RFC 42 is the new version of C4 (revision 3)
> - I'll stop using the cute form "C4.1"
>
> So we can instead look at RFC42 and check that it's accurate.
>
> -Pieter
>
> On Thu, May 5, 2016 at 8:52 AM, Pieter Hintjens  wrote:
> > Hi all,
> >
> > I was writing a summary article on community building and revisited
> > the C4 RFC. There were many small things that were out of date,
> > speculative, or did not fit with our current best practice.
> >
> > So I've updated it here: https://github.com/zeromq/rfc/pull/83
> >
> > Please *do* read the diffs and let me know your opinions.
> >
> > I also would like advice on whether:
> >
> > * we make a new RFC (C4.2)
> > * we accept to change the existing stable RFC unilaterally
> >
> > Option 1 is more correct but means we have to update a lot of
> > projects. Option 2 is lazy and breaks our process.
> >
> > -Pieter
> >
> > -Pieter
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Can ZeroMQ be considered 'light-weight'?

2016-05-04 Thread Osiris Pedroso
I use ZeroMQ in Windows environment.

This past week I ran Memory Validator on zeromq and I was surprised with a
hot spot of memory allocation.
MV show that there is a 1Mb allocation happening over and over for every
message read.

This was done to fix https://github.com/zeromq/libzmq/issues/1608.

You can see the fix here:
https://github.com/zeromq/libzmq/blob/master/src/signaler.cpp#L515

So I guess  you will have to better define what you mean by light-weight
before one can decide it.


On Wed, May 4, 2016 at 6:10 AM Ale Strooisma 
wrote:

> Dear ZeroMQ community,
>
> I wonder if ZeroMQ, especially using the ipc protocol, can be considered
> light-weight, and how this can be motivated/proven.
>
> An important point is of course what defines light-weight. I could just
> run the performance tests, but that would just give me numbers of which I
> don't really know whether they are good.
>
> The reason I am asking this is that, when I started with ZeroMQ, I was
> under the assumption that this was true, but I can't really find anything
> to back it up. Which I could well use to motivate why I chose to use ZeroMQ.
>
> Kind regards,
>
> Ale Strooisma
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] Malamute Stream API users

2016-05-04 Thread Osiris Pedroso
Just to clarify, in the Malamute selftest, there is this code:
```
mlm_client_set_producer (writer1, "weather");
mlm_client_set_producer (writer2, "traffic");
mlm_client_set_consumer (reader1, "weather", "newyork");
mlm_client_set_consumer (reader1, "traffic", "newyork");
mlm_client_set_consumer (reader2, "weather", "newyork");
mlm_client_set_consumer (reader2, "traffic", "newyork");
```
I believe this means that a mlm_client can only be set to be a producer of
a single type, but an mlm_client can be a consumer of multiple types.

Please confirm. Following the code was not enough to find it out... :-(
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Malamute Users - Service Requests API

2016-05-03 Thread Osiris Pedroso
Either that or a heartbeat which would reset the timeout timer.

This would also require an API to confirm that a service request completed with 
success or failure status.

Only then the service request would be removed from requests queue.

If timeout is reached, the request would become active/visible again, and 
delivered to next available worker, since it would now be the oldest request 
still on the queue.

Standard message broker behavior, I tought.

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On May 3, 2016, at 12:11, Michal Vyskocil <michal.vysko...@gmail.com> wrote:
> 
> Hi,
> 
> By timeout you mean that client expects an answer for service request in $foo 
> seconds?
> 
> Dne 2. 5. 2016 1:15 PM napsal uživatel "Osiris Pedroso" <opedr...@gmail.com>:
>> Hi,
>> 
>> I am new to Malamute and wanted to exchange words with some other user of 
>> the Service Requests API in Malamute.
>> 
>> Malamute being a message broker, I expected to find some sort of timeout 
>> and/or retry logic for in-flight service requests, but from the API I don't 
>> think those exist.
>> I wonder how people use the Service Request API to accomplish that.
>> 
>> Thanks,
>> Osiris
>> 
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] Malamute Users - Service Requests API

2016-05-02 Thread Osiris Pedroso
Hi,

I am new to Malamute and wanted to exchange words with some other user of
the Service Requests API in Malamute.

Malamute being a message broker, I expected to find some sort of timeout
and/or retry logic for in-flight service requests, but from the API I don't
think those exist.
I wonder how people use the Service Request API to accomplish that.

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] Behavior question for Malamute self_test

2016-04-29 Thread Osiris Pedroso
I noticed that if I set a breakpoint in the line below marked "BP>", and do
single step execution of the asserts and zstr_free statements, the next
receive will fail and the test does not proceed beyond that point.

In malamute\src\mlm_client.c, mlm_client_test() has these code lines:
```
mlm_client_set_producer (writer, "weather");
mlm_client_set_consumer (reader, "weather", "temp.*");

mlm_client_sendx (writer, "temp.moscow", "1", NULL);
mlm_client_sendx (writer, "rain.moscow", "2", NULL);
mlm_client_sendx (writer, "temp.madrid", "3", NULL);
mlm_client_sendx (writer, "rain.madrid", "4", NULL);
mlm_client_sendx (writer, "temp.london", "5", NULL);
mlm_client_sendx (writer, "rain.london", "6", NULL);

char *subject, *content;
mlm_client_recvx (reader, , , NULL);
assert (streq (subject, "temp.moscow"));
assert (streq (content, "1"));
assert (streq (mlm_client_command (reader), "STREAM DELIVER"));
assert (streq (mlm_client_sender (reader), "writer"));
zstr_free ();
zstr_free ();

BP>mlm_client_recvx (reader, , , NULL);
assert (streq (subject, "temp.madrid"));
assert (streq (content, "3"));
assert (streq (mlm_client_command (reader), "STREAM DELIVER"));
assert (streq (mlm_client_subject (reader), "temp.madrid"));
assert (streq (mlm_client_sender (reader), "writer"));
zstr_free ();
zstr_free ();

// this next recvx never returns... have to ^C to stop the test run...
rc = mlm_client_recvx(reader, , , NULL);
assert(rc != -1);
assert(streq(subject, "temp.london"));
assert(streq(content, "5"));
```

When running the test with verbose and breakpoint enabled I see these
printouts that I do not see when running with no breakpoints.

```
D: 16-04-29 09:20:53   1251:mlm_client   : connected:
D: 16-04-29 09:20:53   1251:mlm_client   : connected:
D: 16-04-29 09:20:53   1251:mlm_client   : expired
D: 16-04-29 09:20:53   1251:mlm_client   : expired
D: 16-04-29 09:20:53   1251:mlm_client   : $
server has gone offline
D: 16-04-29 09:20:53   1251:mlm_client   : $
server has gone offline
D: 16-04-29 09:20:53   1251:mlm_client   : >
disconnected
D: 16-04-29 09:20:53   1251:mlm_client   : >
disconnected
D: 16-04-29 09:20:53   1251:mlm_client   : disconnected:
D: 16-04-29 09:20:53   1251:mlm_client   :
STREAM_DELIVER
D: 16-04-29 09:20:53   1251:mlm_client   : >
disconnected
```

Any ideas why stepping over seven source code lines (no matter how fast I
do it) would expire the server connection?
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Malamute selftest crashes on exit in Windows

2016-04-27 Thread Osiris Pedroso
It is actually a LIBZMQ issue: https://github.com/zeromq/libzmq/issues/1708

I was able to workaround it by adding fcloseall() prior to return from
main(), but don't know if that is the fix.

On Tue, Apr 26, 2016 at 7:00 PM Pieter Hintjens <p...@imatix.com> wrote:

> Sounds like a free() being used somewhere instead of a zstr_free().
>
> On Tue, Apr 26, 2016 at 10:17 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
> > Got latest zeromq (as of yesterday), built all in Windows using Dev2013.
> >
> > https://github.com/zeromq/malamute/issues/169
> >
> > Seems to only happen in those versions that use the LIBZMQ dll, not if
> > linked statically.
> >
> > ___
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] Malamute selftest crashes on exit in Windows

2016-04-26 Thread Osiris Pedroso
Got latest zeromq (as of yesterday), built all in Windows using Dev2013.

https://github.com/zeromq/malamute/issues/169

Seems to only happen in those versions that use the LIBZMQ dll, not if
linked statically.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] CZMQ code generation

2016-04-25 Thread Osiris Pedroso
Got it. Thanks!

On Mon, Apr 25, 2016 at 9:58 AM Kevin Sapper <kevinsappe...@gmail.com>
wrote:

> Both options have equal meaning.
>
> "-target:-" is used as input for zproject
>
> and
>
> "-topdir:.. -zproject:1" is equally used as input for one of zproto's
> scripts.
>
> 2016-04-25 16:53 GMT+02:00 Osiris Pedroso <opedr...@gmail.com>:
>
>> Thanks Kevin, very informative.
>>
>> On Q1, I believe you answered was "-target:-" means.
>>
>> What does the cmd line option "-zproject:1" mean on the line:
>> ```
>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q sockopts.xml
>> ```
>>
>>
>> On Mon, Apr 25, 2016 at 9:29 AM Kevin Sapper <kevinsappe...@gmail.com>
>> wrote:
>>
>>> Q1:
>>> With a minus in the gsl command you can set or override an attribute of
>>> project e.g. `project.topdir` or `project.target`.
>>>
>>> The snippet from Makemodule.am will re-generate all zproto models. As
>>> zproto does generate headers for its models which might conflict with an
>>> zproject api, zproject will be called with target "-" which means no
>>> target. Hence only the C api will be re-generated overriding unwanted
>>> zproto headers.
>>>
>>> Q2:
>>> No, `gsl project.xml` is the correct command. You'll use `make code` to
>>> refresh zproto models.
>>>
>>> Q3:
>>> No, changes are applied gradually downstream there is no pressure to do
>>> it right away. If there was a critical bug a mail to the mailing might be
>>> appropriate though.
>>>
>>>
>>> 2016-04-25 14:47 GMT+02:00 Osiris Pedroso <opedr...@gmail.com>:
>>>
>>>> Up till now, I thought that the following command was what regenerated
>>>> the code for CZMQ project (or any other project using GSL code generation
>>>> for that matter):
>>>> ```
>>>> root@OPLIN:~/git/czmq# gsl project.xml
>>>> ```
>>>>
>>>> But I came across the contents of CZMQ's Makemodule.am, which has this
>>>> rule in it (similar rule exist in ZYRE and MALAMUTE):
>>>> ```
>>>> # Produce generated code from models in the src directory
>>>> code:
>>>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q sockopts.xml
>>>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zgossip.xml
>>>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zgossip_msg.xml
>>>> cd $(srcdir); gsl -target:- project.xml
>>>> ```
>>>>
>>>> **Question #1**: What does the GSL command line options "-zproject:1"
>>>> and "-target:-" mean?
>>>> I looked in GSL's README.md and the information is not there. The word
>>>> "zproject" is nowhere in the gsl sources...
>>>> ```
>>>> Options currently recognised by GSL are:
>>>>
>>>> * -a   argument: Pass arguments following filename to GSL script
>>>> * -q   quiet:suppress routine messages
>>>> * -p   parallel: process files in parallel
>>>> * -s:n size:nset script cache size - default is 100
>>>> * -h   help: show command-line summary
>>>> * -v   version:  show full version information
>>>> ```
>>>> **Question#2**: So, if one wants to apply GSL & ZPROJECT latest
>>>> changes, is the correct approach to "make code" to get all modules
>>>> regenerated for each of these projects then?
>>>>
>>>> **Question #3**: If a contributor makes a change to a **.gsl** file, is
>>>> he expected to also regen all downstream projects affected by those changes
>>>> and PR them as well? What is the correct etiquette here?
>>>>
>>>>
>>>>
>>>> ___
>>>> zeromq-dev mailing list
>>>> zeromq-dev@lists.zeromq.org
>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] CZMQ code generation

2016-04-25 Thread Osiris Pedroso
Thanks Kevin, very informative.

On Q1, I believe you answered was "-target:-" means.

What does the cmd line option "-zproject:1" mean on the line:
```
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q sockopts.xml
```


On Mon, Apr 25, 2016 at 9:29 AM Kevin Sapper <kevinsappe...@gmail.com>
wrote:

> Q1:
> With a minus in the gsl command you can set or override an attribute of
> project e.g. `project.topdir` or `project.target`.
>
> The snippet from Makemodule.am will re-generate all zproto models. As
> zproto does generate headers for its models which might conflict with an
> zproject api, zproject will be called with target "-" which means no
> target. Hence only the C api will be re-generated overriding unwanted
> zproto headers.
>
> Q2:
> No, `gsl project.xml` is the correct command. You'll use `make code` to
> refresh zproto models.
>
> Q3:
> No, changes are applied gradually downstream there is no pressure to do it
> right away. If there was a critical bug a mail to the mailing might be
> appropriate though.
>
>
> 2016-04-25 14:47 GMT+02:00 Osiris Pedroso <opedr...@gmail.com>:
>
>> Up till now, I thought that the following command was what regenerated
>> the code for CZMQ project (or any other project using GSL code generation
>> for that matter):
>> ```
>> root@OPLIN:~/git/czmq# gsl project.xml
>> ```
>>
>> But I came across the contents of CZMQ's Makemodule.am, which has this
>> rule in it (similar rule exist in ZYRE and MALAMUTE):
>> ```
>> # Produce generated code from models in the src directory
>> code:
>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q sockopts.xml
>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zgossip.xml
>> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zgossip_msg.xml
>> cd $(srcdir); gsl -target:- project.xml
>> ```
>>
>> **Question #1**: What does the GSL command line options "-zproject:1" and
>> "-target:-" mean?
>> I looked in GSL's README.md and the information is not there. The word
>> "zproject" is nowhere in the gsl sources...
>> ```
>> Options currently recognised by GSL are:
>>
>> * -a   argument: Pass arguments following filename to GSL script
>> * -q   quiet:suppress routine messages
>> * -p   parallel: process files in parallel
>> * -s:n size:nset script cache size - default is 100
>> * -h   help: show command-line summary
>> * -v   version:  show full version information
>> ```
>> **Question#2**: So, if one wants to apply GSL & ZPROJECT latest changes,
>> is the correct approach to "make code" to get all modules regenerated for
>> each of these projects then?
>>
>> **Question #3**: If a contributor makes a change to a **.gsl** file, is
>> he expected to also regen all downstream projects affected by those changes
>> and PR them as well? What is the correct etiquette here?
>>
>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] CZMQ code generation

2016-04-25 Thread Osiris Pedroso
Up till now, I thought that the following command was what regenerated the
code for CZMQ project (or any other project using GSL code generation for
that matter):
```
root@OPLIN:~/git/czmq# gsl project.xml
```

But I came across the contents of CZMQ's Makemodule.am, which has this rule
in it (similar rule exist in ZYRE and MALAMUTE):
```
# Produce generated code from models in the src directory
code:
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q sockopts.xml
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zgossip.xml
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zgossip_msg.xml
cd $(srcdir); gsl -target:- project.xml
```

**Question #1**: What does the GSL command line options "-zproject:1" and
"-target:-" mean?
I looked in GSL's README.md and the information is not there. The word
"zproject" is nowhere in the gsl sources...
```
Options currently recognised by GSL are:

* -a   argument: Pass arguments following filename to GSL script
* -q   quiet:suppress routine messages
* -p   parallel: process files in parallel
* -s:n size:nset script cache size - default is 100
* -h   help: show command-line summary
* -v   version:  show full version information
```
**Question#2**: So, if one wants to apply GSL & ZPROJECT latest changes, is
the correct approach to "make code" to get all modules regenerated for each
of these projects then?

**Question #3**: If a contributor makes a change to a **.gsl** file, is he
expected to also regen all downstream projects affected by those changes
and PR them as well? What is the correct etiquette here?
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] CZMQ "stable" release versioning

2016-04-25 Thread Osiris Pedroso
Thanks!

On Mon, Apr 25, 2016 at 5:21 AM Kevin Sapper <kevinsappe...@gmail.com>
wrote:

> Just mark them as you would do for classes `*state* = "*draft*"`. You can
> have a look at `api/zframe.c`[1] if you need an example.
>
> [1]
> https://github.com/zeromq/czmq/blob/7e4e9202bb1f32c58aef23b7626c280f7e743a95/api/zframe.api#L107
>
> 2016-04-25 11:57 GMT+02:00 Osiris Pedroso <opedr...@gmail.com>:
>
>> Pieter,
>>
>> What is the process of marking an individual method as draft?
>> What should one do to have that effect?
>>
>> Thanks,
>> Osiris
>>
>> Sent from my iPad. Regularly foiled by autocorrect. But duck it..
>>
>> On Apr 25, 2016, at 04:51, Pieter Hintjens <piet...@gmail.com> wrote:
>>
>> Yes, retiring the deprecated APIs and bumping the major version should go
>> together.
>> On 24 Apr 2016 13:37, "Luca Boccassi" <luca.bocca...@gmail.com> wrote:
>>
>>> On Sun, 2016-04-24 at 00:09 +0200, Pieter Hintjens wrote:
>>> > we can mark individual methods and classes as draft, even within a
>>> > stable release.
>>> >
>>> > On 23 Apr 2016 21:10, "Brian Knox" <bk...@digitalocean.com> wrote:
>>> > When we cut another "stable" release of CZMQ to keep packagers
>>> > happy, I'm wondering what version we'll use - specifically
>>> > around a stable release that include radar/dish,
>>> > scatter/gather and client/server.
>>> >
>>> >
>>> > I want to start a new version of the rsyslog input and output
>>> > plugins that only support the new thread safe sockets.  To
>>> > avoid ifdef hell in the current plugins I'll probably just
>>> > make new instances - so if the next release is 4, I'll name
>>> > them omczmq4 / imczmq4 etc.
>>> >
>>> >
>>> > Cheers,
>>> >
>>> > Brian
>>>
>>> Hi,
>>>
>>> 
>>>
>>> Given since the last release some public APIs have changed in an
>>> incompatible way (eg: zmsg_encode/decode signatures), there should be a
>>> major version bump (besides an ABI bump), and I'll have to upload a new
>>> source/-dev package.
>>>
>>> A while ago we also talked about the possibility of retiring the
>>> deprecated APIs. Is that still on the plate?
>>>
>>> Kind regards,
>>> Luca Boccassi
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] CZMQ "stable" release versioning

2016-04-25 Thread Osiris Pedroso
Pieter,

What is the process of marking an individual method as draft?
What should one do to have that effect?

Thanks,
Osiris

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Apr 25, 2016, at 04:51, Pieter Hintjens  wrote:
> 
> Yes, retiring the deprecated APIs and bumping the major version should go 
> together.
> 
>> On 24 Apr 2016 13:37, "Luca Boccassi"  wrote:
>> On Sun, 2016-04-24 at 00:09 +0200, Pieter Hintjens wrote:
>> > we can mark individual methods and classes as draft, even within a
>> > stable release.
>> >
>> > On 23 Apr 2016 21:10, "Brian Knox"  wrote:
>> > When we cut another "stable" release of CZMQ to keep packagers
>> > happy, I'm wondering what version we'll use - specifically
>> > around a stable release that include radar/dish,
>> > scatter/gather and client/server.
>> >
>> >
>> > I want to start a new version of the rsyslog input and output
>> > plugins that only support the new thread safe sockets.  To
>> > avoid ifdef hell in the current plugins I'll probably just
>> > make new instances - so if the next release is 4, I'll name
>> > them omczmq4 / imczmq4 etc.
>> >
>> >
>> > Cheers,
>> >
>> > Brian
>> 
>> Hi,
>> 
>> 
>> 
>> Given since the last release some public APIs have changed in an
>> incompatible way (eg: zmsg_encode/decode signatures), there should be a
>> major version bump (besides an ABI bump), and I'll have to upload a new
>> source/-dev package.
>> 
>> A while ago we also talked about the possibility of retiring the
>> deprecated APIs. Is that still on the plate?
>> 
>> Kind regards,
>> Luca Boccassi
>> 
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] Building CZMQ with disable-drafts

2016-04-22 Thread Osiris Pedroso
Found example in czmq/ci_build.sh
```
./autogen.sh
./configure --with-drafts=[yes|no]
```
Reason for question is the latest CZMQ repository does not build in Windows
with option --disable-drafts.
It has compilation errors in ztrie.c, which should not even be compiled
since draft API is turned off.

Compilation works fine in Linux for both draft APIs or not.


On Fri, Apr 22, 2016 at 3:44 PM Osiris Pedroso <opedr...@gmail.com> wrote:

> How can I build CZMQ with disable-drafts in Ubuntu?
>
> In Windows, I run czmq/builds/msvc/configure.bat --disable-drafts to
> accomplish that.
>
> Thanks
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

[zeromq-dev] Building CZMQ with disable-drafts

2016-04-22 Thread Osiris Pedroso
How can I build CZMQ with disable-drafts in Ubuntu?

In Windows, I run czmq/builds/msvc/configure.bat --disable-drafts to
accomplish that.

Thanks
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] iMatix copyrights in ZeroMQ code base

2016-04-22 Thread Osiris Pedroso
LOL!

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Apr 22, 2016, at 11:51, Pieter Hintjens  wrote:
> 
> Yes, it comes from a well known account and a judge in court looking
> at this would accept it as plausible enough to sustain. In case of
> doubt, I hereby sign it:
> 
> X
> 
> :)
> 
>> On Fri, Apr 22, 2016 at 6:40 PM, Greg Young  wrote:
>> You likely want to have a signed copy of this that you give to the project.
>> 
>> Not that I think it will be any issue but such an email is normally
>> not admissable
>> 
>>> On Fri, Apr 22, 2016 at 5:31 PM, Pieter Hintjens  wrote:
>>> To whom it may concern,
>>> 
>>> iMatix Corporation sprl, with address at 13-15 rue des Ateliers, 1080
>>> Brussels Belgium, hereby grants an irrevocable, global, and fully
>>> paid-up license on all its copyrights that exist in the libzmq code
>>> base, and any other projects under the ZeroMQ organization on GitHub,
>>> under the Mozilla Public License version 2.
>>> 
>>> Pieter Hintjens
>>> CEO, iMatix
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> 
>> 
>> 
>> --
>> Studying for the Turing test
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] How to build a stable (non DRAFT_API) version of malamute?

2016-04-19 Thread Osiris Pedroso
My environment is Windows.

I need to know how to build the MALAMUTE library/dll without DRAFT_API
being defined.

Same question applies to CZMQ, since MALAMUTE includes CZMQ as well.

Is it just a matter of hand editing platform.h and commenting #define
MLM_BUILD_DRAFT_API?

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Role of iMatix in ZeroMQ community

2016-04-18 Thread Osiris Pedroso
I like the idea of a 0MQ foundation.
Maybe turn ownership to all the contributors to zeromq and have an
executive committee that deals with day to day affairs.

On Mon, Apr 18, 2016 at 2:56 PM Michel Pelletier 
wrote:

> This is terrible news Pieter, there's no easy way to say that I hope you
> are comfortable and enjoying your time with friends and family.
>
> Would a 0MQ foundation make sense?  Something that can accept charitable
> donations for the upkeep of things like domains and web resources.
> Unfortunately this requires some up front work and ongoing vigilant
> volunteers.  Or, go the route of a "serverless" existence and use something
> like github pages to be the central hub, and have the existing domains
> redirect to there?
>
> -Michel
>
> On Mon, Apr 18, 2016 at 12:41 PM, Greg Young 
> wrote:
>
>> Route 53 is pretty simple to setup. If you are in lack of others we
>> can maintain them.
>>
>> On Mon, Apr 18, 2016 at 10:39 PM, Pieter Hintjens  wrote:
>> > Hi folks,
>> >
>> > I learned today that I'm terminally ill with lung cancer. Metastasis
>> from an
>> > incident five years ago. iMatix has run for 20 years and today consists
>> of
>> > myself as only active resource. This means we need to remove my firm as
>> a
>> > dependency.
>> >
>> > Suggestions for a safe long term home for the domain names, if you
>> would.
>> >
>> > Pieter
>> >
>> >
>> > ___
>> > zeromq-dev mailing list
>> > zeromq-dev@lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>>
>>
>>
>> --
>> Studying for the Turing test
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] build problem after mlm_client.xml change

2016-04-14 Thread Osiris Pedroso
Hi Matjaz,

Can you provide a repository with the modified file checked in?

I would like to try it as well.

Thanks,
Osiris

On Thu, Apr 14, 2016 at 9:12 AM Matjaž Ostroveršnik <
matjaz.ostrovers...@gmail.com> wrote:

> Hi,
>
> I tried to add a new method to the mlm_client.xml and then regenerate all
> dependant files.
> Generation of include/mlm_client.h is unsuccesful (i.e. one gets xml
> garbage within the c header sources)
>
> Am I doing something wrong or this is a bug?
> Guys how do you regenerate when you change some xml file (ok I know for
> project.xml)
> I think it is something wrong with an inclusion of custom file
> 
> It seems that gsl is including header tag instead of source tag.
>
> How to reproduce:
> *git reset --hard*
> HEAD is now at c097dcf Merge pull request #164 from opedroso/WIN_CRLF_REGEN
> *git status*
> On branch master
> Your branch is up-to-date with 'origin/master'.
> nothing to commit, working directory clean
> *cd src*
> *gsl mlm_client.xml *
> GSL/4.1c Copyright (c) 1996-2016 iMatix Corporation
> gsl/4 I: Processing mlm_client.xml...
> *cd ..*
> *make*
> Making all in doc
> make[1]: Entering directory '/home/ostri/zstuff/malamute/doc'
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory '/home/ostri/zstuff/malamute/doc'
> make[1]: Entering directory '/home/ostri/zstuff/malamute'
>   CC   src/src_libmlm_la-mlm_msg.lo
> In file included from src/../include/mlm_library.h:66:0,
>  from src/../include/malamute.h:17,
>  from src/mlm_classes.h:24,
>  from src/mlm_msg.c:20:
> src/../include/mlm_client.h:157:5: error: expected identifier or ‘(’
> before ‘<’ token
>  
>  ^
> src/../include/mlm_client.h:159:61: error: identifier "or" is a special
> operator name in C++ [-Werror=c++-compat]
>  Returns 0 if OK, -1 if failed due to lack of memory or other
> error.
>  ^
> src/../include/mlm_client.h:167:61: error: identifier "or" is a special
> operator name in C++ [-Werror=c++-compat]
>  Returns 0 if OK, -1 if failed due to lack of memory or other
> error.
>  ^
> src/../include/mlm_client.h:176:61: error: identifier "or" is a special
> operator name in C++ [-Werror=c++-compat]
>  Returns 0 if OK, -1 if failed due to lack of memory or other
> error.
>  ^
> src/../include/mlm_client.h:184:27: error: identifier "and" is a special
> operator name in C++ [-Werror=c++-compat]
>  Receive a subject and string content from the server. The content
> may be
>^
> src/../include/mlm_client.h:185:11: error: identifier "or" is a special
> operator name in C++ [-Werror=c++-compat]
>  1 or more string frames. This method is orthogonal to the sendx
> methods.
>^
> src/../include/mlm_client.h:186:58: error: identifier "not" is a special
> operator name in C++ [-Werror=c++-compat]
>  End the string arguments with NULL. If there are not enough
> frames in
>   ^
> src/../include/mlm_client.h:188:38: error: identifier "or" is a special
> operator name in C++ [-Werror=c++-compat]
>  of string contents received, or -1 in case of error. Free the
> returned
>   ^
> src/../include/mlm_client.h:189:17: error: identifier "and" is a special
> operator name in C++ [-Werror=c++-compat]
>  subject and content strings when finished with them. To get the
> type of
>  ^
> cc1: all warnings being treated as errors
> Makefile:1027: recipe for target 'src/src_libmlm_la-mlm_msg.lo' failed
> make[1]: *** [src/src_libmlm_la-mlm_msg.lo] Error 1
> make[1]: Leaving directory '/home/ostri/zstuff/malamute'
> Makefile:1260: recipe for target 'all-recursive' failed
> make: *** [all-recursive] Error 1
>
> *gsl -v*
> GSL/4.1c
> Built from http://github.com/imatix/gsl.git master
> Copyright (c) 1996-2016 iMatix Corporation
> Compiler: gcc -c -O2 -D_REENTRANT -D_GNU_SOURCE -Wall -Wno-unused
> -fno-strict-aliasing -DBASE_THREADSAFE -I. gsl.c
>
>
>
> Best regards
>
> Matjaž
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Idiot guide to update mlm server project

2016-04-10 Thread Osiris Pedroso
Hi Matjaz,

The way we do is to fork zeromq/zproject to matjz/zproject, push your
change to matjaz/zproject and then request a PR to zeromq/zproject from
your fork.

Sine you ran zproject/tstgenbld.sh already you know there are no problems.
There id no need, but I would mention that you ran and the results were
good. This may help somebody else down the line when reading your comments.

Osiris

On Sun, Apr 10, 2016, 18:01 Matjaž Ostroveršnik <
matjaz.ostrovers...@gmail.com> wrote:

> Thanks Osiris.
>
> I did it. Difference before and after is only in timestamps at the end,
> so I believe it is ok.
> The change is minimal:
> - added comments (how to build out of source & work with eclipse
> - commented lines which caused the in source build
>
> I comit the zproject_cmake.gsl
> Can't git push.
>
> What should I to do next, to finalize?
> I'd like to go full circle, before I apply the curve patch.
>
> Thanks in advance
>
> Matjaž
>
> On 10.4.2016 3:03, Osiris Pedroso wrote:
> > Matjaz, checkout the zproject/tstgenbld.sh script.
> >
> > It does the generation, build and make test for a list of projects
> (czmq, malamute, zyre).
> >
> > I think it would be simple to add some cmake targets to regen the
> sources if zproject and gsl projects are on disk.
> >
> > As long as we don't wire to do it automatically as Pieter prefers, I
> think it would be great to have it available for us newbies.
> >
> > Sent from my iPad. Regularly foiled by autocorrect. But duck it..
> >
> >> On Apr 9, 2016, at 14:35, Pieter Hintjens <p...@imatix.com> wrote:
> >>
> >> On Sat, Apr 9, 2016 at 9:00 PM, Matjaž Ostroveršnik
> >> <matjaz.ostrovers...@gmail.com> wrote:
> >>
> >>> "Source" and generated files in our solution are clearly separated and
> >>> in different folders.
> >> Not possible in our case due to independent layers of code generation,
> >> often feeding into each other.
> >>
> >> E.g. in CZMQ, we have:
> >>
> >> * A tool that generates the socket option classes (zsock_option.gsl)
> >> * A tool that generates the project packaging (zproject packaging
> targets)
> >> * A tool that generates man pages from sources (mkman)
> >> * A tool that generates server/client classes from state machine models
> (zproto)
> >> * A tool that generates protocol codecs from protocol models (zproto)
> >> * A tool that generates language bindings (zproject again)
> >>
> >> The outputs of one generator look like "normal" code to higher layers.
> >>
> >>> What is the top level build command in mlm case, which builds
> everything
> >>> from sources to binaries and tests data?
> >> All generated code is saved in the git repository, as you saw. The top
> >> level command to rebuild generated models is `make code`, and then
> >> `gsl project.xml`.
> >>
> >>> With mlm one needs to dig into generated sources and read the comments
> >>> (I admit the are clearly marked). The problem is that at least one
> >>> (maybe more) has two hops or more. (header file->api file->...) .
> Second
> >>> hop was one  too much for me. ;-)
> >> Yes, sorry. This is the price we pay for abstraction. FWIW the current
> >> approach is significantly simpler than we've done in the past. We
> >> don't have much meta.
> >>
> >>> I break the rule by intention (i.e. by updating the generated file),
> >>> since I wanted to experiment. The experiment is over and I'd like to
> put
> >>> the changes in proper places. That's the point where I am now, and
> >>> unfortunately I am stuck.
> >> Hmm.
> >>
> >>> That was my initial intention (i.e. I changed the CMake file; just few
> >>> lines). ;-)
> >> So, you need to untangle the various changes and then we can work
> >> together to backport each one (if possible, sometimes it won't be).
> >>
> >> Start with the simplest one.
> >>
> >>> Can you (actually any of the product veterans): in form of short build
> >>> instructions(part of the distribution)
> >>> - provide a list of  "source" generated files
> >> The models are (for our generation) always XML files, sometimes with
> >> other extensions.
> >>
> >> The sources for other generation tools are arbitrary. E.g.
> >> CMakeLists.txt, configure.ac, etc.
> >>
> >>> If the sources and generated files are clearly separated and c

Re: [zeromq-dev] Idiot guide to update mlm server project

2016-04-09 Thread Osiris Pedroso
Matjaz, checkout the zproject/tstgenbld.sh script.

It does the generation, build and make test for a list of projects (czmq, 
malamute, zyre).

I think it would be simple to add some cmake targets to regen the sources if 
zproject and gsl projects are on disk.

As long as we don't wire to do it automatically as Pieter prefers, I think it 
would be great to have it available for us newbies.

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Apr 9, 2016, at 14:35, Pieter Hintjens  wrote:
> 
> On Sat, Apr 9, 2016 at 9:00 PM, Matjaž Ostroveršnik
>  wrote:
> 
>> "Source" and generated files in our solution are clearly separated and
>> in different folders.
> 
> Not possible in our case due to independent layers of code generation,
> often feeding into each other.
> 
> E.g. in CZMQ, we have:
> 
> * A tool that generates the socket option classes (zsock_option.gsl)
> * A tool that generates the project packaging (zproject packaging targets)
> * A tool that generates man pages from sources (mkman)
> * A tool that generates server/client classes from state machine models 
> (zproto)
> * A tool that generates protocol codecs from protocol models (zproto)
> * A tool that generates language bindings (zproject again)
> 
> The outputs of one generator look like "normal" code to higher layers.
> 
>> What is the top level build command in mlm case, which builds everything
>> from sources to binaries and tests data?
> 
> All generated code is saved in the git repository, as you saw. The top
> level command to rebuild generated models is `make code`, and then
> `gsl project.xml`.
> 
>> With mlm one needs to dig into generated sources and read the comments
>> (I admit the are clearly marked). The problem is that at least one
>> (maybe more) has two hops or more. (header file->api file->...) . Second
>> hop was one  too much for me. ;-)
> 
> Yes, sorry. This is the price we pay for abstraction. FWIW the current
> approach is significantly simpler than we've done in the past. We
> don't have much meta.
> 
>> I break the rule by intention (i.e. by updating the generated file),
>> since I wanted to experiment. The experiment is over and I'd like to put
>> the changes in proper places. That's the point where I am now, and
>> unfortunately I am stuck.
> 
> Hmm.
> 
>> That was my initial intention (i.e. I changed the CMake file; just few
>> lines). ;-)
> 
> So, you need to untangle the various changes and then we can work
> together to backport each one (if possible, sometimes it won't be).
> 
> Start with the simplest one.
> 
>> Can you (actually any of the product veterans): in form of short build
>> instructions(part of the distribution)
>> - provide a list of  "source" generated files
> 
> The models are (for our generation) always XML files, sometimes with
> other extensions.
> 
> The sources for other generation tools are arbitrary. E.g.
> CMakeLists.txt, configure.ac, etc.
> 
>> If the sources and generated files are clearly separated and completely
>> integrated into the build procedure, then everything above in less
>> important.
> 
> Not going to happen, sorry. There are tradeoffs, and one is to make
> code generation at one level invisible to other levels. That's done on
> purpose. Malamute has N classes, all in include and src. That's a
> contract with all build tools that work on the project. Whether or not
> some of those classes, or pieces of them, are generated is an internal
> decision. It cannot be exposed at the structural level or we add
> significant cost elsewhere, to layers that should not be paying it.
> 
>> It would be nice if the build procedure...
>> - would be completely inside the project structure (I understand that
>> one building the mlm has to work with zproject project files also;
>> correct me please if I am not right)
> 
> You can build Malamute without knowing anything about zproject.
> 
> -Pieter
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Idiot guide to update mlm server project

2016-04-08 Thread Osiris Pedroso
I would second this request, since it would increase my understanding of
the process of the generating code using ZPROJECT and GSL.

On Fri, Apr 8, 2016 at 2:43 PM Matjaž Ostroveršnik <
matjaz.ostrovers...@gmail.com> wrote:

> Dear all,
>
> I managed to locally extend the mlm server with:
> - ability to make out of source builds for cmake
> - support for blobs for service interface
> - curve support
>
> All tests went smooth. :-)
>
> During the upgrade I changed:
>
> CMakeLists.txt
>
> include/mlm_client.h
>
> include/mlm_server.h
>
> src/malamute.c
>
> src/mlm_client.c
>
> src/mlm_client_engine.inc
>
> src/mlm_perftest.c
>
> src/mlm_server.c
>
> src/mlm_server_engine.inc
>
> and added
>
>  debug_build.sh  --- cmake -> make for release
> version
>
>  release_build.sh--- cmake -> make for debug
> version
>
>  src/mlm_tutorial_curve.c--- test / tutorial program for
> mlm curve
>
>
> I noticed that "include/mlm_client.h" is generated from
> api/mlm_client.api and api/mlm_client.api is generated from mlm_client.xml.
> It is a similar story with other files.
>
> Osiris kindly provided me bunch of links and instructions. I went
> through, but it is really a lot of reading. I managed to install
> zproject and gsl. I am not sure what to do next. Complete git diff is
> 750 lines.
>
> Guys I need idiot proof short guide (with commands) how to merge the
> changes into the project and transport it to the github.
> I believe that there generators are great in big picture, but they are
> obstacles for me now. :-(
>
> Please help me.
>
> Best regards
>
> Matjaž
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Test failing on OS X 10.9.4

2016-04-06 Thread Osiris Pedroso
I live in Alabama, USA. CST (GMT+6, currently +5 due to daylight savings).

You did not break them. I was not even running with your changes.

These tests have failed for me for a long time on fresh source from github
(no chages) on this Ubuntu machine I setup exclusively for ZeroMQ.
I just thought the failures were consistent in all platforms, but seems
like they are not.

I just make sure to run the tests on a fresh build, make my changes and if
the same tests fail aferwards, I consider I have hopefully not introduced
any new problems which happen to be in one of the broken tests already.


On Wed, Apr 6, 2016 at 2:32 PM Matjaž Ostroveršnik <
matjaz.ostrovers...@gmail.com> wrote:

> Hi Osiris,
>
> Which time zone you are living in? You are non stop on-line. Thanks, I
> appreciate your fast check.
> What are those 4 failed tests?
> I don't remember touching them.
>
> Best regards
>
>
> Matjaž
>
>
> On 6.4.2016 19:45, Osiris Pedroso wrote:
>
> Lucky you,
>
> Ubuntu 14.04 results:
>
>
> 
> Testsuite summary for zeromq 4.2.0
>
> 
> # TOTAL: 78
> # PASS:  74
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  4
> # XPASS: 0
> # ERROR: 0
>
> 
> See ./test-suite.log
> Please report to zeromq-dev@lists.zeromq.org
>
> 
>
> FAIL: tests/test_term_endpoint
> ==
>
> lt-test_term_endpoint: tests/test_term_endpoint.cpp:136: int main():
> Assertion `rc == 0' failed.
>
> FAIL: tests/test_ipc_wildcard
> =
>
> lt-test_ipc_wildcard: tests/test_ipc_wildcard.cpp:41: int main():
> Assertion `rc == 0' failed.
>
> FAIL: tests/test_xpub_manual
> 
>
> lt-test_xpub_manual: tests/test_xpub_manual.cpp:108: int
> test_xpub_proxy_unsubscribe_on_disconnect(): Assertion `zmq_bind
> (xsub_proxy, frontend) == 0' failed.
>
> FAIL: tests/test_filter_ipc
> ===
>
> lt-test_filter_ipc: tests/test_filter_ipc.cpp:100: void run_test(int, T,
> int, int) [with T = int]: Assertion `rc == 0' failed.
>
> On Wed, Apr 6, 2016 at 5:14 AM Shital Mehta <smca...@gmail.com> wrote:
>
>> 
>>zeromq 4.2.0: ./test-suite.log
>> 
>>
>> # TOTAL: 78
>> # PASS:  77
>> # SKIP:  0
>> # XFAIL: 0
>> # FAIL:  1
>> # XPASS: 0
>> # ERROR: 0
>>
>> .. contents:: :depth: 2
>>
>> FAIL: tests/test_shutdown_stress
>> 
>>
>> Invalid argument (src/stream_engine.cpp:136)
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
> ___
> zeromq-dev mailing 
> listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Test failing on OS X 10.9.4

2016-04-06 Thread Osiris Pedroso
Lucky you,

Ubuntu 14.04 results:


Testsuite summary for zeromq 4.2.0

# TOTAL: 78
# PASS:  74
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0

See ./test-suite.log
Please report to zeromq-dev@lists.zeromq.org


FAIL: tests/test_term_endpoint
==

lt-test_term_endpoint: tests/test_term_endpoint.cpp:136: int main():
Assertion `rc == 0' failed.

FAIL: tests/test_ipc_wildcard
=

lt-test_ipc_wildcard: tests/test_ipc_wildcard.cpp:41: int main(): Assertion
`rc == 0' failed.

FAIL: tests/test_xpub_manual


lt-test_xpub_manual: tests/test_xpub_manual.cpp:108: int
test_xpub_proxy_unsubscribe_on_disconnect(): Assertion `zmq_bind
(xsub_proxy, frontend) == 0' failed.

FAIL: tests/test_filter_ipc
===

lt-test_filter_ipc: tests/test_filter_ipc.cpp:100: void run_test(int, T,
int, int) [with T = int]: Assertion `rc == 0' failed.

On Wed, Apr 6, 2016 at 5:14 AM Shital Mehta  wrote:

> 
>zeromq 4.2.0: ./test-suite.log
> 
>
> # TOTAL: 78
> # PASS:  77
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  1
> # XPASS: 0
> # ERROR: 0
>
> .. contents:: :depth: 2
>
> FAIL: tests/test_shutdown_stress
> 
>
> Invalid argument (src/stream_engine.cpp:136)
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>


test-suite.log
Description: Binary data
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] malamute CMake & eclipse

2016-04-06 Thread Osiris Pedroso
Hi Matjaz,

Read the zproject/README.md and look for the section *Tips for modifying
generated files in an already existent project
<https://github.com/opedroso/zproject#toc2-94>*

Seems like every zeromq project that has a project.xml in its home
directory has some portion of its code/scripts automatically generated.
The source of these generated files live in zeromq/zproject project and
they have extension .GSL.

There is another project, imatix/gsl that contains the GSL program that
will use the .GSL files referenced by your target project i.e.
zeromq/malamute/project.xml to generate the output code/scripts for that
process.

I have been trying to undertstand that process of late as well, and I wrote
the script zeromq/zproject/tstgenbld.sh which will apply the current .GSL
files in zeromq/zproject on my disk on several projects (CZMQ, ZYRE and
MALAMUTE), regenerating them, then building and running their automated
tests.

This way, I can automate testing the current build, then testing the
modified build once I drop my modified .GSL files in my zeromq/zproject
disk location.

If you want to make the changes you suggested in your previous email,
provide me with the before and after CMakeLists.txt file you made and I
will help you modifying the generating .GSL to generated your new version
automatically.

Then you can test and if you like it, a submit a PULL REQUEST submitting to
the project.

Hope this helps,
Osiris

On Wed, Apr 6, 2016 at 8:29 AM Matjaž Ostroveršnik <
matjaz.ostrovers...@gmail.com> wrote:

> Thanks for quick reply.
> I am a novice and I need a longer explanation.
>
> I cloned zproject and went through the file. Some strange syntax ;-)
> Mixture of cmake and something else (i.e. dot commands).
> What is the purpose of this? Isn't cmake declarative enough, so that this
> conditional generation can be skipped?
>
> I know exactly what to change in CMakeLists.txt file, but I do not know
> the syntax of the gsl file to fix it there.
>
> Do you think that out of source cmake builds is something that malamute
> development team needs? If it is only for me, I can stick with the existing
> solution. ;-)
>
> How is zproject related to malamut project?
>
> Best regards
>
>
> Matjaž
>
>
> On 6.4.2016 14:55, Osiris Pedroso wrote:
>
> Here is the process to find out which file creates any generated file:
>
>1. get the name of file you are interested
>2. clone zeromq/zproject
>3. search for the filename you are interested in *.gsl:
>
> O:\git\zproject>findstr /c:CMakeLists.txt *.gslzproject_cmake.gsl:.output 
> "CMakeLists.txt"zproject_java.gsl:.output 
> "$(topdir)/CMakeLists.txt"zproject_java.gsl:.output 
> "$(topdir)/android/CMakeLists.txt"
>
> So in your case, I believe zproject/zproject_cmake.gsl is the file that
> generates it
>
>>
>> On Wed, Apr 6, 2016 at 7:38 AM Matjaž Ostroveršnik <
>> matjaz.ostrovers...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I am in process of experimenting with malamute. In order to play with
>>> it, the development environment needs to be configured.
>>> Below is my experience with malamute & eclipse & cmake. Perhaps someone
>>> can shorten his/her environment establishing time. :-)
>>>
>> ​
>
>
> ___
> zeromq-dev mailing 
> listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] malamute CMake & eclipse

2016-04-06 Thread Osiris Pedroso
Here is the process to find out which file creates any generated file:

   1. get the name of file you are interested
   2. clone zeromq/zproject
   3. search for the filename you are interested in *.gsl:

O:\git\zproject>findstr /c:CMakeLists.txt
*.gslzproject_cmake.gsl:.output
"CMakeLists.txt"zproject_java.gsl:.output
"$(topdir)/CMakeLists.txt"zproject_java.gsl:.output
"$(topdir)/android/CMakeLists.txt"

So in your case, I believe zproject/zproject_cmake.gsl is the file that
generates it


> On Wed, Apr 6, 2016 at 7:38 AM Matjaž Ostroveršnik <
> matjaz.ostrovers...@gmail.com> wrote:
>
>> Hi all,
>>
>> I am in process of experimenting with malamute. In order to play with it,
>> the development environment needs to be configured.
>> Below is my experience with malamute & eclipse & cmake. Perhaps someone
>> can shorten his/her environment establishing time. :-)
>>
> ​
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] NodeJS binding for CZMQ

2016-04-05 Thread Osiris Pedroso
Hi Pieter,

Sorry for the late feedback, but one thing I noticed is that the files you
are generating through zproject for the NodeJS binding are missing the
generated by zproject headers to them.

On Mon, Apr 4, 2016 at 5:36 AM Pieter Hintjens  wrote:

> Hi all,
>
> I've been working on a NodeJS binding for CZMQ, using the code
> generation approach of zproject. The first version (that builds) is
> here: https://github.com/zeromq/czmq/pull/1382
>
> In theory this will let us generate NodeJS bindings for Zyre,
> Malamute, and any other C libraries that use zproject.
>
> There is a README with instructions on building and using the binding,
> but if anything isn't clear please let me know so I can improve it.
>
> -Pieter
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] ZPROJECT help is on the way

2016-04-01 Thread Osiris Pedroso
Hello fellow ZMQers,

If you have been hit a few times like me with making a change to a file
generated by zproject before you knew that files were generated by
zproject, I have just checked in a new tool for you.

https://github.com/zeromq/zproject/pull/584

This checkin has added zproject/tstgenbld.sh script, which you can use
before and after on a project that get regenerated using zproject’s GSL
files.

The script will get the current repositories for libsodium, libzmq, czmq,
malamute and zyre, build them, install them locally and then execute “make
test” from that local install. Redirect this output to before.log.

Then make your changes to the .GSL files in zproject that you need done.

Rerun tstgenbld.sh redirecting its output to after.log.

Then use a file comparer like meld to see how your changes affected the
final result of the tests run for all these projects by comparing the
before.log and after.log files.

Real handy for making global changes in many projects and having a way to
test these several projects at once.

if there is interest, I could make the list of projects rebuilt a data
driven thing, such that one could provide a CSV file with the name of the
project and github spec and this tool would get them, regenerate them using
latest zproject GSL files, build them and run test on them.

Sample before.log

..Logfiles after building phase
..Logfiles after make-check phase
..Logfiles after building phase
..Logfiles after gsl-generation phase
Building zeromq stack components
..Logfiles after autogen-config phase
..Logfiles after make phase
..Logfiles after make-install phase
Running tests
..Logfiles after make-check phase
/home/opedroso/git/zproject/tmp/libzmq_make-check.err
Problems during /home/opedroso/git/zproject/tmp/libzmq_make-check.err:
FAIL: tests/test_term_endpoint
FAIL: tests/test_ipc_wildcard
FAIL: tests/test_xpub_manual
FAIL: tests/test_filter_ipc
# FAIL:  4
STOP__DATE: Thu Mar 31 16:49:11 CDT 2016
START_DATE: Thu Mar 31 16:41:01 CDT 2016

Sample after.log

..Logfiles after building phase
..Logfiles after make-check phase
..Logfiles after building phase
..Logfiles after gsl-generation phase
Building zeromq stack components
..Logfiles after autogen-config phase
..Logfiles after make phase
..Logfiles after make-install phase
Running tests
..Logfiles after make-check phase
/home/opedroso/git/zproject/tmp/libzmq_make-check.err
Problems during /home/opedroso/git/zproject/tmp/libzmq_make-check.err:
FAIL: tests/test_term_endpoint
FAIL: tests/test_ipc_wildcard
FAIL: tests/test_xpub_manual
FAIL: tests/test_filter_ipc
# FAIL:  4
STOP__DATE: Thu Mar 31 17:41:15 CDT 2016
START_DATE: Thu Mar 31 17:32:31 CDT 2016

So, from the log files I can safely assume that I have not broken anything
new. What was broken before my changes is still broken after, but more
importantly everything tested that was working before still works after my
changes.

Enjoy!​

PS: let me know if there is interest in making the list of projects rebuilt
configurable, i.e. specified on a file.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] How to specify stable when using GSL

2016-03-30 Thread Osiris Pedroso
Could you show me an example how to specify on the configure cmd line (or
build cmd line) that I want the stable version to be built?

On Wed, Mar 30, 2016 at 7:51 AM Pieter Hintjens <p...@imatix.com> wrote:

> The stable/draft option isn't decided at generation time, today. It's
> decided at configure and/or build time. I guess we could add an option
> to force this, at generation time.
>
> In zproject if you haven't marked any part of the API as stable, then
> it's all built. Does this not cover what you need?
>
>
> On Sun, Mar 27, 2016 at 1:28 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
> > I was really hoping for instructions on what are the arguments that
> would set the attribute stable=1 on gsl command line.
> >
> > Maybe the correct question should be how do I tell configure that I want
> the stable one.
> >
> > Sent from my iPad. Regularly foiled by autocorrect. But duck it..
> >
> >> On Mar 27, 2016, at 03:37, Pieter Hintjens <p...@imatix.com> wrote:
> >>
> >> Two things here. First, the project itself can have various states.
> >> There are two that interest us:
> >>
> >> * all draft, nothing has been marked stable yet.
> >> * some parts marked as stable (and released), others are draft.
> >>
> >> In the first case zproject should export the whole API (in the project
> >> header file). It didn't do this properly until a few weeks ago, so do
> >> take the latest master.
> >>
> >> In the second case, the project header file exports the stable
> >> classes/methods and then the unstable ones according to what happens
> >> at configure time.
> >>
> >> -Pieter
> >>
> >>> On Fri, Mar 25, 2016 at 4:46 PM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
> >>> In case you prefer this format:
> >>>
> >>> G:\malamute>git diff include\mlm_proto.h
> >>> diff --git a/include/mlm_proto.h b/include/mlm_proto.h
> >>> index a6b27e5..1e73a2b 100644
> >>> --- a/include/mlm_proto.h
> >>> +++ b/include/mlm_proto.h
> >>> @@ -20,9 +20,7 @@ extern "C" {
> >>> //  @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY
> ZPROJECT
> >>> //  @warning Please edit the model at "api/mlm_proto.api" to make
> changes.
> >>> //  @interface
> >>> -//  This is a draft class, and may change without notice. It is
> disabled in
> >>> -//  stable builds by default. If you use this in applications, please
> ask
> >>> -//  for it to be pushed to stable state. Use --enable-drafts to
> enable.
> >>> +//  This API is a draft, and may change without notice.
> >>> #ifdef MLM_BUILD_DRAFT_API
> >>> #define MLM_PROTO_SUCCESS 200   //
> >>> #define MLM_PROTO_FAILED 300//
> >>>
> >>>> On Fri, Mar 25, 2016 at 10:36 AM Osiris Pedroso <opedr...@gmail.com>
> wrote:
> >>>>
> >>>> I have made some changes to zproject (Windows building scripts) and
> >>>> regenerated zeromq/malamute project with those changes using these
> steps:
> >>>>
> >>>> #!/usr/bin/env bash
> >>>>
> >>>> set -x
> >>>>
> >>>> ( cd ~/git/zproject && ./autogen.sh && ./configure && make && sudo
> make
> >>>> install ) || exit 1
> >>>>
> >>>> #git clone --depth 1 https://github.com/imatix/gsl gsl
> >>>> ( cd ~/git/gsl/src && make -j4 && sudo make install ) || exit 1
> >>>>
> >>>> #git clone --depth 1 https://github.com/zeromq/czmq czmq
> >>>> ( cd ~/git/czmq && gsl -target:* project.xml ) || exit 1
> >>>>
> >>>> #git clone --depth 1 https://github.com/zeromq/malamute malamute
> >>>> ( cd ~/git/malamute && gsl -target:* project.xml ) || exit 1
> >>>>
> >>>> The problem is that I end up with differences between the generated
> files
> >>>> which are note related to my changes to GSL files
> >>>> (malamute/include/mlm_proto.h):
> >>>>
> >>>> OLD:
> >>>>
> >>>> //  This is a draft class, and may change without notice. It is
> disabled
> >>>> in
> >>>> //  stable builds by default. If you use this in applications, please
> ask
> >>>> //  for it to be pushed to stable state. Use --e

Re: [zeromq-dev] How to specify stable when using GSL

2016-03-27 Thread Osiris Pedroso
I was really hoping for instructions on what are the arguments that would set 
the attribute stable=1 on gsl command line.

Maybe the correct question should be how do I tell configure that I want the 
stable one.

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Mar 27, 2016, at 03:37, Pieter Hintjens <p...@imatix.com> wrote:
> 
> Two things here. First, the project itself can have various states.
> There are two that interest us:
> 
> * all draft, nothing has been marked stable yet.
> * some parts marked as stable (and released), others are draft.
> 
> In the first case zproject should export the whole API (in the project
> header file). It didn't do this properly until a few weeks ago, so do
> take the latest master.
> 
> In the second case, the project header file exports the stable
> classes/methods and then the unstable ones according to what happens
> at configure time.
> 
> -Pieter
> 
>> On Fri, Mar 25, 2016 at 4:46 PM, Osiris Pedroso <opedr...@gmail.com> wrote:
>> In case you prefer this format:
>> 
>> G:\malamute>git diff include\mlm_proto.h
>> diff --git a/include/mlm_proto.h b/include/mlm_proto.h
>> index a6b27e5..1e73a2b 100644
>> --- a/include/mlm_proto.h
>> +++ b/include/mlm_proto.h
>> @@ -20,9 +20,7 @@ extern "C" {
>> //  @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT
>> //  @warning Please edit the model at "api/mlm_proto.api" to make changes.
>> //  @interface
>> -//  This is a draft class, and may change without notice. It is disabled in
>> -//  stable builds by default. If you use this in applications, please ask
>> -//  for it to be pushed to stable state. Use --enable-drafts to enable.
>> +//  This API is a draft, and may change without notice.
>> #ifdef MLM_BUILD_DRAFT_API
>> #define MLM_PROTO_SUCCESS 200   //
>> #define MLM_PROTO_FAILED 300//
>> 
>>> On Fri, Mar 25, 2016 at 10:36 AM Osiris Pedroso <opedr...@gmail.com> wrote:
>>> 
>>> I have made some changes to zproject (Windows building scripts) and
>>> regenerated zeromq/malamute project with those changes using these steps:
>>> 
>>> #!/usr/bin/env bash
>>> 
>>> set -x
>>> 
>>> ( cd ~/git/zproject && ./autogen.sh && ./configure && make && sudo make
>>> install ) || exit 1
>>> 
>>> #git clone --depth 1 https://github.com/imatix/gsl gsl
>>> ( cd ~/git/gsl/src && make -j4 && sudo make install ) || exit 1
>>> 
>>> #git clone --depth 1 https://github.com/zeromq/czmq czmq
>>> ( cd ~/git/czmq && gsl -target:* project.xml ) || exit 1
>>> 
>>> #git clone --depth 1 https://github.com/zeromq/malamute malamute
>>> ( cd ~/git/malamute && gsl -target:* project.xml ) || exit 1
>>> 
>>> The problem is that I end up with differences between the generated files
>>> which are note related to my changes to GSL files
>>> (malamute/include/mlm_proto.h):
>>> 
>>> OLD:
>>> 
>>> //  This is a draft class, and may change without notice. It is disabled
>>> in
>>> //  stable builds by default. If you use this in applications, please ask
>>> //  for it to be pushed to stable state. Use --enable-drafts to enable.
>>> 
>>> NEW:
>>> 
>>> //  This API is a draft, and may change without notice.
>>> 
>>> From the .GSL script, it seems to indicate that one was built with
>>> project.stable set and the other was not.
>>> 
>>> How do I specify to gsl command line that I want to build with stable set?
>> 
>> 
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] How to specify stable when using GSL

2016-03-25 Thread Osiris Pedroso
In case you prefer this format:

G:\malamute>git diff include\mlm_proto.h
diff --git a/include/mlm_proto.h b/include/mlm_proto.h
index a6b27e5..1e73a2b 100644
--- a/include/mlm_proto.h
+++ b/include/mlm_proto.h
@@ -20,9 +20,7 @@ extern "C" {
 //  @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT
 //  @warning Please edit the model at "api/mlm_proto.api" to make changes.
 //  @interface
-//  This is a draft class, and may change without notice. It is disabled in
-//  stable builds by default. If you use this in applications, please ask
-//  for it to be pushed to stable state. Use --enable-drafts to enable.
+//  This API is a draft, and may change without notice.
 #ifdef MLM_BUILD_DRAFT_API
 #define MLM_PROTO_SUCCESS 200   //
 #define MLM_PROTO_FAILED 300//

On Fri, Mar 25, 2016 at 10:36 AM Osiris Pedroso <opedr...@gmail.com> wrote:

I have made some changes to zproject (Windows building scripts) and
> regenerated zeromq/malamute project with those changes using these steps:
>
> #!/usr/bin/env bash
>
> set -x
>
> ( cd ~/git/zproject && ./autogen.sh && ./configure && make && sudo make 
> install ) || exit 1
>
> #git clone --depth 1 https://github.com/imatix/gsl gsl
> ( cd ~/git/gsl/src && make -j4 && sudo make install ) || exit 1
>
> #git clone --depth 1 https://github.com/zeromq/czmq czmq
> ( cd ~/git/czmq && gsl -target:* project.xml ) || exit 1
>
> #git clone --depth 1 https://github.com/zeromq/malamute malamute
> ( cd ~/git/malamute && gsl -target:* project.xml ) || exit 1
>
> The problem is that I end up with differences between the generated files
> which are note related to my changes to GSL files
> (malamute/include/mlm_proto.h):
>
> OLD:
>
> //  This is a draft class, and may change without notice. It is disabled in// 
>  stable builds by default. If you use this in applications, please ask//  for 
> it to be pushed to stable state. Use --enable-drafts to enable.
>
> NEW:
>
> //  This API is a draft, and may change without notice.
>
> From the .GSL script, it seems to indicate that one was built with
> project.stable set and the other was not.
>
> How do I specify to gsl command line that I want to build with stable set?
> ​
>
​
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] How to specify stable when using GSL

2016-03-25 Thread Osiris Pedroso
I have made some changes to zproject (Windows building scripts) and
regenerated zeromq/malamute project with those changes using these steps:

#!/usr/bin/env bash

set -x

( cd ~/git/zproject && ./autogen.sh && ./configure && make && sudo
make install ) || exit 1

#git clone --depth 1 https://github.com/imatix/gsl gsl
( cd ~/git/gsl/src && make -j4 && sudo make install ) || exit 1

#git clone --depth 1 https://github.com/zeromq/czmq czmq
( cd ~/git/czmq && gsl -target:* project.xml ) || exit 1

#git clone --depth 1 https://github.com/zeromq/malamute malamute
( cd ~/git/malamute && gsl -target:* project.xml ) || exit 1

The problem is that I end up with differences between the generated files
which are note related to my changes to GSL files
(malamute/include/mlm_proto.h):

OLD:

//  This is a draft class, and may change without notice. It is
disabled in//  stable builds by default. If you use this in
applications, please ask//  for it to be pushed to stable state. Use
--enable-drafts to enable.

NEW:

//  This API is a draft, and may change without notice.

>From the .GSL script, it seems to indicate that one was built with
project.stable set and the other was not.

How do I specify to gsl command line that I want to build with stable set?
​
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Where is source file for libczmq.vcxproj?

2016-03-22 Thread Osiris Pedroso
Ok, I modified the gsl file and then I did this:


~/git/zproject$ gsl zproject_vs20xx_props.gsl

When I execute git status now though, it does not show any of the “.props”
file as modified/created.

opedroso@OPLIN:~/git/zproject$ git status
 On branch master Your branch is up-to-date with ‘origin/master’.
Changes not staged for commit:   (use “git add …” to update what will
be committed)   (use “git checkout — …” to discard changes in working
directory)
   modified:   CMakeLists.txt
  modified:   zproject_vs20xx_props.gsl

I noticed that the *.PROP files in czmq are checked in as part of the
project, so I think somebody did a manual step to generate them and then
checked them in.

So, how should I regenerate the .PROP files?
​
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Empty message does not close ZMQ_STREAM socket?

2016-03-22 Thread Osiris Pedroso
If I am completely off here, please let me know (still learning ZMQ):

server.send(id, ZMQ_SNDMORE);
server.send(empty, ZMQ_SNDMORE );

But I don't think you should have the ZMQ_SENDMORE flag on the second
send() call.

Otherwise the message will not be sent, instead waiting for another call to
send() without the flag which only then commits the message to be sent by
underlying code.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Where is source file for libczmq.vcxproj?

2016-03-20 Thread Osiris Pedroso
Oops. Seems like I will also need to change the file
"czmq\builds\msvc\vs2013\libzmq.import.props", since it will be missing the
copy of the newly generated RELEASE PDB after my changes:

So what/where is the source file for this (assumed to be generated)
czmq\builds\msvc\vs2013\libzmq.import.props file?


On Sun, Mar 20, 2016 at 8:19 AM Osiris Pedroso <opedr...@gmail.com> wrote:

> The file *builds/msvc/vs2013/libczmq/libczmq.vcxproj* says it is
> generated by ZPROJECT.
>
> The RELEASE targets for 32 and 64 bit dlls do not currently generate PDBs,
> which prevent easy debugging in Windows in release mode.
>
> The change is simple, adding these lines to libczmq/libczmq.vcxproj:
>
>Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'">
> 
>   true
> 
>   
>Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
> 
>   true
> 
>   
>
> But I don’t know where to make it.
> What/where is the source file for this generated libczmq/libczmq.vcxproj?
> ​
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] 4.1.x Windows Package

2016-03-19 Thread Osiris Pedroso
Not a deal breaker at all. I have setup my GIT area in a windows share and
used Ubuntu to mount using CIFS (replacement for Samba?), so I can build
them on both sides.
Did this just to make sure my changes to the project do not break Linux
builds, which I think should be the minimum requirement for any PR made.

By the end of it, I will have ZPROJECT building and running on Windows as
well... :-)

Thanks for the file names. That makes it much faster to get to a solution
to the problem at hand.

On Wed, Mar 16, 2016 at 5:45 AM Kevin Sapper <kevinsappe...@gmail.com>
wrote:

> There are three files responsible for generating the msvc stuff:
>
> zproject_vs2008.gsl
> <https://github.com/zeromq/zproject/blob/master/zproject_vs2008.gsl>
>
> zproject_vs20xx.gsl
> <https://github.com/zeromq/zproject/blob/master/zproject_vs20xx.gsl>
> zproject_vs20xx_props.gsl
> <https://github.com/zeromq/zproject/blob/master/zproject_vs20xx_props.gsl>
>
>
> The czmq.import.props is generated in zproject_vs20xx.gsl starting from
> line 806.
>
> The code generator we use in zproject is GSL
> <https://github.com/imatix/gsl>. And here it gets tricky for windows
> users because I don't know how or if GSL can be build on windows. The
> easiest way thus would be to run stuff in a Ubuntu VM. I do understand that
> this might be a deal breaker as it takes some time to setup the VM. If that
> is the case you could start by fixing czmq's import.props and appveyor.yml
> and open PRs even though it's generated. I will then make sure the changes
> get applied to zproject. In terms of breaking stuff don't be afraid git and
> github make it very easy to revert commits if necessary.
>
> //Kevin
>
> 2016-03-16 4:03 GMT+01:00 Osiris Pedroso <opedr...@gmail.com>:
>
>> I guess I need a çrash courae on zproject, what files are the source that
>> get generated into what.
>>
>> Should I start looking at zproject itself?
>> For example, what file is the source for that generated
>> czmq\builds\msvc\vs2015\czmq.import.props?
>>
>> I need to understand that before I can proceed.
>>
>> I will be happy to fix the Windows build and even maintain it in the
>> future, but I hate touching stuff and breaking the build for any platform,
>> since I know how hard it is to fix it after the fact.
>>
>> Sent from my iPad. Regularly foiled by autocorrect. But duck it..
>>
>> On Mar 15, 2016, at 17:43, Kevin Sapper <kevinsappe...@gmail.com> wrote:
>>
>> Hi Osiris,
>>
>> fixing the windows builds especially on appveyor would be great, given
>> that there hasn't been a single successful build since they were
>> introduced. There are a lot of contributors that know there way around
>> Linux and in various iterations build very solid buildfiles e.g. for
>> autotools and cmake. The same cannot be said for windows. In that regard
>> the knowledge is spread very thin. Thus it would be great if you could
>> share your findings by opening issues or PRs in the corresponding projects.
>> Any problems that you can bring forward are welcome, if you can deliver the
>> solution as well even better :)
>>
>> Thanks!
>>
>> //Kevin
>>
>> On Di, Mär 15, 2016 at 11:53 , Osiris Pedroso <opedr...@gmail.com> wrote:
>>
>> I have some 20+ years of Windows development under my belt... still a
>> newbie to the zeromq project and to open source volunteering in general
>> though, so take my comments with a grain of salt.
>>
>> I have been fighting the same battle the last month or so.
>>
>> In the process I have updated some of the documentation to add Windows
>> build steps, since they were outdated/incorrect.
>> One thing that I noticed in several of the projects, is that you can run
>> "CMAKE.exe ." in the main directory and get a solution created that you can
>> use to build all tests and the core library as well. The SLN files that are
>> checked in are only for the core library. This is not documented anywhere
>> that I have seen yet. Found by inspection.
>>
>> This and the resistance to hold off on merging pull requests until after
>> they at least build correctly for the platforms we have automated builds
>> setup ends up making Windows a second class citizen.
>> Even though we have automated builds enabled, the Windows build has been
>> broken for quite a while.
>>
>> For example, zeromq/zyre won't link in Windows from source for this
>> target:
>> 1>-- Rebuild All started: Project: perf_local, Configuration:
>> DebugLEXE Win32 --
>>
>> I tracked it down to this line in
>&g

Re: [zeromq-dev] 4.1.x Windows Package

2016-03-15 Thread Osiris Pedroso
I guess I need a çrash courae on zproject, what files are the source that get 
generated into what.

Should I start looking at zproject itself?
For example, what file is the source for that generated 
czmq\builds\msvc\vs2015\czmq.import.props?

I need to understand that before I can proceed.

I will be happy to fix the Windows build and even maintain it in the future, 
but I hate touching stuff and breaking the build for any platform, since I know 
how hard it is to fix it after the fact.

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Mar 15, 2016, at 17:43, Kevin Sapper <kevinsappe...@gmail.com> wrote:
> 
> Hi Osiris,
> 
> fixing the windows builds especially on appveyor would be great, given that 
> there hasn't been a single successful build since they were introduced. There 
> are a lot of contributors that know there way around Linux and in various 
> iterations build very solid buildfiles e.g. for autotools and cmake. The same 
> cannot be said for windows. In that regard the knowledge is spread very thin. 
> Thus it would be great if you could share your findings by opening issues or 
> PRs in the corresponding projects. Any problems that you can bring forward 
> are welcome, if you can deliver the solution as well even better :)
> 
> Thanks!
> 
> //Kevin
> 
>> On Di, Mär 15, 2016 at 11:53 , Osiris Pedroso <opedr...@gmail.com> wrote:
>> I have some 20+ years of Windows development under my belt... still a newbie 
>> to the zeromq project and to open source volunteering in general though, so 
>> take my comments with a grain of salt.
>> 
>> I have been fighting the same battle the last month or so.
>> 
>> In the process I have updated some of the documentation to add Windows build 
>> steps, since they were outdated/incorrect.
>> One thing that I noticed in several of the projects, is that you can run 
>> "CMAKE.exe ." in the main directory and get a solution created that you can 
>> use to build all tests and the core library as well. The SLN files that are 
>> checked in are only for the core library. This is not documented anywhere 
>> that I have seen yet. Found by inspection.
>> 
>> This and the resistance to hold off on merging pull requests until after 
>> they at least build correctly for the platforms we have automated builds 
>> setup ends up making Windows a second class citizen.
>> Even though we have automated builds enabled, the Windows build has been 
>> broken for quite a while.
>> 
>> For example, zeromq/zyre won't link in Windows from source for this target:
>> 1>-- Rebuild All started: Project: perf_local, Configuration: DebugLEXE 
>> Win32 --
>> 
>> I tracked it down to this line in czmq\builds\msvc\vs2015\czmq.import.props:
>>   CZMQ_STATIC;%(PreprocessorDefinitions)
>> The line above tells the solution to use CZMQ_STATIC library for ltcg 
>> linkage, which should be dynamic, since all symbols are defined with 
>> __imp_XXX preamble indicating they come from a DLLIMPORT directive in the 
>> code.
>> 
>> The file says it is generated by zproject and should not be hand edited:
>> 
>> # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY 
>> #
>> # Please refer to the README for information about making permanent changes. 
>> #
>> 
>> By the way, this message would be greatly enhanced if it also listed which 
>> was the source file being processed when it was generated. By the way, what 
>> README is it talking about? This project's, zproject's, the one in the same 
>> directory as this file?
>> 
>> This is the final line in that build for all targets in the Zyre project:
>> == Build: 18 succeeded, 48 failed, 18 up-to-date, 0 skipped 
>> ==
>> From the error log, they seem to all be related to this one problem above.
>> 
>> Earlier this week I proposed to have a build tagged when they complete 
>> successfully. Same approach could be used to tag when a build successfully 
>> runs the automated tests. Both of these would give a good indication on 
>> where to focus efforts to fix broken builds/code allowing one to at least 
>> start from a working base for each supported platform.
>> The idea reception was lukewarm at best.
>> 
>> 
>>> On Tue, Mar 15, 2016 at 4:31 AM Peter Ritter <ritter@gmail.com> wrote:
>>> HI Pieter
>>> 
>>> 
>>> >>My advice would be to build it yourself.
&g

[zeromq-dev] zgossip_test_method crash on exit in Windows

2016-03-15 Thread Osiris Pedroso
I am running the zgossip_test_method which can be found at the end of this
page: http://api.zeromq.org/czmq3-0:zgossip

The test runs without any problems then asserts on exit.

The code where it fails in terminate():
//  First attempt to terminate the context.
if (!restarted) {
//  First send stop command to sockets so that any blocking
calls
//  can be interrupted. If there are no sockets we can ask
reaper
//  thread to stop.
for (sockets_t::size_type i = 0; i != sockets.size (); i++)
*line 177 ==> sockets [i]->stop ();*
if (sockets.empty ())
reaper->stop ();
}
ends up calling send() to send the stop command:
#elif defined ZMQ_HAVE_WINDOWS
unsigned char dummy = 0;
int nbytes = ::send (w, (char *) , sizeof (dummy), 0);
*Line 187 ==>wsa_assert (nbytes != SOCKET_ERROR);*
zmq_assert (nbytes == sizeof (dummy));


And the stack:
  KernelBase.dll!_RaiseException@16 () Unknown
> libzmq.dll!zmq::zmq_abort(const char * errmsg_) Line 81 C++
  libzmq.dll!zmq::signaler_t::send() Line 187 C++
  libzmq.dll!zmq::mailbox_t::send(const zmq::command_t & cmd_) Line 67 C++
  libzmq.dll!zmq::ctx_t::send_command(unsigned int tid_, const
zmq::command_t & command_) Line 419 C++
  libzmq.dll!zmq::object_t::send_stop() Line 202 C++
  libzmq.dll!zmq::socket_base_t::stop() Line 239 C++
  libzmq.dll!zmq::ctx_t::terminate() Line 177 C++
  libzmq.dll!zmq_ctx_term(void * ctx_) Line 173 C++
  libzmq.dll!zmq_term(void * ctx_) Line 237 C++
  libczmq.dll!zsys_shutdown() Line 253 C++
  libczmq.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void *
lpreserved) Line 416 C
  libczmq.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long
dwReason, void * lpreserved) Line 522 C
  libczmq.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason,
void * lpreserved) Line 472 C
  ntdll.dll!_LdrpCallInitRoutine@16 () Unknown
  ntdll.dll!_LdrShutdownProcess@0 () Unknown
  ntdll.dll!_RtlExitUserProcess@4 () Unknown
  kernel32.dll!_ExitProcessStub@4 () Unknown
  msvcr120d.dll!___crtExitProcess () Unknown
  msvcr120d.dll!__unlockexit () Unknown
  msvcr120d.dll!_exit () Unknown
  gossip.exe!__tmainCRTStartup() Line 662 C

Any insights appreciated.

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] 4.1.x Windows Package

2016-03-15 Thread Osiris Pedroso
I have some 20+ years of Windows development under my belt... still a
newbie to the zeromq project and to open source volunteering in general
though, so take my comments with a grain of salt.

I have been fighting the same battle the last month or so.

In the process I have updated some of the documentation to add Windows
build steps, since they were outdated/incorrect.
One thing that I noticed in several of the projects, is that you can run
"CMAKE.exe ." in the main directory and get a solution created that you can
use to build all tests and the core library as well. The SLN files that are
checked in are only for the core library. This is not documented anywhere
that I have seen yet. Found by inspection.

This and the resistance to hold off on merging pull requests until after
they at least build correctly for the platforms we have automated builds
setup ends up making Windows a second class citizen.
Even though we have automated builds enabled, the Windows build has been
broken for quite a while.

For example, zeromq/zyre won't link in Windows from source for this target:
1>-- Rebuild All started: Project: perf_local, Configuration: DebugLEXE
Win32 --

I tracked it down to this line in czmq\builds\msvc\vs2015\czmq.import.props:
  CZMQ_STATIC*;%(PreprocessorDefinitions)
The line above tells the solution to use CZMQ_STATIC library for ltcg
linkage, which should be dynamic, since all symbols are defined with
__imp_XXX preamble indicating they come from a DLLIMPORT directive in the
code.

The file says it is generated by zproject and should not be hand edited:

# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT
EXPERIMENTALLY #
# Please refer to the README for information about making permanent
changes. #

By the way, this message would be greatly enhanced if it also listed which
was the source file being processed when it was generated. By the way, what
README is it talking about? This project's, zproject's, the one in the same
directory as this file?

This is the final line in that build for all targets in the Zyre project:
== Build: *18 succeeded*, *48 failed*, 18 up-to-date, 0 skipped
==
>From the error log, they seem to all be related to this one problem above.

Earlier this week I proposed to have a build tagged when they complete
successfully. Same approach could be used to tag when a build successfully
runs the automated tests. Both of these would give a good indication on
where to focus efforts to fix broken builds/code allowing one to at least
start from a working base for each supported platform.
The idea reception was lukewarm at best.


On Tue, Mar 15, 2016 at 4:31 AM Peter Ritter  wrote:

> HI Pieter
>
>
> >>My advice would be to build it yourself.
>
> Interesting advice. Does this imply anything about future windows support?
> I'm also trying to support both Windows and Linux with my own project and I
> have a lot of trouble getting various  libraries to run  on windows because
> people just don't support windows as well anymore. I have version 4.0.4
> installed but there is no Visual Studio project  to build it myself. Is
> there a 'Build Guide' somewhere? Otherwise it is not clear what compiler
> settings and macro definitions are required to build this.
>
> I'm happy with 4.0.4 for now because it does the job, so I have no
> immediate need to upgrade, but I would like to get rid of the .DLL and link
> to a .lib only, because the DLL just gets in the way.
>
> Thanks, Peter
>
> PS: ZeroMQ was a real life safer for me. Just being able to debug client
> server applications from within a single executable is awsome and worth its
> weight in gold. . So thanks for all that!
>
> On Mon, Mar 14, 2016 at 5:17 PM, Pieter Hintjens  wrote:
>
>> My advice would be to build it yourself.
>>
>> On Mon, Mar 14, 2016 at 8:31 AM, Mark Studenka 
>> wrote:
>> > Hello,
>> >
>> > I've noticed that there doesn't seem to be a current 4.1.4 Window
>> installer
>> > package available on the website.
>> >
>> > I'm attempting to upgrade to the latest stable release.  Currently I'm
>> > building my own packages on the unix based platforms but use the
>> pre-built
>> > packages for Windows.  Does a package exist and the web pages haven't
>> been
>> > updated or do I need to build myself if I'd like a current Windows
>> package?
>> >
>> > Thanks for any help.
>> >
>> > -mark
>> >
>> >
>> > ___
>> > zeromq-dev mailing list
>> > zeromq-dev@lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> 

[zeromq-dev] NetMQ and Jetbrains

2016-03-15 Thread Osiris Pedroso
If I decide to use NetMQ in my commercial project, am I required to get a
JetBrains license?

Why is JetBrains delivered as part of NetMQ?

Thanks
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Thread safe Pub/Sub and Multicast

2016-03-12 Thread Osiris Pedroso
You say this:

   - [Radio/Dish are] Thread safe, you can send and receive messages from
   multiple threads, so for publisher you now don't need internal device to
   publish from multiple threads and with subscriber you can use it as load
   balancer.

So by extension, it means that a Radio/Dish socket can be shared by
multiple threads. Correct?

Is it a problem of regular PUB/SUB that it can not publish messages from
multiple threads?
I don't remember reading about this in The Guide.

Actually please correct me if I am wrong, but I believed that all ZeroMQ
queues could be used by multiple threads without regards to thread safety,
meaning each thread specific ZeroMQ socket would take care of serializing
the messages being posted to the queue without any message loss due to
threading issues.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Adding a last-good tag to commits

2016-03-11 Thread Osiris Pedroso
I had the idea to somehow mark a commit as the last known good build for
each targets which we have Travis-CI enabled.
Basically the Travis-Ci script would mark the repository only if the build
completed with no errors.

Same idea could be used to mark the last commit for which all automated
tests were successfully run.

Both of these would allow to track down exact PRs that broke something and
then let one analyze how that one specific change in next commit can be
fixed.

I inquired the git mailing list (g...@vger.kernel.org) and they suggested
using a git tag. The tag could encode any other information such as the
OS/compiler version used to do the build with.

This would also help when selecting to make a new master, since the maker
could be aware for which OSs this master would compile/run out of the box
without a problem.

I believe this to be worth pursuing.

Let me know what you think.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] How to build CZMQ in Windows?

2016-03-10 Thread Osiris Pedroso
Got it all from masters.
I got further, but still have problems linking Zyre (all the DLL targets)
using VS2013 solutions.


On Wed, Mar 9, 2016 at 5:36 PM Pieter Hintjens <p...@imatix.com> wrote:

> I'd recommend taking all github masters unless you have a specific
> reason to use an older release.
>
> On Thu, Mar 10, 2016 at 12:33 AM, Osiris Pedroso <opedr...@gmail.com>
> wrote:
> > From Johan email above:
> > CZMQ:
> > - download czmq 3.0.2 (latest stable release, which will be used in our
> > project): https://github.com/zeromq/czmq/archive/v3.0.2.zip
> > - unpack and rename v3.0.2 folder to “czmq” (important to ensure
> referenced
> > paths in other builds are set correctly)
> > - navigate to czmq/builds/msvc/vs2013 and open czmq.sln in VS2013.
> > - select Win32 or x64 target (preferably the same as the other libs).
> > - build solution.
> >
> > On Wed, Mar 9, 2016 at 2:52 PM Pieter Hintjens <p...@imatix.com> wrote:
> >>
> >> Do you maybe have two versions of CZMQ? Zyre cannot be building and
> >> failing just on those two functions unless it's using an old version
> >> of CZMQ.
> >>
> >> On Wed, Mar 9, 2016 at 10:41 PM, Osiris Pedroso <opedr...@gmail.com>
> >> wrote:
> >> > Using Johan instructions above, I got the code in ZIP form.
> >> >
> >> > I see that these functions exist in the CZMQ source, but Zyre
> >> > compilation
> >> > don't see their definition/types.
> >> >
> >> > I am stuck right now.
> >> >
> >> > On Wed, Mar 9, 2016 at 2:19 PM Pieter Hintjens <p...@imatix.com> wrote:
> >> >>
> >> >> Make sure you're using CZMQ from github master; these functions were
> >> >> added recently.
> >> >>
> >> >> On Wed, Mar 9, 2016 at 3:50 PM, Osiris Pedroso <opedr...@gmail.com>
> >> >> wrote:
> >> >> > Thanks Johan. That helped me to get CZMQ built.
> >> >> > I am interested in building Zyre as well, so thanks for the steps.
> >> >> >
> >> >> > But building Zyre from master.zip currently fails with these errors
> >> >> > using
> >> >> > the steps above:
> >> >> > ..\..\..\..\src\zyre_node.c(166): error C3861: 'zsys_ipv6':
> >> >> > identifier
> >> >> > not
> >> >> > found
> >> >> > ..\..\..\..\src\zyre_node.c(167): error C3861: 'zsys_ipv6_address':
> >> >> > identifier not found
> >> >> >
> >> >> > CZMQ defines it, but seems like Zyre does not see it.
> >> >> >
> >> >> > Are there any other configuration steps needed maybe?
> >> >> >
> >> >> >
> >> >> > On Wed, Mar 9, 2016 at 5:09 AM Pieter Hintjens <p...@imatix.com>
> wrote:
> >> >> >>
> >> >> >> This is great.
> >> >> >>
> >> >> >> It's gotten simpler in libzmq master as libsodium is an optional
> >> >> >> dependency.
> >> >> >>
> >> >> >> On Wed, Mar 9, 2016 at 1:03 PM, Johan Philips
> >> >> >> <johan.phil...@kuleuven.be>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >> On 09 Mar 2016, at 11:52, Pieter Hintjens <p...@imatix.com>
> wrote:
> >> >> >> >>
> >> >> >> >> It's in builds/msvc, and looks a lot like the libzmq build
> >> >> >> >> scripts.
> >> >> >> >> We
> >> >> >> >> generate this from project.
> >> >> >> >
> >> >> >> > Indeed. We usually give our Windows users following “HOWTO” to
> >> >> >> > compile
> >> >> >> > zeromq projects (such as czmq and zyre) in visual studio 2013.
> >> >> >> >
> >> >> >> > Libsodium:
> >> >> >> > - download libsodium:
> >> >> >> > https://github.com/jedisct1/libsodium/archive/master.zip
> >> >> >> > - unpack and rename “master” folder to “libsodium” (important to
> >> >> >> > ensure
> >> >> >> > referenced paths in other builds are set correctly)
> >> >> >> > - navigate to libsodium/builds/msvc/vs2013 and open
> libsodium.sln
&

[zeromq-dev] How to build CZMQ in Windows?

2016-03-09 Thread Osiris Pedroso
I need instructions on how to build CZMQ in Windows.

I have DevStudio 2013.
I have successfully built libzmq on a parallel dir (g:\libzmq) using CMAKE
steps:
mkdir cmake-make
cd cmake-make
cmake ..

This gives me the following library built:
 g:\> dir/s/b *.lib
g:\libzmq\cmake-make\lib\Debug\libzmq-v120-mt-gd-4_2_0.lib
g:\libzmq\cmake-make\lib\Debug\libzmq-static-v120-mt-sgd-4_2_0.lib

To build CZMQ then I did these steps
 g:\czmq> g:\czmq\builds\msvc\configure.bat
Configuring CZMQ...
Building with libzmq
Building without uuid
Building without systemd
Building without draft API (stable + legacy API)

Attempting to build #1:
==
 g:\czmq> g:\czmq\builds\msvc\vs2013\build.bat
Building without uuid
Building without systemd
Building CZMQ... ()
Platform=x86
Configuration=DynDebug
*** ERROR, build terminated early: see build.log
Build.log indicates that this script cannot be run from main dir.

Attempting to build #2:
==
 g:\czmq\builds\msvc\vs2013> build.bat
Building without uuid
Building without systemd
Building CZMQ... ()
Platform=x86
Configuration=DynDebug
*** ERROR, build terminated early: see build.log (attached)

Attempting to build #3:
=
I also opened the solution file like this:
g:\czmq\builds\msvc\vs2013> czmq.sln

When attempting to build, it compiles but fails with this error:
1>LINK : fatal error LNK1104: cannot open file 'libzmq.lib'

The full output is in the attached Output-Build.txt file (attached).

Appreciate any tips,
Osiris
1>-- Build started: Project: libczmq, Configuration: DebugDLL Win32 
--
1>  ConfigurationType : DynamicLibrary
1>  Configuration : DebugDLL
1>  PlatformToolset   : v120
1>  TargetPath: 
g:\czmq\builds\msvc\vs2013\libczmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libczmq.dll
1>  Will copy g:\czmq\builds\msvc\vs2013\libczmq\..\..\platform.h -> 
g:\czmq\builds\msvc\vs2013\libczmq\..\..\..\..\include\platform.h
1>  Linkage-libzmq: dynamic
1>  1 file(s) copied.
1>  zactor.c
1>  zarmour.c
1>  zcert.c
1>  zcertstore.c
1>  zchunk.c
1>  zclock.c
1>  zconfig.c
1>  zdigest.c
1>  zdir.c
1>  zdir_patch.c
1>  zfile.c
1>  zframe.c
1>  zhash.c
1>  zhashx.c
1>  ziflist.c
1>  zlist.c
1>  zlistx.c
1>  zloop.c
1>  zmsg.c
1>  zpoller.c
1>  zproc.c
1>  zsock.c
1>  zstr.c
1>  ztrie.c
1>  zuuid.c
1>  zauth.c
1>  zbeacon.c
1>  zgossip.c
1>  zmonitor.c
1>  zproxy.c
1>  zrex.c
1>  zsys.c
1>  zgossip_msg.c
1>  zauth_v2.c
1>  zbeacon_v2.c
1>  zctx.c
1>  zmonitor_v2.c
1>  zmutex.c
1>  zproxy_v2.c
1>  zsocket.c
1>  zsockopt.c
1>  zthread.c
1>LINK : fatal error LNK1104: cannot open file 'libzmq.lib'
== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==


build.log
Description: Binary data
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] LIBZMQ license

2016-03-04 Thread Osiris Pedroso
Hi Luca,

That makes sense.

Thanks,
Osiris

Sent from my iPad. Regularly foiled by autocorrect. But duck it..

> On Mar 4, 2016, at 16:27, Luca Boccassi <luca.bocca...@gmail.com> wrote:
> 
>> On Fri, 2016-03-04 at 12:37 +0000, Osiris Pedroso wrote:
>> The file COPYING in libzmq indicates that liqzmq is licensed under
>> GPLv3. There is no mention to a statically linked exception.
>> 
>> 
>> The ZeroMQ site licensing page indicates that it is "GPLv3 plus
>> a statically linking exception". But this is not stated anywhere in
>> the code itself.
>> 
>> 
>> Also most source files also in their headers reference GPLv3 but there
>> is no mention to statically linked exception.
>> 
>> 
>> Pieter, should you create a LICENSING file or edit the COPYING file to
>> state that the Statically linked exception is in place?
>> 
>> 
>> Also, the licensing page proposes to move it to MPL v2 license.
>> 
>> 
>> I second that motion.
>> 
>> 
>> Can this also be taken care and update the COPYING file to indicate
>> this change has taken place?
>> 
>> 
>> My company is starting to dot the i's and this poped up.
> 
> Hi,
> 
> As far as I understand, I think it's LGPL3 (linking exception at the
> bottom): https://github.com/zeromq/libzmq/blob/master/COPYING.LESSER
> 
> Kind regards,
> Luca Boccassi
> 
> 
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] LIBZMQ license

2016-03-04 Thread Osiris Pedroso
The file COPYING in libzmq indicates that liqzmq is licensed under GPLv3.
There is no mention to a statically linked exception.

The ZeroMQ site licensing page  indicates
that it is "GPLv3 plus a statically linking exception". But this is not
stated anywhere in the code itself.

Also most source files also in their headers reference GPLv3 but there is
no mention to statically linked exception.

Pieter, should you create a LICENSING file or edit the COPYING file to
state that the Statically linked exception is in place?

Also, the licensing page proposes to move it to MPL v2 license.

I second that motion.

Can this also be taken care and update the COPYING file to indicate this
change has taken place?

My company is starting to dot the i's and this poped up.

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Talking about Zyre

2016-03-04 Thread Osiris Pedroso
I know Zyre does work on a processes running on a local machine.

Does it also work on network segments?

If so, can it be tailored to only search so many segments away using TTL in
TCP/IP packets?

Thanks,
Osiris
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] State of libzmq versioning

2016-02-29 Thread Osiris Pedroso
Hi Arnaud,

The "Edit on GitHub" (top right link) which links to "
https://github.com/zeromq/pyre/blob/doc/docs/index.rst; on page "
https://pyre.readthedocs.org/en/latest/; is broken.
Fixing it would be best way to get people contributing to the documentation
effort.

Thanks,
Osiris

On Mon, Feb 29, 2016 at 3:55 AM Arnaud Loonstra  wrote:

>
> I just added readthedocs to pyre as well.
>
> http://pyre.rtfd.org
>
> It's minimal but it's nice though.
>
> Rg,
>
> Arnaud
>
> On 2016-02-17 18:48, Pieter Hintjens wrote:
> > We could use this, yes.
> >
> > Volunteers? :)
> >
> > On Wed, Feb 17, 2016 at 3:45 PM, Michel Pelletier
> >  wrote:
> >> Read the docs is fantastic, I used it for pyczmq and it works great.
> >> Also
> >> it's not just software or a hosting service, the author (a local
> >> here in my
> >> neck of the woods) hosts "write the docs" conferences focusing on
> >> writing
> >> and producing good documentation:
> >>
> >> http://www.writethedocs.org/
> >>
> >> All together it's a powerful documentation ecosystem.
> >>
> >> -Michel
> >>
> >> On Wed, Feb 17, 2016 at 6:17 AM, Pieter Hintjens 
> >> wrote:
> >>>
> >>> We have generators of various kinds: gitdown, mkman, which zproject
> >>> uses/plugs into. The commonality is text files that turn into man
> >>> pages and then various other formats that can be sent anywhere. I
> >>> don't think we need to *standardise* so much as decide on a format,
> >>> a
> >>> host, and a safe way to upload after successful CI builds. We can
> >>> have
> >>> many of these.
> >>>
> >>> On Wed, Feb 17, 2016 at 12:05 PM, Arnaud Loonstra
> >>> 
> >>> wrote:
> >>> > Perhaps we can standardise on this? Perhaps even include some
> >>> > generators for it in zproject?
> >>> > I was starting to use Sphinx for Pyre as well. Now using it for
> >>> > multiple projects. I'm not familiar with how it works with other
> >>> > languages but for Python it's great.
> >>> >
> >>> > On 2016-02-17 10:39, Doron Somech wrote:
> >>> >> Take a look at readthedocs.org [9], it is what NetMQ is using
> >>> and
> >>> >> completely automated. You manage the docs in the git repository.
> >>> >>
> >>> >> On Wed, Feb 17, 2016 at 10:41 AM, Pieter Hintjens  >>> >> [10]>
> >>> >> wrote:
> >>> >>
> >>> >>> Hmm, the tools we use to build the online docs are old and
> >>> creaky,
> >>> >>> and
> >>> >>> date from long before we had neat CI automation. Meaning, we
> >>> update
> >>> >>> the api site manually.
> >>> >>>
> >>> >>> Im doing that now. I think its time we look at pushing this
> >>> >>> directly
> >>> >>> to github pages, from Travis.
> >>> >>>
> >>> >>> On Wed, Feb 17, 2016 at 12:47 AM, Mario Steinhoff
> >>> >>>  wrote:
> >>> >>> > Hi everyone,
> >>> >>> >
> >>> >>> > I am a bit confused about the available information on libzmq
> >>> >>> versions.
> >>> >>> >
> >>> >>> > The page at api.zeromq.org [2] says that we have:
> >>> >>> >
> >>> >>> > - 4.2 (master)
> >>> >>> > - 4.1 (rc)
> >>> >>> > - 4.0 (stable)
> >>> >>> > - 3.2 (stable)
> >>> >>> >
> >>> >>> > On the download page 4.0 is missing:
> >>> >>> >
> >>> >>> > - a version-less master which "should be stable almost all
> >>> the
> >>> >>> time" (4.2?)
> >>> >>> > - 4.1.4 ("stable")
> >>> >>> > - 3.2.5 ("legacy stable")
> >>> >>> >
> >>> >>> > In libzmq, the NEWS file on master seems to be outdated (last
> >>> >>> update
> >>> >>> > in 2014). The doc folder in libzmq seems to be maintained but
> >>> not
> >>> >>> in
> >>> >>> > sync with api.zeromq.org [3] (I checked today and some
> >>> changes
> >>> >>> from the
> >>> >>> > last commit in that folder are not present on the site).
> >>> >>> >
> >>> >>> > There are also maintained stabilization forks as per C4.1 for
> >>> >>> libzmq,
> >>> >>> > e.g. zeromq4-x (which contains 4.0?), 4-1, and 3-x (which
> >>> >>> contains
> >>> >>> > 3.2?).
> >>> >>> >
> >>> >>> > And then there is this article: http://hintjens.com/blog:85
> >>> [4]
> >>> >>> which
> >>> >>> > suggests in a very compelling way that software versions suck
> >>> and
> >>> >>> to
> >>> >>> > ditch them altogether (yes I agree) but I cant find those
> >>> SBOMs
> >>> >>> > anywhere so I assume that experiment did not went very far.
> >>> >>> >
> >>> >>> > With all this, whats the current status on libzmq versioning?
> >>> >>> >
> >>> >>> > Am I understanding right that:
> >>> >>> >
> >>> >>> > - The libzmq repository is always the latest and greatest,
> >>> and
> >>> >>> 4.2
> >>> >>> > looks like the last version Ill ever need™, its always stable
> >>> >>> and
> >>> >>> > follows the raw-draft-stable-deprecated process so its also
> >>> >>> always
> >>> >>> > backwards compatible.
> >>> >>> >
> >>> >>> > - Stable releases are maintained for 3.2, 4.0, and 4.1 and
> >>> >>> sometimes
> >>> >>> > bugfixes get backported from 4.2.
> >>> >>> >
> >>> >>> > - Release notes are only maintained for 

Re: [zeromq-dev] odd error from pyzmq

2016-02-28 Thread Osiris Pedroso
So happy I was able to help somebody with a ZeroMQ problem.
Linus was right: With enough eyeballs, all bugs are shallow

On Fri, Feb 26, 2016 at 4:34 PM Jerry Scharf <sch...@lagunawayconsulting.com>
wrote:

> Osiris,
>
> (slap forehead with palm) That explains it... thanks for the quick help.
>
>
> jerry
>
>
> On 02/26/2016 11:59 AM, Osiris Pedroso wrote:
>
> Isn't the problem that both sides are binding?
> I believe one side should bind, the other should connect.
>
> On Fri, Feb 26, 2016 at 1:15 PM Jerry Scharf <
> sch...@lagunawayconsulting.com> wrote:
>
>> Hi,
>>
>> That's not it. I added a gethostbyname to the code, that works but the
>> bind still fails. I did a simple socket connect to the host/port in python
>> and that works fine (no error, netstat shows the connection.)
>>
>> I think the code is pretty generic, I tried to keep it as simple as
>> possible to start with.
>>
>> Here's master (client) side code:
>>
>> cmdsock = zc.socket(zmq.REQ)
>> evsock = zc.socket(zmq.SUB)
>>
>>
>> cmdport = 10011
>> subport = 10012
>>
>> hostip = socket.gethostbyname(hostname)
>> evconn = "tcp://{}:{}".format(hostip, subport)
>> evsock.bind(evconn)
>> cmdconn = "tcp://{}:{}".format(hostname, cmdport)
>> cmdsock.bind(cmdconn)
>>
>>
>> here's the listener side code
>>
>> mzcontext = zmq.Context()
>>
>> rrportnum = 10011
>> psportnum = 10012
>>
>> rrsock = mzcontext.socket(zmq.REP)
>> rrsockstr = "tcp://*:{0}".format(rrportnum)
>> rrsock.bind(rrsockstr)
>>
>> pssock = mzcontext.socket(zmq.PUB)
>> pssock.bind("tcp://*:{0}".format(psportnum))
>>
>>
>>
>> On 02/26/2016 12:16 AM, MinRK wrote:
>>
>> Typically, with bind you want an IP address. Often a domain works, but it
>> requires that zeromq can resolve that domain to a *local* IP address of
>> the machine. This won’t work, for instance, if your raspberry pi is behind
>> a router. You can listen on all IPs by using 'tcp://*:10011'.
>>
>> -MinRK
>>
>> On Fri, Feb 26, 2016 at 1:11 AM, Jerry Scharf <
>> sch...@lagunawayconsulting.com> wrote:
>>
>>> Hi,
>>>
>>> I'm working further into things. I have the raspberry pi side working
>>> happily and am now trying to get the ubuntu master side working. I am
>>> running python 3.4 and did the install from pip with no errors. (I am
>>> running python2.7 on the pi side to get spi routines...)
>>>
>>> The socket create works fine, but wen I try to bind to my host as a
>>> fully qualified hostname:port (in this case
>>> "bank0pi.lt.in.finsix.com:10011" I get this stackdump:
>>>
>>> File "/home/jerry/finsix/marathon/master/simple/m_zmq.py", line 29, in
>>> bank_setup
>>> evsock.bind(evconn)
>>>File "zmq/backend/cython/socket.pyx", line 487, in
>>> zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5156)
>>> File "zmq/backend/cython/checkrc.pxd", line 25, in
>>> zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535)
>>> zmq.error.ZMQError: No such device
>>>
>>> What device is it looking for?? I check with host and the name resolves
>>> fine.
>>>
>>> tia,
>>> jerry
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>> ​
>>
>>
>> ___
>> zeromq-dev mailing 
>> listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
> ___
> zeromq-dev mailing 
> listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] odd error from pyzmq

2016-02-26 Thread Osiris Pedroso
Cut and paste always gets me too... :-)

On Fri, Feb 26, 2016 at 1:59 PM Osiris Pedroso <opedr...@gmail.com> wrote:

> Isn't the problem that both sides are binding?
> I believe one side should bind, the other should connect.
>
> On Fri, Feb 26, 2016 at 1:15 PM Jerry Scharf <
> sch...@lagunawayconsulting.com> wrote:
>
>> Hi,
>>
>> That's not it. I added a gethostbyname to the code, that works but the
>> bind still fails. I did a simple socket connect to the host/port in python
>> and that works fine (no error, netstat shows the connection.)
>>
>> I think the code is pretty generic, I tried to keep it as simple as
>> possible to start with.
>>
>> Here's master (client) side code:
>>
>> cmdsock = zc.socket(zmq.REQ)
>> evsock = zc.socket(zmq.SUB)
>>
>>
>> cmdport = 10011
>> subport = 10012
>>
>> hostip = socket.gethostbyname(hostname)
>> evconn = "tcp://{}:{}".format(hostip, subport)
>> evsock.bind(evconn)
>> cmdconn = "tcp://{}:{}".format(hostname, cmdport)
>> cmdsock.bind(cmdconn)
>>
>>
>> here's the listener side code
>>
>> mzcontext = zmq.Context()
>>
>> rrportnum = 10011
>> psportnum = 10012
>>
>> rrsock = mzcontext.socket(zmq.REP)
>> rrsockstr = "tcp://*:{0}".format(rrportnum)
>> rrsock.bind(rrsockstr)
>>
>> pssock = mzcontext.socket(zmq.PUB)
>> pssock.bind("tcp://*:{0}".format(psportnum))
>>
>>
>>
>> On 02/26/2016 12:16 AM, MinRK wrote:
>>
>> Typically, with bind you want an IP address. Often a domain works, but it
>> requires that zeromq can resolve that domain to a *local* IP address of
>> the machine. This won’t work, for instance, if your raspberry pi is behind
>> a router. You can listen on all IPs by using 'tcp://*:10011'.
>>
>> -MinRK
>>
>> On Fri, Feb 26, 2016 at 1:11 AM, Jerry Scharf <
>> sch...@lagunawayconsulting.com> wrote:
>>
>>> Hi,
>>>
>>> I'm working further into things. I have the raspberry pi side working
>>> happily and am now trying to get the ubuntu master side working. I am
>>> running python 3.4 and did the install from pip with no errors. (I am
>>> running python2.7 on the pi side to get spi routines...)
>>>
>>> The socket create works fine, but wen I try to bind to my host as a
>>> fully qualified hostname:port (in this case
>>> "bank0pi.lt.in.finsix.com:10011" I get this stackdump:
>>>
>>> File "/home/jerry/finsix/marathon/master/simple/m_zmq.py", line 29, in
>>> bank_setup
>>> evsock.bind(evconn)
>>>File "zmq/backend/cython/socket.pyx", line 487, in
>>> zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5156)
>>> File "zmq/backend/cython/checkrc.pxd", line 25, in
>>> zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535)
>>> zmq.error.ZMQError: No such device
>>>
>>> What device is it looking for?? I check with host and the name resolves
>>> fine.
>>>
>>> tia,
>>> jerry
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>> ​
>>
>>
>> ___
>> zeromq-dev mailing 
>> listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] odd error from pyzmq

2016-02-26 Thread Osiris Pedroso
Isn't the problem that both sides are binding?
I believe one side should bind, the other should connect.

On Fri, Feb 26, 2016 at 1:15 PM Jerry Scharf 
wrote:

> Hi,
>
> That's not it. I added a gethostbyname to the code, that works but the
> bind still fails. I did a simple socket connect to the host/port in python
> and that works fine (no error, netstat shows the connection.)
>
> I think the code is pretty generic, I tried to keep it as simple as
> possible to start with.
>
> Here's master (client) side code:
>
> cmdsock = zc.socket(zmq.REQ)
> evsock = zc.socket(zmq.SUB)
>
>
> cmdport = 10011
> subport = 10012
>
> hostip = socket.gethostbyname(hostname)
> evconn = "tcp://{}:{}".format(hostip, subport)
> evsock.bind(evconn)
> cmdconn = "tcp://{}:{}".format(hostname, cmdport)
> cmdsock.bind(cmdconn)
>
>
> here's the listener side code
>
> mzcontext = zmq.Context()
>
> rrportnum = 10011
> psportnum = 10012
>
> rrsock = mzcontext.socket(zmq.REP)
> rrsockstr = "tcp://*:{0}".format(rrportnum)
> rrsock.bind(rrsockstr)
>
> pssock = mzcontext.socket(zmq.PUB)
> pssock.bind("tcp://*:{0}".format(psportnum))
>
>
>
> On 02/26/2016 12:16 AM, MinRK wrote:
>
> Typically, with bind you want an IP address. Often a domain works, but it
> requires that zeromq can resolve that domain to a *local* IP address of
> the machine. This won’t work, for instance, if your raspberry pi is behind
> a router. You can listen on all IPs by using 'tcp://*:10011'.
>
> -MinRK
>
> On Fri, Feb 26, 2016 at 1:11 AM, Jerry Scharf <
> sch...@lagunawayconsulting.com> wrote:
>
>> Hi,
>>
>> I'm working further into things. I have the raspberry pi side working
>> happily and am now trying to get the ubuntu master side working. I am
>> running python 3.4 and did the install from pip with no errors. (I am
>> running python2.7 on the pi side to get spi routines...)
>>
>> The socket create works fine, but wen I try to bind to my host as a
>> fully qualified hostname:port (in this case
>> "bank0pi.lt.in.finsix.com:10011" I get this stackdump:
>>
>> File "/home/jerry/finsix/marathon/master/simple/m_zmq.py", line 29, in
>> bank_setup
>> evsock.bind(evconn)
>>File "zmq/backend/cython/socket.pyx", line 487, in
>> zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5156)
>> File "zmq/backend/cython/checkrc.pxd", line 25, in
>> zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535)
>> zmq.error.ZMQError: No such device
>>
>> What device is it looking for?? I check with host and the name resolves
>> fine.
>>
>> tia,
>> jerry
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> ​
>
>
> ___
> zeromq-dev mailing 
> listzeromq-dev@lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Building ZGuide

2016-02-23 Thread Osiris Pedroso
Thanks guys,

That was very helpful.
I was finally able to do it.

Just sent a pull request, so next person will have an easier time.

Thanks again,
Osiris

On Mon, Feb 22, 2016 at 5:26 PM Luca Boccassi <luca.bocca...@gmail.com>
wrote:

> On 22 February 2016 at 21:57, Osiris Pedroso <opedr...@gmail.com> wrote:
> > I am trying to build ZGuide.
> >
> > Selfish reason is that I am using same ascii diagrams to describe my
> > architecture and would like to use the same toolset to generate the
> > graphics/pdf, since I like ZGuide's graphics so much.
> >
> > I have an up to date Ubuntu 14.04 LTS VM that I am running.
> > I got the ZGuide source from git://github.com/imatix/zguide.
> >
> > I found the file zguide/bin/INSTALL and I am trying to install those
> > packages, but several fail since Ubuntu software distribution does not
> know
> > of them.
> >
> > $ sudo apt-get install rasterizer
> > E: Unable to locate package rasterizer
> >
> > Same error for:
> >
> > pygmentize
> > docbook2ps
> > ps2pdf
> > rasterizer (repeated so a nice list)
> >
> >
> > Any idea where I should get them from?
>
> Hi,
>
> On Ubuntu's (and Debian's) website you can search for package content,
> it's a very convenient tool. It will match filenames.
>
> For example, it looks like /usr/bin/rasterizer comes from libbatik-java:
>
>
> http://packages.ubuntu.com/search?suite=trusty=all=any=rasterizer=contents
>
> /usr/bin/pygmentize -> python-pygments
> /usr/bin/docbook2ps -> docbook-utils
> /usr/bin/ps2pdf -> ghostscript
>
> Kind regards,
> Luca Boccassi
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


  1   2   >