summaryrefslogtreecommitdiff
path: root/zola/content/projects/libtuberia.md
diff options
context:
space:
mode:
Diffstat (limited to 'zola/content/projects/libtuberia.md')
-rw-r--r--zola/content/projects/libtuberia.md74
1 files changed, 74 insertions, 0 deletions
diff --git a/zola/content/projects/libtuberia.md b/zola/content/projects/libtuberia.md
new file mode 100644
index 0000000..8c4971a
--- /dev/null
+++ b/zola/content/projects/libtuberia.md
@@ -0,0 +1,74 @@
++++
+title = "libtuberia"
+date = 2025-08-07
+authors = ["Nicolás Dato"]
+description = "A library to implement a pipeline"
+draft = true
+
+[taxonomies]
+Tags=["C", "Libraries"]
++++
+
+This project is also available at Savannah: <https://savannah.nongnu.org/projects/libtuberia/>.
+
+## About libtuberia
+
+*libtuberia* is a library in C to implement a pipeline.
+
+A pipeline would be:
+
+*[Source] -> [queue_1] -> [Stage_1] -> [Queue_2] -> [Stage_2] -> [...] -> [Sink]*
+
+Each source, stage, and sink runs in a thread, reads from its input queue, processes the element, and write the result to the output queue.
+
+### Motivation
+
+A few years ago I learned about the pipeline in the CPU, and superscalar processors. Including interesting topics like Tomasulo's algorithm. I thought it was a good idea to do something similar in software.
+
+### When to use libtuberia
+
+You can benefit from this library when you have a several tasks than can run in parallel (or 1 task that you can split), and the output of one task is the input of the next task.
+
+Instead of running them sequentially, you can run them in parallel with libtuberia. This way, as long as there are elements to be processed, all tasks will be running in parallel without waiting. While the second stage (task) of the pipeline is working on some input, the first stage can work on the next input. If this were done sequentially, the next item would have to wait until the previous item finishes the whole process.
+
+With libtuberia you don't have to worry about threads nor queues, libtuberia does it for you.
+
+## Get it
+
+### v0.1.0
+
+- <https://download.savannah.nongnu.org/releases/libtuberia/libtuberia-0.1.0.tar.gz> ([gpg sig](https://download.savannah.nongnu.org/releases/libtuberia/libtuberia-0.1.0.tar.gz.sig))
+
+### Git
+
+- <https://git.ndato.com/libtuberia> (you can also browse it without cloning using the same link)
+- Mirror: <https://git.savannah.nongnu.org/git/libtuberia.git>
+
+## How to use libtuberia
+
+### Documentation
+
+You can read a quick guide [in the "about" page of my git](https://git.ndato.com/libtuberia/about/), which is [the README.md file](https://git.ndato.com/libtuberia/tree/README.md). There you will find how to compile it, and a quick guide.
+
+Also, the [tuberia.h file](https://git.ndato.com/libtuberia/tree/src/tuberia.h) has every structure and function documented.
+
+And finally, if you had [Doxygen](https://www.doxygen.nl) when installing libtuberia, a man page `tuberia.h` is also installed (you can read it with `man tuberia.h`) and a .html is installed in `/usr/doc/libtuberia/doxygen_html/index.html`
+
+### Examples
+
+There are two examples:
+- A simple and quick usage that doesn't do anything useful: <https://git.ndato.com/libtuberia/tree/example/simple.c>
+- A more complex and useful example that resizes a video file: <https://git.ndato.com/libtuberia/tree/example/decode_resize_encode.c>
+
+Both examples are installed in `/usr/doc/libtuberia/example/`
+
+## Bugs
+
+You can submit bugs at Savannah: <https://savannah.nongnu.org/projects/libtuberia/>.
+
+## Future work
+
+- Implement more complex pipelines
+ - A stage can choose the next stage
+ - More than one thread per stage
+