External polling (not wakeup) or deferred execution #2812
Replies: 3 comments 8 replies
-
I beg to differ. The vast majority of our customers are embedded systems and microcontrollers with no OS. Mongoose was never designed aiming to where you want to use it. Mongoose does not depend on other libraries, it must run in baremetal scenarios. |
Beta Was this translation helpful? Give feedback.
-
@cpq WDYT ? |
Beta Was this translation helpful? Give feedback.
-
I think the library is great in terms of offered features, but at the same time it is difficult to build abstractions on top of it. Let's take a look at two scenarios:
Common to both scenarios is that each service must be reachable via an http endpoint (same address and port).
Non trivial applications fall in one of the two cases above. How can you integrate mongoose in such two scenarios? Wakeup() is just a way to exit the event loop to do something else, like spinning another event loop. But what if another library has the same way of handling interruptions? That is not scalable.
Popular library approaches: consider uwebsocket library: the defer() method allows to execute a lambda in the http server thread. Other libs define an interface to allow file descriptors to be polled from outside. It's a pity that this awesome library does not have any of these two. Such features would make this lib the most complete, extensible and portable I've seen till now in the area of http.
Beta Was this translation helpful? Give feedback.
All reactions