Hi All,

In the discussion for pull request #753
((https://github.com/apache/celix/pull/753)), there was a brief
conversation about the potential benefits of integrating libuv into
Apache Celix.

For those unfamiliar, here's a short introduction to libuv from Wikipedia:
"""
libuv is a multi-platform C library that provides support for
asynchronous I/O based on event loops.

Feature:
- Full-featured event loop backed by epoll, kqueue, IOCP, event ports
- Asynchronous TCP and UDP sockets
- Asynchronous DNS resolution
- Asynchronous file and file system operations
- File system events
- ANSI escape code controlled TTY
- IPC with socket sharing, using Unix domain sockets or named pipes (Windows)
- Child processes
- Thread pool
- Signal handling
- High resolution clock
- Threading and synchronization primitives
"""

For more details, you can visit the libuv site: https://libuv.org/
Note that libuv is licensed under MIT with some parts under other
licenses (see LICENSE-extra:
https://github.com/libuv/libuv/blob/v1.48.0/LICENSE-extra).


Incorporating libuv into Apache Celix could offer several benefits, including:
 - Use libuv single threaded event loop for the Apache Celix Event Thread
 - Threading and thread synchronization abstraction
 - Signal handling abstract
 - Socket abstraction
 - File handling abstraction (OS abstraction)

Adopting libuv might not only reduce our codebase but also improve OS
abstraction, making Windows support, in the future, more feasible.

I think it is good to discuss whether integrating libuv is something
worth considering.
If so, we should determine the appropriate timeline for integration
and decide if it should replace existing abstractions like
celix_threads.h.
However, it's worth noting that libuv does not provide abstractions
for open_memstream or fmemopen.

In my opinion, if we proceed with using libuv, it would be ideal to
include it in the Apache Celix 3.0.0 release. Otherwise, we might need
to introduce two major updates in a short period, which is not ideal.
But the downside is that this could postpone an Apache Celix 3.0.0 release.

Any thoughts, comments or questions are welcome.

Best regards,
Pepijn

Reply via email to