Hi all, As mentioned in [1], multiple environment support is implemented for Cassandra. Initially, the plan was to have one Cassandra cluster per environment. But, according to Casandra people, the recommended way is to use separate Cassandra cluster per application. So, there can be use cases to have multiple Cassandra clusters per environment. So, multiple cluster support per environment is also implemented.
A new config file (cassandra-environments.xml) is introduced with this. *<CassandraEnvironmentConfig>* * <CassandraEnvironments>* * <Environment>* * <Name>DEFAULT</Name>* * <!-- * * IsExternal? * * true : If External Cassandra is used* * false : If WSO2 Cassandra is used* * -->* * <IsExternal>false</IsExternal>* * </Environment>* * <Environment>* * <Name>DEV</Name>* * <IsExternal>true</IsExternal>* * <Clusters>* * <Cluster>* * <Name>DevCluster</Name>* * <DataSourceJndiName>DevDS</DataSourceJndiName>* * </Cluster>* * <Cluster>* * <Name>ProdCluster</Name>* * <DataSourceJndiName>ProdDS</DataSourceJndiName>* * </Cluster>* * </Clusters>* * </Environment>* * </CassandraEnvironments>* *</CassandraEnvironmentConfig> * Here, we have to specify whether these environments are using external Cassandra or internal Cassandra (i.e. WSO2 version). The clusters in environments (except for the ones in DEFAULT environment) have *DataSourceJndiName *property which points to a datasource in master-datasource.xml. Those datasources represent real Cassandra clusters. In DEFAULT environment, we don't have to give *DataSourceJndiName *property, because cluster information of that environment is taken from hector-config.xml. That is how it was configured so far, and I kept it as it is for backward compatibility. May be, in future we can get rid of hector-config.xml and get the default environment details too from master-datasource.xml. [1] [Architecture] Supporting multiple environments for Cassandra Thanks, Bhathiya -- *Bhathiya Jayasekara* *Software Engineer,* *WSO2 inc., http://wso2.com <http://wso2.com>* *Phone: +94715478185 <%2B94715478185>* *LinkedIn: http://www.linkedin.com/in/bhathiyaj <http://www.linkedin.com/in/bhathiyaj>* *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* *Blog: http://movingaheadblog.blogspot.com <http://movingaheadblog.blogspot.com/>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
