From 45f839ffe21cb3d37959628999b32d7204cccfd7 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Sun, 19 Nov 2023 13:25:09 +0100 Subject: [PATCH] chore(lander): update readme --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fcdf32f..4f8d21e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,16 @@ # Lander +Lander is an HTTP/1.1 server that acts as a URL shortener, pastebin and +file-sharing service. It's written from the ground up in C, complete with an +HTTP framework built on top of an event loop implementation based on [Build +Your Own Redis with C/C++](https://build-your-own.org/redis/). Lookup of +entries is done using an in-memory trie data structure, and on-disk storage +uses a custom binary database format. + +The codebase uses one thirdparty library, namely +[picohttpparser](https://github.com/h2o/picohttpparser) for parsing HTTP +requests. + ## The idea A URL shortener has always been on my list of things I'd like to write myself. @@ -10,12 +21,6 @@ different tries (Patricia trie, ternary trie, and a custom one). Considering these are efficient string-based search trees, this gave me the idea to use it as the backend for a URL shortener! -This implementation currently uses a ternary trie as its search tree. The -persistence model is very simple; I simply append a line to a text file every -time a URL is added, and add the lines of this file to the trie on startup. The -trie is stored completely im memory, and no I/O operations are required when -requesting a redirect. This makes the server very fast. - ## The name I gave up giving my projects original names a long time ago, so now I just use