All Versions
54
Latest Version
Avg Release Cycle
30 days
Latest Release
402 days ago

Changelog History
Page 4

  • v0.5.1 Changes

    🛠 Fix: (sock) Fixed an issue where sock_flush would always invoke sock_touch, even if no data was actually sent on the wire.

    🛠 Fix: (sock) fixed a possible issue with sock_flush_strong which might have caused the facil.io to hang.

    🛠 Fix: (Websocket) fixed an issue with fragmented pipelined Websocket messages.

    🔋 Feature: (facil) easily force an IO event, even if it did not occur, using facil_force_event.

  • v0.5.0 Changes

    Braking changes: (pubsub) The API was changed / updated, making pubsub_engine_s objects easier to author and allowing allocations to be avoided by utilizing two void * udata fields... Since this is a breaking change, and following semantic versioning, the minor version is updated. I do wish I could have delayed the version bump, as the roadmap ahead is long, but it is what it is.

    Braking changes: (facil) Since the API is already changing a bit, I thought I'd clean it up a bit and have all the on_X flow events (on_close, on_fail, on_start...) share the same function signature where possible.

    🔄 Changes: (facil) Minor changes to the fio_cluster_* API now use signed message types. All negative msg_type values are reserved for internal use.

    🛠 Fix: plugging memory leaks while testing the system under very high stress.

    🛠 Fix: (pubsub, fio_dict) Fixed glob pattern matching... I hope. It seems to work fine, but I'm not sure it the algorithm matches the Redis implementation which is the de-facto standard for channel pattern matching.

    🔒 Security: (http) the HTTP parser now breaks pipelined HTTP requests into fragmented events, preventing an attacker from monopolizing requests through endless pipelining of requests that have a long processing time.

    🛠 Fix: (http) http_listen will now always copy the string for the public_folder, allowing dynamic strings to be safely used.

    🛠 Fix: (http) default error files weren't located due to missing / in name. Fixed by adjusting the requirement for the / to be more adaptive.

    🛠 Fix: (http) dates were off by 1 day. Now fixed.

    🛠 Fix: (http1) a minor issue in the on_data callback could have caused the parser to crash in rare cases of fragmented pipelined requests on slower connections. This is now fixed.

    🛠 Fix?: (http) When decoding the path or a request, the + sign is now left unencoded (correct behavior), trusting in better clients in this great jungle.

    🛠 Fix: (facil) facil_defer would leak memory if a connection was disconnected while a task was scheduled.

    🛠 Fix: (facil) facil_connect now correctly calls the on_fail callback even on immediate failures (i.e. when the function call was missing a target address and port).

    🛠 Fix: (facil) facil_connect can now be called before other socket events (protected form library initialization conflicts).

    🛠 Fix: (facil) facil_listen will now always copy the string for the port, allowing dynamic strings to be safely used when FACIL_PRINT_STATE is set.

    🛠 Fix: (facil) facil_last_tick would crash if called before the library was initialized during socket operations (facil_listen, facil_attach, etc')... now facil_last_tick falls back to time() if nothing happened yet.

    🛠 Fix: (facil) .on_idle now correctly checks for non networks events as well before the callback is called.

    🛠 Fix: (defer) A large enough (or fast enough) thread pool in a forked process would complete the existing tasks before the active flag was set, causing the facil.io reactor to be stranded in an unscheduled mode, as if expecting to exit. This is now fixed by setting a temporary flag pointer for the forked children, preventing a premature task cleanup.

    🔄 Changes: Major folder structure updates make development and support for CMake submodules easier. These changes should also make it easier to push PRs for by offering the dev folder for any localized testing prior to submitting the PR.

    🔋 Feature: (websockets) The websocket pub/sub support is here - supporting protocol tasks as well as direct client publishsing (and autu text/binary detection)! There are limits and high memory costs related to channel names, since pubsub uses a trie for absolute channel matching (i.e. channel name length should be short, definitely less than 1024Bytes).

    🔋 Feature: (redis) The websocket pub/sub support features a shiny new Redis engine to synchronize pub/sub across machines! ... I tested it as much as I could, but I know my tests are as buggy as my code, so please test before using.

    🔋 Feature: (facil_listen, http_listen) supports an optional on_finish_rw callback to clean-up the rw_udata object.

    🔋 Feature: (pubsub) channels now use the available fio_dict_s (trie) data store. The potential price of the larger data-structure is elevated by it's absolute protection against hash collisions. Also, I hope that since channels are more often searched than created, this should improve performance when searching for channels by both pattern and perfect match. I hope this combination of hash tables (for client lookup) and tries (for channel traversal) will provide the best balance between string matching, pattern matching, iterations and subscription management.

    🔋 Feature: (http) http_listen now supports an on_finish callback.

    🔋 Feature: (http1) HTTP/1.1 will, in some cases, search for available error files (i.e. "400.html") in the public_folder root, allowing for custom error messages.

    🔋 Feature: CMake inclusion. Credit to @OwenDelahoy (PR#8).

    🏗 > To use facil.io in a CMake build you may add it as a submodule to the project's repository.

      git submodule add https://github.com/boazsegev/facil.io.git
    

    Then add the following line the project's CMakeLists.txt

      add_subdirectory(facil.io)
    

    ⚡️ Optimize: (fio_hash_table) optimize fio_ht_s bin memory allocations.

  • v0.4.4 Changes

    🛠 Fix: (pubsub) Fixed collisions between equal channel names on different engines, so that channels are only considered equal if they share the same name as well as the same engine (rather than only the same name)... actually, if they share the same channel name SipHash value XOR'd with the engine's memory location.

    🛠 Fix: (facil) Fixed compiling error on older gcc v.4.8.4, discovered on Ubuntu trusty/64.

    🛠 Fix: Fix enhanced CPU cycles introduced in the v.0.4.3 update. Now CPU cycles are lower and thread throttling handles empty queues more effectively.

    🐎 Performance: (pubsub) now uses a hash-table storage for the channels, clients and patterns, making the duplicate review in pubsub_subscribe much faster, as well as improving large channel collection performance (nothing I can do about pattern pub/sub, though, as they still need to be matched using iterations, channel by channel and for every channel match).

    🔋 Feature: (http) The http_response_sendfile2 function will now test for a gzip encoded alternative when the client indicated support for the encoding. To provide a gzip alternative file, simply gzip the original file and place the .gz file in the original file's location.

    Folder Structure: Updated the folder structure to reflect source code relation to the library. core being required files, http relating to http etc'.

  • v0.4.3 Changes

    🛠 Fix: Some killer error handling should now signal all the process group to exit.

    🛠 Fix: (sock, websocket) sock_buffer_send wouldn't automatically schedule a socket buffer flush. This caused some websocket messages to stay in the unsent buffer until a new event would push them along. Now flushing is scheduled and messages are send immediately, regardless of size.

    🛠 Fix: (facil) facil_attach now correctly calls the on_close callback in case of error.

    🛠 Fix: (facil) facil_protocol_try_lock would return false errors, preventing external access to the internal protocol data... this is now fixed.

    🔋 Feature: (facil) Experimental cluster mode messaging, allowing messages to be sent to all the cluster workers. A classic use-case would be a localized pub/sub websocket service that doesn't require a backend database for syncing a single machine... Oh wait, we've added that one too...

    🔋 Feature: (facil) Experimental cluster wide pub/sub API with expendable engine support (i.e., I plan to add Redis as a possible engine for websocket pub/sub).

    ⚡️ Update: (http) Updated the http_listen to accept the new sock_rw_hook_set and rw_udata options.

    ⚡️ Update: (sock) Rewrote some of the error handling code. Will it change anything? only if there were issues I didn't know about. It mostly effects errno value availability, I think.

  • v0.4.2 Changes

    🛠 Fix: (sock) Fixed an issue with the sendfile implementation on macOS and BSD, where medium to large files wouldn't be sent correctly.

    🛠 Fix: (sock) Fixed the sock_rw_hook_set implementation (would lock the wrong fd).

    Design: (facil) Separated the Read/Write hooks from the protocol's on_open callback by adding a set_rw_hook callback, allowing the same protocol to be used either with or without Read/Write hooks (i.e., both HTTP and HTTPS can share the same on_open function).

    🛠 Fix: (evio, facil) Closes the evio once facil.io finished running, presumably allowing facil.io to be reinitialized and run again.

    🛠 Fix: (defer) return an error if defer_perform_in_fork is called from within a running defer-forked process.

    🛠 Fix: (sock, facil, bscrypt) Add missing static keywords.

    Compatibility: (bscrypt) Add an alternative HAS_UNIX_FEATURES test that fits older *nix compilers.


  • v0.4.1 Changes

    🛠 Fix: (HTTP/1.1) fixed the default response date (should have been "now", but was initialized to 0 instead).

    🛠 Fix: fixed thread throttling for better energy conservation.

    🛠 Fix: fixed stream response logging.

    Compatibility: (HTTP/1.1) Automatic should_close now checks for HTTP/1.0 clients to determine connection persistence.

    Compatibility: (HTTP/1.1) Added spaces after header names, since some parsers don't seem to read the RFC.

    🛠 Fix/Compatibility: compiling under Linux had been improved.


  • v0.4.0 Changes

    • Rewrite from core. The code is more concise with less duplications.

    • Different API.

    • The server is now a global state machine instead of an object.

    • 👍 Better integration with libsock.

    • 🖐 Handles libsock's UUID instead of direct file descriptors, preventing file descriptor collisions and preventing long running tasks from writing to the wrong client (i.e., if file descriptor 6 got disconnected and someone else connected and receive file descriptor 6 to identify the socket).

    • Better concurrency protection and protocol cleanup on_close. Now, deferred tasks (server_task / server_each), the on_data callback and even the on_close callback all run within a connection's "lock" (busy flag), limiting concurrency for a single connection to the on_ready and ping callbacks. No it is safe to free the protocol's memory during an on_close callback, as it is (almost) guarantied that no running tasks are using that memory (this assumes that ping and on_ready don't use any data placed protocol's memory).

  • v0.3.5 Changes

    • 🔒 Moved the global server lock (the one protecting global server data integrity) from a mutex to a spin-lock. Considering API design changes that might allow avoiding a lock.

    • 👀 File sending is now offset based, so lseek data is ignored. This means that it should be possible to cache open fd files and send the same file descriptor to multiple clients.

  • v0.3.4 Changes

    • ⚡️ Updated sendfile to only accept file descriptors (not FILE *). This is an optimization requirement.
  • v0.3.3 Changes

    • 🛠 fixed situations in which the sendfile might not close the file before returning an error.

    • 🛠 There was a chance that the on_data callback might return after the connection was disconnected and a new connection was established for the same fd. This could have caused the busy flag to be cleared even if the new connection was actually busy. This potential issue had been fixed by checking the connection against the UUID counter before clearing the busy flag.

    • 🗄 reminder: The Server.rw_hooks feature is deprecated. Use libsock's TLC (Transport Layer Callbacks) features instead.