[Building Sakai] Persistence for Sakai Properties/Config

Earle Nietzel earle.nietzel at gmail.com
Mon Jun 3 08:42:31 PDT 2013


Hello everyone,

Looking for review and/or comments about a new feature persisting
properties/config in sakai.

https://jira.sakaiproject.org/browse/KNL-1063

There are 2 properties that have been added:
1) sakai.config.db.sync = (true/false) this property sync's the persisted
config with any changes done in the files
2) sakai.config.db.enable = (true/false) this property enables persisted
config to be supplied to sakai at startup.

The JIRA issue contains some technical details but I will summarize here.

- Persists every config that the SCS learns about into a table named
sakai_config_property.
- Secured properties are encrypted before being persistes (uses jasypt
library)
- In a clustered Sakai every nodes data is partitioned using the serverId.
(i.e. if you have a 4 node cluster then you will have 4 properties with the
same name but with 4 different value in the NODE field. NODE + NAME are
unique. Each node only updates it's config.

Here is a look at the new table sakai_config_property:

CREATE TABLE `sakai_config_property` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `NODE` varchar(64) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `VALUE` text,
  `TYPE` varchar(16) NOT NULL,
  `DEFAULT_VALUE` text,
  `DESCRIPTION` text,
  `SOURCE` varchar(255) DEFAULT NULL,
  `DEFAULTED` bit(1) NOT NULL,
  `REGISTERED` bit(1) NOT NULL,
  `SECURED` bit(1) NOT NULL,
  `DYNAMIC` bit(1) NOT NULL,
  `CREATED` datetime NOT NULL,
  `MODIFIED` datetime NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `SCP_NODE_NAME_IDX` (`NODE`,`NAME`)
)

All comments and suggestions are welcome?

Earle

PS features currently not implemented and needs input:
- Caching (may not be needed)
- Updating a property across the cluster (i.e. add a clustered bit)
- Smarter configuration from files (i.e. unix style bitwise to the
beginning of a config to tell whether it is secured, dynamic, clustered
7.search.enable=true  would set them all to true)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130603/ed70437c/attachment.html 


More information about the sakai-dev mailing list