Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Multithreading

Wiebe Cazemier <wiebe@xxxxxxxxxxxx> writes:

> ----- Original Message -----
>> From: "Frank Pagliughi" <fpagliughi@xxxxxxxxxxxxxx>
>> To: "General development discussions for the mosquitto project" <mosquitto-dev@xxxxxxxxxxx>, "Wiebe Cazemier"
>> <wiebe@xxxxxxxxxxxx>
>> Sent: Sunday, 13 October, 2019 15:56:11
>> Subject: Re: [mosquitto-dev] Multithreading
>>
>> I was just wondering about this recently for a different project. The
>> Rust language has a library called "mio" (for Metal I/O) which is just a
>> thin, low-level wrapper around epoll and it's related functionality on
>> other platforms (kqueue and IOCP). So it creates a platform independent,
>> high performance, asynchronous base for heavy I/O application.
>> 
>> So I was wondering if something like this were available in C/C++, and
>> if not, would it be worth porting mio over. It's only about 8k lines of
>> Rust.
>> 
>> Frank
>
> That's why I suggested libevent.
>
> But, to stay with Mosquitto's light-weight philosophy and not
> introduce a bulk of code or dependencies, I think we can create our
> own wrappers that that allow for a bit more implementation agnostic
> programming, instead of one while loop with a lot of #ifdefs.

One of the problems with event-driven programming is that multiple
things can want to own the event loop.   So, I think a better goal for
something like mosquitto -- perhaps one that is already met -- is to be
organized so that it is easily hooked into the event loops of all major
frameworks.


Back to the top