NAME

IOMux::Alternatives - compare the IOMux implementation with other Event modules

DESCRIPTION

On CPAN, you can find various alternatives for this module. Probably, this is caused by the very low level of programming help that the basic select() and poll() operating system calls offer. Various corners of a program need to register event listeners and later get events back. This requires some administration.

IO::Multiplex

The IOMux module started as a major rework of IO::Multiplex. It follows the same concept, but with major internal and visible improvements. Most methods with a name like mux* originate from IO::Multiplex function mux_*.

The IOMux implementation is conceptually much closer to IO::Multiplex (Plex) than you may expect. Similar enough to write a comparison.

Main differences:

Event managers

In Plex, all is organized around a select loop. In Mux, you have a choice between various mechanisms of which some still need to be implemented.

Callback objects

In Plex, any file-handle may have a callback object associated to it. If not, some default is used. In IOMux, the callback object has the focus and has a file-handle associated to it. This should simplify more complex implementations.

IOMux does not support callbacks to name-spaces, because the object is used for per-handle administration. In Plex, that administration is located inside the multiplex main object (and therefore difficult to extend with higher level applications)

Callback routines

The Mux implementation defines the same mux_* methods as Plex, but has organized them. In Plex, the connection accepting mux_connection and the input callback mux_input are always available, even though a callback object probably supports only one of both. In IOMux, there is a clear distinction between various kinds of handlers.

Hooks

In Mux, you have a few more locations where you can hook the process, a few more callbacks.

Pipes and files

Mux added official support for file reading and writing, pipes and more. Some of those do work in Plex as well, with some tricks.

IO::Async / Net::Async

Paul Evans has developed a large number of modules which is more feature complete than IOMux. It supports far more event loops, is better tested, and has many higher level applications ready to be used.

AnyEvent

POE

Final consideration

Certain applications will benefit from IOMux (especially my personal development projects), because it is based on the OODoc module for object oriented perl module documentation, and Log::Report for error handling and translations.

SEE ALSO

This module is part of IOMux distribution version 1.01, built on January 15, 2020. Website: http://perl.overmeer.net/CPAN

LICENSE

Copyrights 2011-2020 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/