1

If I use Sequel in a Ruby app like this:

DB = Sequel.sqlite('testdb.db')

does it make the database shared? Can I acces this same file from a different ruby app AT THE SAME TIME and get the database to perform locking etc?

I'm thinking probably not and i'd have to actually have a separate instance of the database running.

0

2 Answers 2

1

Yes, if you use a file backed database, you can access it by multiple processes. They don't even have to be ruby processes. Note that in SQLite, writers block all readers, so multi-process or multi-threaded write performance is not very good.

Sign up to request clarification or add additional context in comments.

Comments

0

This is not up to neither Ruby nor Sequel. It's up to sqlite. Take a look at sqlite FAQ, and see whether it answers your question.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.