Compare commits
No commits in common. "4c1d812a17a7690ce32328a19f6759b5ed6cbc66" and "a2d4b970e7490ad364a7fe595beb6556457fda29" have entirely different histories.
4c1d812a17
...
a2d4b970e7
|
|
@ -38,9 +38,6 @@ pipeline:
|
||||||
secrets:
|
secrets:
|
||||||
- minio_access_key
|
- minio_access_key
|
||||||
- minio_secret_key
|
- minio_secret_key
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
exclude: [ release/* ]
|
|
||||||
|
|
||||||
publish-rel:
|
publish-rel:
|
||||||
image: 'alpine:3.18.0'
|
image: 'alpine:3.18.0'
|
||||||
|
|
@ -56,7 +53,5 @@ pipeline:
|
||||||
--user "Chewing_Bever:$GITEA_PASSWORD"
|
--user "Chewing_Bever:$GITEA_PASSWORD"
|
||||||
--upload-file landerctl/build/landerctl
|
--upload-file landerctl/build/landerctl
|
||||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/landerctl-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/landerctl-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
|
||||||
secrets:
|
|
||||||
- gitea_password
|
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
|
||||||
17
README.md
17
README.md
|
|
@ -1,16 +1,5 @@
|
||||||
# Lander
|
# 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
|
## The idea
|
||||||
|
|
||||||
A URL shortener has always been on my list of things I'd like to write myself.
|
A URL shortener has always been on my list of things I'd like to write myself.
|
||||||
|
|
@ -21,6 +10,12 @@ 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
|
these are efficient string-based search trees, this gave me the idea to use it
|
||||||
as the backend for a URL shortener!
|
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
|
## The name
|
||||||
|
|
||||||
I gave up giving my projects original names a long time ago, so now I just use
|
I gave up giving my projects original names a long time ago, so now I just use
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue