home industries $releases designs hoff.kitchen metapages

rolexhound, smartwatch, flexhq

Demo ecosystem for a video tutorial, notifies file system events (inotify) over the network with a thread-pool/epoll socket server.

Quality Status: Gold Master

Functionality Status: Complete

Basic architecture is a thread pool worker-based listener where each worker has an epoll instance. Accepted connections are added to workers until one fills up (max defined as a constant), and then added to the next one. flexhq implements a publisher/subscriber model where rolexhound is a publisher and smartwatch is a subscriber (to filesystem events).

There is a subscriptions 'table' (an array of struct entries) where rolexhound will initialise itself with a NULL watchPath and non-NULL activeFiles. Smartwatch will have all entries in the struct filled if it is a valid subscription entry. The table is reallocated in chunks until it reaches a maximum size.

https://github.com/hoff-dot-world/flexhq

Video Tutorial - How to Write a Socket Server with Thread Pools and Epoll!