URL shortener, pastebin & file-sharing service, written from the ground up in C. https://r8r.be
 
 
 
 
 
Go to file
Jef Roosens 90d83bc5d4
docs: start architure file
2023-05-29 18:28:45 +02:00
crow@edf12f699e Configured start of project 2022-11-15 16:05:47 +01:00
include feat: decouple event loop from http 2023-05-29 18:28:45 +02:00
src docs: start architure file 2023-05-29 18:28:45 +02:00
thirdparty refactor: clean up the code to start development properly 2023-05-29 18:28:43 +02:00
trie feat: switch to C-based compilation, start of simple event loop 2023-05-29 18:27:40 +02:00
.dockerignore Basic working version without persistent storage 2022-11-15 21:12:08 +01:00
.editorconfig feat: added randomly generated URLs 2022-11-21 12:03:16 +01:00
.gitignore feat: decouple event loop from http 2023-05-29 18:28:45 +02:00
.gitmodules Configured start of project 2022-11-15 16:05:47 +01:00
.woodpecker.yml feat: use more std::string 2022-11-21 14:19:56 +01:00
ARCHITECTURE.md docs: start architure file 2023-05-29 18:28:45 +02:00
CMakeLists.txt refactor: started refactoring trie api (contains segfaults) 2022-12-07 12:29:37 +01:00
Dockerfile fix: assume server runs in working directory 2022-11-21 16:48:34 +01:00
Makefile feat: add context information to requests 2023-05-29 18:28:45 +02:00
README.md Added a readme 2022-11-16 13:05:09 +01:00
TRIE.md chore: ran formatter; added TRIE description file 2022-11-29 15:17:43 +01:00
landerctl feat: added secure random URL option 2022-11-21 21:02:33 +01:00

README.md

Lander

The idea

A URL shortener has always been on my list of things I'd like to write myself. It's simple, yet useful.

for our Algorithms & Datastructures 3 class, we had to implement three 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 the names of my friends ;p