[zeromq-dev] Python message passing

Martin Sustrik sustrik at fastmq.com
Fri Apr 24 17:53:54 CEST 2009


Erich,

> <pedantic_comment importance="feel free to ignore">
> Strongly typed is different from static typed.  Python is very strongly 
> typed, as there is no way to change the type of an object once it is 
> created. It is however dynamic, meaning that types are figured out at 
> runtime. Similarly C is static typed, but weak, as types can be cast to 
> other types pretty much at will, but must always be declared. 
> 
> Also of relevance, strength of typing is usually seen as a relative 
> value, or perhaps a scale, but not a binary value.
> </pedantic_comment>

Touche! I've been frivolous with the terminology :)

>     1. Rapid prototyping.
>     2. High-perf system written primarily in C can still benefit from
>     administrative components written in Python. With administration the
>     performance is irrelevant. Ability to write/change code easily is
>     much more important. (It would be nice to have Perl binding for
>     exactly this reason.)
>     3. Even python can benefit from features like ability to handle
>     thousands of connections at the same time, fast disk offload of
>     messages, auto-reconnection as application fail and get restarted etc.
> 
> 
> Aha, this makes sense to me now. Thinking about point 2, it also seems 
> to me there could be information sources to the high perf system that 
> also don't need the speed, but should interface with it (parts of the 
> application proper, not just admin).

Right, for any application where a human being is source of events 
Python vs. C doesn't make any difference. I've tested how quickly I am 
able to hit the same button twice in a sequence: 30 milliseconds. Let's 
say 18 year old Kenyan sprinter would able to get it down to 15 ms. A 
neurotic person would be able to shave off additional 5 ms. Still, it's 
no match for either Python or C.

Martin



More information about the zeromq-dev mailing list