Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old August 9, 2022, 15:30   #1
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL
Posts: 68
iggy_hunter is on a distinguished road
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.
iggy_hunter is offline   Reply With Quote
Old August 9, 2022, 15:38   #2
Julian
Adept
 
Join Date: Apr 2021
Posts: 118
Julian is on a distinguished road
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.
Julian is offline   Reply With Quote
Old August 9, 2022, 17:39   #3
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Posts: 967
tangar is on a distinguished road
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
tangar is offline   Reply With Quote
Old August 9, 2022, 17:47   #4
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL
Posts: 68
iggy_hunter is on a distinguished road
Files and directories are awesome ... but from a webserver environment, they are considered to be off-limits for read-write access.
iggy_hunter is offline   Reply With Quote
Old August 9, 2022, 17:50   #5
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL
Posts: 68
iggy_hunter is on a distinguished road
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 17:58.
iggy_hunter is offline   Reply With Quote
Old August 9, 2022, 19:31   #6
Julian
Adept
 
Join Date: Apr 2021
Posts: 118
Julian is on a distinguished road
Quote:
Originally Posted by iggy_hunter View Post
Files and directories are awesome ... but from a webserver environment, they are considered to be off-limits for read-write access.
Then SQLite’s probably no-go as well. It doesn’t have a server, and does everything through file i/o.

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.)
Julian is offline   Reply With Quote
Old August 9, 2022, 20:12   #7
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL
Posts: 68
iggy_hunter is on a distinguished road
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.
iggy_hunter is offline   Reply With Quote
Old August 10, 2022, 10:24   #8
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,390
AnonymousHero is on a distinguished road
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.
AnonymousHero is offline   Reply With Quote
Old August 10, 2022, 13:54   #9
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL
Posts: 68
iggy_hunter is on a distinguished road
@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.
iggy_hunter is offline   Reply With Quote
Old August 11, 2022, 07:33   #10
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,390
AnonymousHero is on a distinguished road
Quote:
Originally Posted by iggy_hunter View Post
@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.
Can't speak for Mac users, but I'm using Linux exclusively, so that's a thumbs up from me

https://www.postgresql.org/download/macosx/ seems to indicate the MacOS is pretty well supported by the project.
AnonymousHero is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to increase storage capacity of Home? pipMcDohl Vanilla 10 March 28, 2022 18:20
Persistent levels Nick Vanilla 105 March 10, 2021 10:00
Storage Question! Incandenza ToME 13 October 31, 2018 16:48
Persistent bugs Ingwe Ingweron Development 9 October 24, 2013 14:45
Variant with persistent dungeons? Sabreman Variants 5 November 15, 2007 21:22


All times are GMT +1. The time now is 01:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.