facil.io's API is divided into different modules, each of them belonging to one of two groups:
The Core Modules:
These modules are required for facil.io to operate properly and they include:
facil library - this is the hub for everything network related except socket read/write calls.
facil library and it's API is at the heart of everything and it is the glue that holds the different modules together.
sock library - an abstraction layer over POSIX sockets, which solves many of the issues and pitfalls related to socket programming.
defer library - a simple event / action queue. It's used internally but can be used directly as well.
evio library - the evented one-shot I/O module. This module is mostly for internal uses and shouldn't be accessed directly. It's API, although stable, should be considered volatile.
FIOBJ object library - a dynamic type system designed for handling network data (which is, by nature, dynamic).
fio_mem library - a simple concurrent memory allocator optimized for typical network use-cases. It can be disabled or replaced with jemalloc / tcmalloc and friends.
The Extension Modules:
These modules can be safely ignored or removed if not utilized by an application. These modules include:
httpextension - this is compound module is everything HTTP.
websocketsextension - this is part of the HTTP module and extends it to support Websocket connections.
This powerful tool, which integrates seamlessly with the Websocket library, can allow an application to scale horizontally across machines, as can be demonstrated by the use of the Redis pub/sub engine.
redis_engine extension to the pub/sub service.
The CLI (
fio_cli) helper for handling command line arguments.
The parsers some of the extensions, such as the Redis pub/sub engine and the HTTP / Websocket extensions make use of parsers that can be used independently of the facil.io framework.