[zeromq-dev] Small graphics game for teaching ZMQ and Protobuf

2015-02-09 Thread Diego Rodríguez-Losada
Hi,

Just in case it is useful for someone else teaching ZMQ.

I am preparing a workshop about ZMQ and Protobuf:
https://techfest.uc3m.es/programa/introduccion-a-sistemas-distribuidos-con-zmq-y-google-protocol-buffers/

I will start with basic concepts and building very simple examples, then I
have prepared a small soccer game, that includes a basis a simple PUB-SUB
for broadcasting game state and a PUSH-PULL for receving player commands.
After that the students can add new comms between players to coordinate
their teams.

You can find the source code here: https://github.com/drodri/soccer
It works in Win (VS12), Ubuntu (gcc 4.8) and MacOS.

Best,

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


Re: [zeromq-dev] biicode & zeromq

2014-10-07 Thread Diego Rodríguez-Losada
Hi Riskybiz,

I was willing to answer in this thread, as I would love to be able to
connect and receive more feedback from many of the C/C++ devs of this list,
for example wrt this post
http://blog.biicode.com/file-based-cpp-dependency-manager/
and also, because our plans include *economically rewarding open source
developers* (related to your question of the business model). We also plan
to go open-source ourselves soon.

But, it might be a little bit off-topic from the list, and nobody has
responded, so I suggest continuing the conversation in our
http://forum.biicode.com

Could you please copy and paste your question there? I will answer it as
soon as possible.

Thanks very much again!
Best,

Diego

Diego Rodriguez-Losada
CEO Biicode Innovation SL







> 2014-09-27 18:56 GMT+02:00 Riskybiz :
>
>> Diego,
>>
>> Thanks for your suggestion via the zeromq mailing list to
>> try biicode to build the zguide examples on Windows.   The paragraph in
>> your blog post/tutorial 
>> was exactly my experience;
>>
>>
>>
>> “Today, if you try to build the basic C++ client-server example that
>> ZeroMQ provides in their site, you might encounter some problems. You have
>> to guess that the C++ binding is not in the library, instead, it’s inside
>> another repo (zmqcpp). I had to google it myself to find it. You have to
>> get, configure and build the library, then setup your own project to use
>> it.”
>>
>>
>>
>> I code in C++ and have a necessity to use zeromq on Windows.  Because of
>> the limited zguide explanations on how to install, setup and integrate
>> zeromq into a C++ (and Windows) code project environment it is possible to
>> go around in circles for quite some time.
>>
>>
>>
>> I began my zeromq experience by using the cppzmq language binding until I
>> had a question on how to retrieve a returned error message from a cppzmq
>> function call; it was suggested to me (on the zeromq mailing list) that in
>> order to do this I should use the raw zeromq api calls rather than the
>> binding.  I now use a hybrid of C++ and raw zeromq function calls, because
>> this to me is the simplest way to understand what is actually happening;
>> though after reading the zmqcpp source last night (after a suggestion from
>> another person who commented on my recent zeromq feedback) I now see that
>> it should really be possible to get the error message via the cppzmq
>> binding, it is provided for.
>>
>>
>>
>> Having the option of using either the language binding or the raw zeromq
>> calls  in a C++ environment tends to breed confusion in a beginner; there
>> are two sets of commands to memorise (and confuse), add on top of that the
>> multipart message API introduced in some examples and the zhelpers file
>> combining to offer so many commands and ways to send a message, it is very
>> easy to get lost amongst the details.  In fact just working out that there
>> was the option of using a binding or the raw api calls took some
>> considerable time.
>>
>>
>>
>> Anyhow back to the matter in hand, I installed biicode and followed the blog
>> post/tutorial .   You’ll be
>> please to hear that I successfully built hwserver & hwclient and ran them
>> in an ordinary Windows console.   I now have some feedback, questions and a
>> challenge for you……..if you don’t mind?  You may tell from the questions
>> that I’m not sure yet that I fully understand the magic inside biicode!
>>
>>
>>
>> 1.   “Building this example is straightforward with biicode. If you
>> haven’t installed it yet, you  might want  WILL NEED to try the C++
>> getting started  first.”
>> I downloaded and installed biicode but initially missed the need for the
>> ‘bii setup:cpp’ command which meant I got errors pertaining to not being
>> able to find “Visual Studio 12”, which was already installed.
>>
>>
>>
>> 2.   Is Biicode, for want of a better term; cross compiling? Taking
>> code intended for one platform and compiling it for another? That would be
>> incredible? Or is it more the case of specifying the language differences
>> between compilers using #include statements such as the difference between
>> sleep() and Sleep().  N.B. I think that Sleep(n * 1000) would be more
>> appropriate to convert milliseconds to seconds.
>>
>>
>>
>> #include "diego/zmqcpp/zmq.hpp"
>>
>> #include 
>>
>> #include 
>>
>> #ifndef _WIN32
>>
>> #include 
>>
>> #else
>>
>> #include 
>>
>>
>>
>> #define sleep(n)Sleep(n)
>>
>> #endif
>>
>>
>>
>> 3.   Where is biicode downloading dependency files from?  Have I got
>> this right, is it downloading dependencies?  If it is downloading why can
>> biicode automatically find some of the necessary files yet others are to be
>> uploaded by the user?  For example where is this location #include
>> "diego/zmqcpp/zmq.hpp"
>>
>>
>>
>> 4.   How does biicode know which version of z

