Comments (14)
from pomf.
This is a pretty big change, I wouldn't just accept a pull request without some discussion first.
from pomf.
I'm aware. I have discussed it with @ewhal and their suggestion was to submit a PR.
This change would not affect existing users if they did not want to switch, though i have written instructions for if they did.
from pomf.
@lesderid in terms of code, it's exceptionally minor
see: https://github.com/pomf/pomf/pull/13/files
from pomf.
I'm aware. Giving instructions to set up SQLite and providing a schema is fine, but I'm not sure if I'd make it the default.
from pomf.
Why? It is a much more sane default than MySQL IMO
much simpler to setup and maintain, less resource usage, not a network service, less dependencies, closer to evetual goal of no SQL DB
pomf hardly needs a full DB server
from pomf.
I'm mostly worried about performance issues. Have you tried SQLite with a number of concurrent uploads? Is it as fast or faster than MySQL/MariaDB, even for large databases (such as pomf.se's or mixtape.moe's)? If so, go ahead and merge.
from pomf.
@lesderid not the best answer. but
https://www.sqlite.org/whentouse.html
"Checklist For Choosing The Right Database Engine
...
Otherwise → choose SQLite!
For device-local storage with low writer concurrency and less than a terabyte of content, SQLite is almost always a better solution. SQLite is fast and reliable and it requires no configuration or maintenance. It keeps thing simple. SQLite "just works". "
from pomf.
I'd prefer to see some real-world benchmarks for pomf first. Shouldn't be too hard to do.
from pomf.
Any suggestions for how to do so? SQLite performs excellently on not-enormous DBs. Even mixtape.moe is HARDLY that.
Also, see: http://blog.devart.com/increasing-sqlite-performance.html
from pomf.
Populate a database with fake data (I'd say something like 100k files at least).
Generate some random files (as many as possible) and time how long it takes to upload them concurrently with something like curl.
Then just compare the results with a MySQL-based pomf.
from pomf.
Also may be worth looking at https://www.digitalocean.com/community/tutorials/sqlite-vs-mysql-vs-postgresql-a-comparison-of-relational-database-management-systems
from pomf.
https://pbs.twimg.com/media/CkIq-CEXEAAhecf.jpg:large
Reading performance won't be the issue with SQLite. If we assume uncached requests are uploads/initial downloads, then these would be the only ones that involwe writing.
If we divide by 2 because half would be initial downloads 1720580 / 2 = 860290
860290 / (30 days * 86400 sec per day) = 1 request every ~3 sec
https://www.sqlite.org/faq.html#q19
SQLite say that on a 7200RPM desktop hard drive (hardly representative), SQLite can do 60 transactions per second. That is 180x what mixtape.moe was experiencing, on desktop HDDs.
Note that this can be improved significantly, still, as explained in a link above.
from pomf.
Closing as said in latest comment in #19
from pomf.
Related Issues (20)
- modernize it? HOT 1
- Made a nodejs wrapper. can you add it to README? as 3rd party wrapper? HOT 1
- re-add mimetype whitelisting HOT 1
- Enhancement: PreCompiled HOT 1
- Cant read settings file
- paste HOT 1
- nginx.conf
- Empty response after uploading HOT 1
- how to remove /files from file URL HOT 4
- raw TCP upload interface HOT 8
- https://try.pantsu.cat/ doesn't work anymore HOT 1
- Allow uploading from URL HOT 1
- merge pomf-php into pomf HOT 3
- remove sqlite HOT 4
- Missing config files HOT 1
- Prevent others from uploading to server HOT 4
- Uncaught Error: Call to member function bindValue() HOT 1
- add url shortening feature HOT 1
- Demo is down HOT 10
- How hard is to integrate with amazon s3? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pomf.