Wednesday, December 22, 2010, 1:19:25 AM, you wrote:

SS> On 21 Dec 2010, at 1:44pm, Philip Graham Willoughby wrote:

>> Implementing an SQLite-based server does not obviously enable this in and of 
>> itself. If you could open a database on a remote machine using its filename 
>> as the OP was trying to do it would enable this, but we got into this 
>> discussion when it was discovered that doing so was a bad idea.

SS> This was my first thought when I considered implementing an
SS> SQLite-over-IP protocol: that there was no user model and
SS> therefore no need for passwords.  Mounting a database on the
SS> server would mean that anyone who knew your IP address, port
SS> number and database name could access the data.

SS> So my conclusion was that you would need to implement, in the
SS> first case, a simple user privilege model, nominating which users
SS> (or which IP addresses) could access which databases.

SS> Just to throw into the pot:

SS> It's not that hard to do an extremely simple version of this
SS> using HTTP and either XML or JSON.  Set up a web server with some
SS> PHP or Python pages which take the following parameters:

SS> databasename
SS> command

SS> You call up the right web page with the right values for the
SS> parameters, either as a GET or a PUT.  One web page just executes
SS> the command and returns a result code, result message, etc., in
SS> either XML or JASON, depending on what the programmer likes best. 
SS> A different web page is for executing SELECTs (or some PRAGMAs)
SS> and returns the above plus a table of results.

If you are considering heading down this track I'd suggest seriously
considering using a REST API. I've been doing an evaluation of various
NoSQL Databases recently, mainly with CouchDB and it uses REST quite
effectively. And stick with JSON.

Emulating the WebSQL API may be another option. This is used by
WebKit/Chrome etc. to access SQLite.

And another option could be to use the MySQL tcp/ip interface which I
assume is well documented. I mention this because I am doing some
work with Node.js which has a MySQL interface and am using
XMLHTTPRequest (Ajax) in Javascript in the Browser to access the MySQL
DB on the Web Server via. Node.js.

---
Best regards,
  Neville Franks, http://www.surfulater.com http://blog.surfulater.com
 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to