#help with databases.

14 messages · Page 1 of 1 (latest)

scarlet glade
#

*I have not dabbled with any kind of databases.

I am trying to make an application hosted on a linux server that people can use the hosted wifi SSID.
the application will have a webserver on :80 for clientside webtrafic.
i want the clients to beable to do something in the clientside, the clientside will send a request to another webserver (my rust server) on :1010, when this server gets a packet, they will do some logic based on current states, and update/read the database and respond.

do i need a database to do this? if so help me.

fierce pelican
#

I would probably start by mocking the database with one or more HashMaps. You can also use this implementation for testing, and replace it with a database once you have a better idea what your needs are. The primary reason to use a database is durability, it's stored to disk so it can be recovered on power failure / crash. But for development this isn't needed.

scarlet glade
#

this is my reasoning exactly.
and the plan is to beable to export some of the data and view it later.

scarlet glade
#

ok, i have planned out most of my front and backend.
I have found two database "controllers" (or whatever they're called) SQLx and Diesel.
I'm strugeling to decide witch one.
it will be running in the same rust project with the REST api
(i'm planning to use warp)

#

and i'm planning to use PostreSQL.
that's what i've heard is good,

gusty ledge
#

Use sqlite if you're not dealing with large amounts of data

scarlet glade
#

define large?
and is it easier to use than postgresql?

patent otter
#

so if you prior the minimalism, the better option is to use sqlite instead

scarlet glade
#

is it easier to use than postgres?
i already installed it, but i can uninstall it if sqlite would be better.

patent otter
scarlet glade
#

i am

patent otter
#

and sqlite is "lite" so it's smaller but doesn't mean it's slow