Re: [zeromq-dev] DEALER-ROUTER question

2014-09-25 Thread Diego Rodríguez-Losada
Dear Riskybiz,

I posted several days ago, by recommendation of Pieter, a post about
building your first C++ examples with ZeroMQ in windows (and Ubuntu/Mac),
with the C++ ZMQCPP binding and using the biicode platform. In this way,
even my students at university are able to build the examples in a few
minutes without problems.
Check it here http://blog.biicode.com/zeromq-cpp-biicode/

If you want serialization, we all agree that you should use an already
existing framework/library, instead of developing your own. So the real
problem is not about ZMQ at all, but instead, setup, learning and getting
started with the serialization framework at the same time as ZMQ. A
reference solution could be google protocol buffers. Please read also:
http://docs.biicode.com/c++/examples/zmq_protobuf.html

Sorry of the self-promotion, but I didnt got any feedback then in the list,
and I think that these problems you are describing are really related to
the issues we are trying to target in biicode for C/C++ languages.

Love to hear your feedback.

Diego







Diego Rodriguez-Losada
CTO Biicode Innovation SL

2014-09-25 15:08 GMT+02:00 Riskybiz :

> Dear Pieter,
>
> As a figurehead of the zeromq project I think you should know that the
> zguide and its examples, whilst a worthy effort, is actually a barrier to
> the progress of a learner.  As a newcomer to networking my interactions and
> attempts to learn and use zeromq over the past year has been an unyielding
> source of issues to be overcome.  Anyone else would probably have given up,
> but I recognise the benefits of the superb technology offered by zeromq.
>
> Part of the problem is perhaps that the zguide has been written by experts,
> where seemingly minor details are glossed over.  For example in the
> hwserver
> and hwclient code it is not demonstrated how actually to read a message
> payload from the socket and extract the received message string.  It cheats
> and prints; printf ("Received World %d\n", request_nbr);  When someone
> tries
> this early example the first thing they will experiment with is:  How can I
> customise the message payload and get my own message sent and received?
> They will be disappointed.  They might read on try to figure it out and be
> baffled by the multiple language bindings, apis and helper files and left
> wondering; what actually needs to be written to make zeromq work?  What is
> the core underlying zeromq commands which need to be called?  What needs to
> be installed? How do I do that? Where do I find the downloads?
>
> I encountered a situation last year when I needed to use the common
> technique of serialization to pass custom C++ objects over zeromq sockets.
> While the zguide alludes to the possibility there was nothing to offer
> assistance in the practical implementation.  It took some considerable
> time,
> weeks, to sort this out into a functioning prototype.  Where a simple
> functional guide example could have saved time and questions; not just for
> me but also for any number of other users.
>
> I find that the zguide code examples are in themselves problematic.  The
> example code is very sparsely commented.  Every line which does something
> non-trivial or zeromq specific should be explained.   I have found examples
> to be zeromq version specific, operating system specific and requiring
> modifications to work on Windows.  All of these factors just consume time
> in
> endeavouring to make them work or debug them with limited understanding of
> what is actually supposed to be happening.  This causes questions and
> frustrations.
>
> CZMQ was recommended as the api to use with 'reference' C language code
> examples, I lost more time trying to compile CZMQ before realising the
> practical impossibility of this on Windows despite alluringly providing
> Visual Studio project files.  The lack of working installation instructions
> was also a barrier.  Then afterwards I discover that ROUTER sockets in
> updated zeromq versions no longer use UUID identities thus anyway
> invalidating the code example I was endeavouring to get working.  More lost
> time, more questions.   No progress.
>
> My suggestion is that if you want fewer basic questions asked in the
> community then please take time to revisit the zguide, its examples and
> necessary zeromq code resources and make it such that people can easily
> find
> the resources they need, confidently learn and demonstrate the examples and
> functionality for themselves; without enduring endless technical barriers
> and frustrations.
>
> I hope you will view my feedback as constructive.
>
> All that said; which part of the guide should I read to solve my
> DEALER-ROUTER issue, can I be confident that any associated zguide example
> will actually work and help me to further understand how to solve my own
> zeromq issues in the future?
>
>
> Riskybiz.
>
>
> Message: 29
> Date: Thu, 25 Sep 2014 11:29:01 +0200
> From: Pieter Hintjens 
> Subject: Re: [zeromq-dev] DEALER-ROUTER que

[zeromq-dev] LibZMQ and zmqcpp now in biicode

2014-09-16 Thread Diego Rodríguez-Losada
Dear ZMQ devs,

I have recently uploaded a copy of LibZMQ and zmqcpp to biicode, a platform
(basically a C/C++ dependency manager) that makes it very easy to integrate
it in new C/C++ projects, which result very interesting for example for
education or rapid prototyping.

I have written a post here: http://blog.biicode.com/zeromq-cpp-biicode

I would really appreciate if you could have a look, try it out and give
feedback.

Best regards,
Diego




Diego Rodriguez-Losada
CEO Biicode Innovation SL
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev