[zeromq-dev] Ingesting external data via TCP with 0MQ
Andrew Hume
andrew at research.att.com
Tue Dec 20 23:03:37 CET 2011
admittedly my domain seems much larger than yours, but i have found
the following architectural principle valuable:
the (distributed) application processes application-specific data structures,
all of which are transmitted one per 0mq message. all linkages to the external world
consists of adapters which convert real world data into application-specific data.
these adapters can be end-points of external sockets, or can process data from disk files.
(this allows playback of socket contents if that suits.)
this is a little more overhead than might be necessary, but supports much more
flexibility.
andrew
On Dec 20, 2011, at 2:56 PM, Ryan Richins wrote:
> Brain,
>
> Thanks.
>
> I read that and then saw the following in the FAQ , but seems I was too close to the trees to see the forest.
>
> How can I integrate ØMQ sockets with normal sockets? Or with a GUI event loop?
>
> Appreciate getting set on the right course.
>
> Ryan
>
> On Dec 20, 2011, at 4:41 PM, Brian Smith wrote:
>
>> As mentioned in chapter two of the guide,
>> 0MQ is not a neutral carrier [1]. You can't make arbitrary
>> connections with it.
>>
>> Your only choice is build a gateway between the device
>> specific protocol, and 0MQ. Given that you already have
>> a listener written in perl, it shouldn't take you much time.
>>
>> -B
>>
>> [1] http://zguide.zeromq.org/page:all#-MQ-is-Not-a-Neutral-Carrier
>>
>> On Tue, Dec 20, 2011 at 1:38 PM, Ryan Richins <richinsr at mac.com> wrote:
>>> Hi,
>>>
>>> I have spent some time reading the 0MQ guide and going over the
>>> examples using both the perl and ruby bindings but still feel I need
>>> to just be pointed in the right direction regarding my particular
>>> situation.
>>>
>>> We have hardware device that sends data in its own specific format via
>>> a TCP connection. Currently I have a small perl program (using
>>> IO::Socket::INET) on a linux machine set up to parse the 'device
>>> specfic' protocol.
>>>
>>> What I have been attempting to do but with no success is to use
>>> ZMQ::PULL to bind to the TCP port and then just read in the message
>>> from the device and print out whatever it gets to stdout.
>>>
>>> The majority of the 0MQ examples expect that whatever is sending or
>>> receiving a message is 0MQ 'aware' for lack of a better word. My
>>> question is, is this possible and really, if it is... should it be
>>> done and if so, how would I set up a small 0MQ example with either
>>> perl/ruby to just read in data from a socket and dump it to stdout?
>>> Or would it be better to use something like IO::Socket::INET to listen
>>> on a port, parse the incoming message and then send data off to
>>> workers which would be 0MQ aware?
>>>
>>> Thanks,
>>>
>>> Ryan
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://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 list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
------------------
Andrew Hume (best -> Telework) +1 623-551-2845
andrew at research.att.com (Work) +1 973-236-2014
AT&T Labs - Research; member of USENIX and LOPSA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111220/2d068100/attachment.htm>
More information about the zeromq-dev
mailing list