SQLite Server
- Posted by euphoric (admin) Jan 04, 2017
- 1544 views
I'm thinking of setting up an SQLite database and have a question about concurrency. I want to make sure I deal with clashes properly so the database doesn't get broken.
I'm setting it up like this:
- Apache receives the request (e.g., "https://mywebsite.com/api_call.ex?param1=3¶m2=Bill¶m3=form_001")
- api_call.ex is run and needs to access the SQLite database. What happens here if the database is unavailable? Can I enable some kind of "wait state" so that it waits until the DB is available before finishing? Can I specify a time-out length?
Will it work this way? Do I need to write a server instead, where each instance of api_call.ex calls a server app that manages database hits? It seems in the setup described above, Apache is acting as the server, so this should work, so long as I can wait for the database to be available.