The Unix Way, everybody!

Also, first post!

@linuxmemes

6 points

I love how pacman/libalpm database is just directories with tiny little files, and it’s faster in resolving dependencies than mostly anything else

permalink
report
reply
10 points

Just fucking putting data into json files in a folder is so much easier than databases. Sure, databases are faster and give you access to powerful SQL queries. But if you’re just making something small and simple, you don’t need those things. Save yourself the hassle and just use the filesystem.

Or use minio/s3, which can either be the best or the worst of both worlds depending on your usecase.

permalink
report
reply
11 points

The trouble is, filesystems don’t have ACID. The first time you have a power loss during a write, your data will get corrupted.

permalink
report
parent
reply
1 point

Hmm that’s a valid criticism, thanks for pointing it out

permalink
report
parent
reply

Duckdb can query them with SQL like they are in a database. Csv, tsv, parquet also. You can even connect to and query postures and cloud storage also

permalink
report
parent
reply
10 points

It also makes you re-implement a database, but worse.

Use a JSON file if you just need to serialize/deserialize some data. Use SQLite or a DB server if you need more. Your own code will never match the quality of SQLite.

permalink
report
parent
reply
3 points

Sqlite is the best in most cases

permalink
report
parent
reply
3 points

Made a bash script using sqlite recently to automate processing some data. Best part is it terrifies everyone else at work and no one else wants to touch it because it’s on Linux and none of them have used it before.

permalink
report
parent
reply
21 points

Didn’t someone actually try making SQL as a filesystem and it ended up being something like 50 times slower than ZFS after they applied a ton of optimizations?

Not as a serious project, but more like a joke to see what would actually happen.

permalink
report
reply
15 points

They’re more like blob storage.

permalink
report
reply
5 points

Blob storage usually uses a FS back end so it’s more like blob storage is like a file system

permalink
report
parent
reply
21 points

You’re right! Ill just store all this data as static json files in a directory then

permalink
report
reply

linuxmemes

!linuxmemes@lemmy.world

Create post

Hint: :q!


Sister communities:

Community rules (click to expand)

1. Follow the site-wide rules
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Community stats

  • 7.4K

    Monthly active users

  • 1.4K

    Posts

  • 76K

    Comments