开发者

Is SQLite right for my game?

I have been looking into different database libraries for my online card game (PostgreSQL, Oracle, etc) and, while SOCI + pg or Oracle are much more powerful, they also are tricky to compile, integrate, and do a whole lot more than what I need to do.

Quite simply these are my requirements: Store the username, hash, wins, loses, email. Very simple.

The game itself will actually not communicate with the database that often. When the player logs in, I will log them in by retrieving the row by username, and verifying the hash with the hash generated by the password they enter.

Other than that, the server only accesses the database to add a user, record a win or loss after playing a round, or to update personal information.

Given that SQLite supports limited concurrency, this should be fine for my needs even if I have 100 or so card games running concurrently.

Reflecting on t开发者_运维技巧he above, is SQLite right for me or should I seriously think of opting for a more complex solution? Bearing in mind that databases are not my strongest point.

Thanks


With that many clients SQLite is a perfect fit. However, I would recommend you wrap up this functionality in a simple and not database specific interface, and implement it for SQLite. Once you will get millions of clients along with concurrency/performance issues, you can simply throw in another implementation that uses more powerful database without changing your application code much.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