A simple file uploader and sharer, based off of Pomf.se. Sto's backend is written in Go, and is designed to be both performant and portable.
Sto requires Go, git, and the packages github.com/hoisie/web
and github.com/mattn/go-sqlite3
, as well as a valid SQLite3 installation which was compiled with enabled concurrency options. Both of the Go dependencies will be automatically installed by the Makefile, but they can be manually gotten if necessary.
Run make
to build the files into an executable. All dependencies will be automatically installed and the GOPATH
variable automatically set to ~/Gopath
if it doesn't exist. Please ensure that git is present on the system in order for go get
to properly work.
To configure Nginx, the following location block should be utilized:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
The Sto executable can be run with the options:
-port=<port number>
- If set this will cause Sto to listen on the specified port. 8080 is the default.-procs=<maximum number of cpus to use>
- If set this will cause Sto to run with the specified number of processes. The minimum recommended number is 2, but 1 is the default.
A benchmark using JMeter and attempting to upload 10 files at a time yielded the following results:
While these results should not be treated as completely conclusive, they do provide some indication of the strength of Go as a potential for servers. It should also be noted that Sto utilizes SQLite(to make portability easy) which is also slower than MySQL, which is used by Pomf.
- Improve DB Handling
- General efficiency improvements?
- Improve Frontend
- Makefile for optional compilation and minification of assets