![]() |
#1 |
Apprentice
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 85
![]() |
Linux & Mac persistent storage
I need persistent storage for "Angband OS" and I want it to be compatible with Windows, Linux and Mac OS. I have the Windows knowledge and recommendations myself ... but I need Linux and Mac experts to tell me what database recommendation they suggest.
Please help if you are Linux and Mac experts and recommend to me what database services please. |
![]() |
![]() |
![]() |
#2 |
Adept
Join Date: Apr 2021
Posts: 122
![]() |
Not an expert, but sqlite is installed by default on MacOS. I suspect it's available by default on most Linux distributions as well, but that's a much more complex question.
Also, before you get into databases, consider the possibility that you can get what you need with files and directories, which is much easier to port between systems. |
![]() |
![]() |
![]() |
#3 |
Knight
Join Date: Mar 2015
Posts: 976
![]() |
Vanilla use simple files.. so put the data to DBMS will be big job.. and do you really need it?
![]() Most web uses MySQL. I use it too, not only for web, but also for my Rage of Mages 2 server ( https://tangar.info/en/rom2 ). But actually it's not a really big difference, which DBMS to use - PostgreSQL, MySQL or SQLite, they all good.. choosing one depends on the programming language/framework which you will use. Btw SQLite written in C (while MySQL in C++) which may ease hardcoding stuff into it (in case if you will go for it).
__________________
https://tangaria.com - Angband multiplayer variant tangaria.com/variants - Angband variants table tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ youtube.com/GameGlaz — streams in English ⍽ youtube.com/StreamGuild — streams in Russian |
![]() |
![]() |
![]() |
#4 |
Apprentice
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 85
![]() |
Files and directories are awesome ... but from a webserver environment, they are considered to be off-limits for read-write access.
|
![]() |
![]() |
![]() |
#5 |
Apprentice
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 85
![]() |
Awesome for the input. SqlLite sounds like common at this point. DBMS is 10x easier than disk storage. As an Angband server hosting multiple users and simultaneous games, a database is the route to take. Love the input.
Any objections to Sqlite? I do believe the Sqlite supports the Entity Framework too. That's a dead ringer for me. Last edited by iggy_hunter; August 9, 2022 at 18:58. |
![]() |
![]() |
![]() |
#6 | |
Adept
Join Date: Apr 2021
Posts: 122
![]() |
Quote:
Also, if you’re using any DB for saves, you’re going to need to rework the save code. Big binary blobs are going to make your DB files grow really, really quickly. (Maybe. It’s possible there’s some kind of support in MySQL or Postgres for storage of large blobs in the filesystem; I’m no expert.) |
|
![]() |
![]() |
![]() |
#7 |
Apprentice
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 85
![]() |
Julian ... yes ... I see that Sqlite will need a file and file i/o. You beat me to that and I may have to reconsider. I'm already at the point where I have an IPersistentStorage class that is working to inject storage services ... so I should be able to test the Sqlite with IIS shortly.
Also, I see the save games are about 3MB ... but I believe I may be able to trim that down in the future... but disk space is cheap and I'll worry about that later. ![]() The game also keeps high scores. Those are small. Settings at this point has been mangled and will most likely get reworked based on the clients and other things. |
![]() |
![]() |
![]() |
#8 |
Veteran
Join Date: Jun 2007
Posts: 1,391
![]() |
If you need a shared database then I'd heartily recommend PostgreSQL. It's free and Free/Libre, it performs well, it's good at preserving data integrity (e.g. you can have data checksumming), etc. etc.
I've been using it in various production systems for 20+ years at this point and no complaints whatsoever. EDIT: Btw, SQLite doesn't do multi-writer, so if you need that (which I'm guessing you do, because multiple concurrent play sessions), it's definite a no-go. |
![]() |
![]() |
![]() |
#9 |
Apprentice
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 85
![]() |
@AnonymousHero ... that was another nail in the Sqlite coffin ... locking the entire database for each write ... I've been using PostgreSql for some time too ... but I would like to hear from both Linux and Mac users that they would give a thumbs up to PostgreSql and/or MySql. Entity framework support will be a big plus for me.
|
![]() |
![]() |
![]() |
#10 | |
Veteran
Join Date: Jun 2007
Posts: 1,391
![]() |
Quote:
![]() https://www.postgresql.org/download/macosx/ seems to indicate the MacOS is pretty well supported by the project. |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any way to increase storage capacity of Home? | pipMcDohl | Vanilla | 10 | March 28, 2022 19:20 |
Persistent levels | Nick | Vanilla | 105 | March 10, 2021 11:00 |
Storage Question! | Incandenza | ToME | 13 | October 31, 2018 17:48 |
Persistent bugs | Ingwe Ingweron | Development | 9 | October 24, 2013 15:45 |
Variant with persistent dungeons? | Sabreman | Variants | 5 | November 15, 2007 22:22 |