This is a starter Application to learn Rust. Each Iteration is planned as Medium Blogs with defined Milestones. We are going to build something like Fluentbit but completely in Rust. This application will have basic implementation for Rust code and Explain the code with comments and step-by-step with Medium Articles.
Happy Learning :D
- Log to file from client end like Kubernetes.
- Run collector. Read the files. Record the read file line number for fault tolerance.
- Send the logs line by line to a store. This might be a local file for start and then might be AWS/Elast Search etc.
- Configuration provision for collector. Tell the Pod and Container to Tail. Tell the Destination in plugin format.
- Add Filter Mechanism.
- Multi-threaded
- Fault Tolerant
- External Connection
- Plugin based architecture
- Dynamically Read Files from Folder
- Record Counter and make sure to Read files from where we left off last.
- Keep on Flushing events to Destination (another folder) on flush counter intervals.
- All Metadata should be read from config file.
Blogs Covered
- https://levelup.gitconnected.com/event-collector-your-first-rust-application-e0e7c2efa326
- https://medium.com/gitconnected/concurrency-in-rust-extending-your-application-using-tokio-8f6ed580e8aa
-
Revamp the Application into cleaner code. Fix the Bugs.
-
Live Example of Files Running and Log Tailing.
-
Real Time metadata sharing between threads. [Blog]
3.1: We need to implement a thread lifecycle that tracks the state of threads in a shared data structure.
3.2: Every 5 seconds, each thread will update id, state(active) and lines processed.
3.3: This is a metrics case. We wont use prometheus but record our own metrics.
-
Better design to handle multiple modes.
-
Containerize Everything.
- Gather Performance Insights while running this in Kubernetes. [Blog]
- Performance Optimizations.
- Proper Parsing of Log Messages with Regex.
- Regex based File Tailing.
- Possibility of tailing multiple streams of files and separating them.
- Implementing something like message pack.