[zeromq-dev] [PATCH] Scalability improvements for large amounts of connections
Pieter Hintjens
ph at imatix.com
Tue Oct 12 13:06:03 CEST 2010
Thanks, Martin, this makes it clearer.
On Tue, Oct 12, 2010 at 10:37 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 10/12/2010 10:29 AM, Pieter Hintjens wrote:
>>
>> On Mon, Oct 11, 2010 at 10:51 PM, Martin Sustrik<sustrik at 250bpm.com>
>> wrote:
>>
>>> If you are using socket from multiple threads you are abusing the
>>> library and you fully deserve your application crashing. Muahaha!
>>
>> I'm not sure "0MQ supports socket migration but if you use it your
>> apps will crash, Muahaha" is a compelling proposition.
>>
>> Even if the functionality only exists for specific cases such as the
>> Erlang binding, it should be clearly documented and explicit.
>>
>> Well, you can try the "muahaha" approach but IMO it'll just result in
>> confusion and complaints.
>
> You should *not* use socket from multiple threads in parallel. That's
> clearly documented and if you do so, you'll crash. To be serious, you can't
> avoid that unless you remove the lockfree algorithms. It worked that way
> till now and it still works that way.
>
> What I am saying is there's no need for explicit socket migration, because
> basically any scenario of migration you can imagine already ensures the
> memory barrier.
>
> If it does not, you are doing something very strange (probably using some
> kind of lock-free signaling mechanism) and in that case you are an expert
> and you understand well what "you have to ensure full memory barrier" means.
>
> Martin
>
>
--
-
Pieter Hintjens
iMatix - www.imatix.com
More information about the zeromq-dev
mailing list