Edwin Eyan Moragas wrote:
hi group,
i have several small questions for the group any
experiences or thoughts shared would be greatly
appreciated.
1) anybody used sqlite as a sql server? i'm thinking
of say using the embedded sqlite in PHP5 or similar.
2) anybody ever implemented something like a single
process of sqlite doing queries for a lot of networked
clients?
3) how big has your sqlite database grown? have you had any trouble
managing the db? any bad experiences as to stability of
the db file?
i am asking all of these is because i'm seriously considering
sqlite to be used as my sql server for a project.
how i'll implement it looks something like this:
components of app:
embedded web server
sqlite
some scripting language
there will only be one sqlite process which will be forked
when the web server is launched. queries to sqlite will
be sent to the sqlite process via sockets.
i can see that the queries will be sequential. no problems
there. i'm not worried with speed at the moment. i just want
to know if this has been done before and i'd like
to solicit wisdom from the group.
thank you.
./e
We use a single process server as an Sqlite server. It works well
because it obeys certain constraints:
o Transactions are always short
o It has many users and many Sqlite databases, but each database
does not have a large number of users, or more correctly a large traffic
rate.
o Row scans are avoided on large tables.
The benefits are the ease of maintenance of multiple databases, each one
being just a file. Transactions complete typically in less than 500uS.
We use HTTP protocol to access the Sqlite server, and it allocates one
or two threads to each user connection (a browser will try to open two
connections).
If you have large transactions or large numbers of users sharing a
database, consider using something like PostgreSQL, Oracle or DB/2.
Sqlite is inherently single streamed and that imposes a cap on its
ability to handle many simultaneous connections to a single database.
For a scripting language we implemented Javascript to be sympathetic to
application programmers already using JS in their web pages. Sqlite can
execute Javascript functions and Javascript programs can call Sqlite.
We insulate the server from SQL injection attacks by storing a library
of SQL on the server in the form of RPCs and never sending it from the
client.
Finally, using a server to share Sqlite on a network is more robust than
using file sharing.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------