Closed robocoder closed 13 years ago
Considering that the 1.0 version jump will increase popularity of Piwik and more developers might start developing plugins, shouldn't we have a stable data access layer by then? (meaning: Shouldn't the target version be 1.0 instead of after 1.0?)
If you guys need help making these changes, I'm more than happy to help.
Post-1.0 means it isn't on the 1.0 roadmap, and that 1.0's release doesn't depend on this feature. Any/all help is welcome since many have asked for this feature, and it currently isn't the highest priority on my plate.
I've glossed over some implementation details, so feel free to ask questions, request feedback on patches, or prod me on some task.
We should also reconsider using Zend for the Tracker.
Pros:
I moved some items from 'additional ideas' to TODO.
Side note: this Data access abstraction would make it easier to build sharding into Piwik, as we could have a Sharding schema, subclassing Mysql, that would modify queries to access the right shard when applicable.
(In [refs #1368 - hard-code the list of supported adapters since it seems unlikely we'll have adapters as plugins; no longer depends on globr() or hack from 1632)
(In [2265]) refs #1368 - Piwik::prefixTable() is deprecated
(In [2266]) refs #1368 - Piwik::prefixTable() is deprecated
(In [2267]) refs #1368 - remove deprecated functions: prefixTable (since 0.2.27), isPhpCliMode (since 0.4.4), and getMysqlVersion (since 0.4.4)
(In [2268]) refs #1368 - initial refactoring of MySQL schema methods from Piwik.php
(In [2273]) refs #1368 - rename Piwik_Db_iAdapter to Piwik_Db_Adapter_Interface for consistency
(In [2274]) refs #1368 - further refactoring of Piwik.php; initial abstraction of MySQL schema
(In [2276]) refs #1368 - move low-level $dbInfos mangling to adapter
(In [2277]) refs #1368
(In [2278]) refs #1335, refs #1368 - check in Jason's Piwik_Db_Adapter_Pdo_Mssql class (excluding the schema and query methods being refactored elsewhere; edited to conform to coding style guidelines; note: a lot of the logic in getConnection() looks like it should be moved upstream to ZF (2.0 CTP1 related?) especially if CTP2 introduces breaking changes to the DSN
(In [2279]) refs #1368 - preprocessing the SQL to be made obsolete by query classes/methods
(In [2281]) refs #1368 - more refactoring and phpdocs
(In [2282]) refs #1368 - implemented isAvailable() and private method hasStorageEngine(); added Schema.loadSchema hook for Sharding plugin; more phpdocs
(In [2739]) refs #1368 - use schema instead of adapter; in strict mode, update() can't be abstract
Zend_Db_Adapter_Pdo_Sqlsrv: http://github.com/akrabat/Akrabat/blob/master/zf1/Akrabat/Db/Adapter/Pdo/Sqlsrv.php
Moving as it is more long term project
This will definitely be worked on to some extent (most likely: tracking code, archiving code for performance optimization) in 1.x, but it will be fully implemented (eg. sites/users/goals SQL will stay as is).
Are there any updates?
Is it possible to get piwik at least tracking with mssql?
dk-at-cabag: if there were updates, it would appear here in the trac log. This is a low priority enhancement. In terms of timeframe, I plan to work on this after the plugins repository is online.
re: mssql. You can try to port Jason's code (see #1335) to the latest Piwik release.
(In [4690]) refs #1368 - refactoring the batch insert code
(In [4693]) refs #1368
See ticket #2593
Users have requested Piwik support for non-MySQL databases, e.g., PostgreSQL (#500), MSSQL (#1335), and NoSQL (see mailing list).
Obstacles:
Considerations:
TODO:
refactor Piwik.php into core/Db/Schema/*Propose changing instances of:
to:
The $sql is moved into Query classes, defined in:
(Any of the above is acceptable and handled by the autoloader.)
Piwik_Repository::execute($queryName, $parameters) could be something like:
The factory method returns an object or string (e.g., schema-specific SQL). Non-MySQL schemas can either:
The prefix on the query name tells the factory method how to construct the class name. A query name prefixed by Db is treated as a core query. A query name prefixed by the plugin's name, e.g., GeoIP refers to a query in the GeoIP plugin's Query folder.
Additional ideas: