URL shortener, pastebin & file-sharing service, written from the ground up in C. https://r8r.be
 
 
 
 
 
Go to file
Jef Roosens 2d7cce138d
chore: ran formatter; added TRIE description file
2022-11-29 15:17:43 +01:00
crow@edf12f699e
include feat: allow skips up to 8 characters long 2022-11-29 15:08:07 +01:00
src chore: ran formatter; added TRIE description file 2022-11-29 15:17:43 +01:00
.dockerignore
.editorconfig
.gitignore
.gitmodules
.woodpecker.yml
CMakeLists.txt refactor: rename TernaryTrie to Trie 2022-11-29 11:27:28 +01:00
Dockerfile
Makefile feat: allow skips up to 8 characters long 2022-11-29 15:08:07 +01:00
README.md
TRIE.md chore: ran formatter; added TRIE description file 2022-11-29 15:17:43 +01:00
landerctl

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