2011-06-05, 11:49
topfs2 Wrote:If you give the outside world access to your mysql it is your setup not XBMC which gives access to it. The same if you give remote access to the sqldb file, its a big difference between YOU giving remote programs all access to the database and XBMC ALWAYS giving all access to the database. JSONRPC gives access based on what the client requests and on a per client basis, so a nfo editor may change the data but your phone may only read.
Also you should not assume it will either be sqlite or mysql, there have been talks about switching to other databases before and is something which is a likely scenario. Besides, forcing a client to write both for sqlite and mysql has been shown problematic (the differences are small but they are there). If you force a client to also write to couchdb or whatever because we switch to it for eden, it just becomes unmanageable. Why should the client _need_ to care for it, makes no sense.
You may use it for now but it is clear that giving full access to the database is not future proof, there is no room for arguing on that point. It is deprecated and will at some point be removed. If you wish to give full access to your mysql or sqlitedb file, this is your choice.
Cheers,
Tobias
I totally understand the approach but will you support at least readonly SQL queries when the http api is removed? There will always be something missing and while adding it to the new api is the way to go that means quite some lead time if you develop add-ons for existing stable.
Assuming sql is only used while waiting for the next stable, changes to db model is not an issue since the code is only meant to be used in one version before being replaced with a api call.