[zeromq-dev] malamute CMake & eclipse & service blobs

Osiris Pedroso opedroso at gmail.com
Wed Apr 6 23:47:19 CEST 2016

On the very last section of this page (https://github.com/zeromq/zproject)
there is this section (
It spells out the rules.

There is nobody in control, there is no approval.

Once you make a change that you like, create a PULL REQUEST in github.
Since you cannot check in directly to the zeromq/xxxx, first you clone
zeromq/xxxx to matjias/xxxx, them create a branch in your matjias/xxxx, set
its upstream to be zeromq/xxxx and place just your changes there, commit
and push that change to that branch of your repository.
Then make the PULL REQUEST.
Somebody with write access to zeromq/xxxx project will merge it (the merge
happens within minutes), sometimes even before your ci_build.sh completes
building sometimes, which is good and bad, because you may end up breaking
the master. So wait until your continuous integration build successfully
completes before placing the PR.
But the same ease that the merge happens, if the change is deemed unfit, it
is removed.

I myself worry much about breaking the master, because from my nature that
is the worst sin a developer can commit.
Not so much in zeromq land.

In his C4 manifesto (http://rfc.zeromq.org/spec:22), Pieter Hintjens spells
out the rules formally and you are invited to read it.

If I understand Pieter's thinking, it is that the larger the community
contributing, the more successful the projects will be because there will
be more interest and it will grow organically and self -evolve into
something useful for lots of people.
It also takes advantage of Linus Law: "Given a large enough beta-tester and
co-developer base, almost every problem will be characterized quickly and
the fix will be obvious to someone."
Somewhat as a parallel from the biological world, where there are billions
of genes in a DNA, we only see a few thousand, know how to change a few
hundred but it all seems to work most of the time.

You should read The Guide, if not done yet:
I could not put it down once I started.

PS: Please find attached a ZIP files with the changes as far as I was able
to take them. There will be more, but I am a newbie to ZPROJECT and GSL, so
we will need further help.

On Wed, Apr 6, 2016 at 1:03 PM Matjaž Ostroveršnik <
matjaz.ostroversnik at gmail.com> wrote:

> Hi Osiris,
> Thanks for the info. I'll try to dig into, to understand it.
> If you are in Rome, do like Romans do. ;-)
> After I am through, I'd really ask you to walk me through the procedure
> for the first time, so that I won't make some major mistake.
> In the meantime I added two methods for service communication to the
> client. It works. :-)
> //
> ---------------------------------------------------------------------------
> //  *** Draft method, for development use, may change without warning ***
> //  Send blob to service
> //  Returns 0 if OK, -1 if failed due to lack of memory or other error.
> MLM_EXPORT int mlm_client_svc_send_chunk
> (
>     mlm_client_t *self,
>     const char *address,
>     const char *subject,
>     zchunk_t*   content
> );
> //
> ---------------------------------------------------------------------------
> //  Receive a subject and zchunk content from the server.
> //  This method is orthogonal to the mlm_client_svc_send_chunk.
> //  Returns 0 or -1 in case of error. Free the returned
> //  subject and content when finished with them. To get the type of
> //  the command, use mlm_client_command ().
> MLM_EXPORT int mlm_client_svc_recv_chunk
> (
>     mlm_client_t *self,
>     char **subject_p,
>     zchunk_t** content
> );
> Basically the methods allow sending blobs (zchunk_t*) between client and
> worker.
> What is the procedure for the new features inclusion?
> - what are the steps
> - who is approving?
> Who is working on security? Am I right that malamute server does not
> support the curve yet?
> Has somebody tried to integrate more traditional PKI into zmq?
> Thanks in advance
> Matjaž
> On 6.4.2016 18:40, Osiris Pedroso wrote:
> 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.ostroversnik at 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.ostroversnik at gmail.com>matjaz.ostroversnik at 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 at lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing listzeromq-dev at lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160406/e523c731/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matjias.zip
Type: application/x-zip-compressed
Size: 5578 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160406/e523c731/attachment.bin>

More information about the zeromq-dev mailing list