Hi Godwin,

Thanks for the reply. But there seems an issue with ClusterJ as in [1]

"ClusterJ supports primary key and unique key operations and single-table
queries; it does not support multi-table operations, including joins". I
don't think we should be supporting multi table operations for WSO2
products.

Meanwhile I found this regarding MySQL ConnectorJ(which we use usually) [2]
and [3]. So according to them, when we configure as a load balanced URL, as
I mentioned in my initial mail,

*For Load balancing [2] *
>
> jdbc:mysql:loadbalance://[*host*1][:*port*],[*host*2][:*port*][,[*host*3][:*port*]]...[/[*database*]]
>  »[?*propertyName1*=*propertyValue1*[&*propertyName2*=*propertyValue2*]...]
>
> fail over is already implemented by default. My specifying
"loadBalanceBlacklistTimeout" property (which defaults to 0), we can
increase the blacklist time out.

@Bhathiya, do you have any idea on this, as per your blog post [2].

[1] https://dev.mysql.com/doc/ndbapi/en/mccj.html
[2]
http://movingaheadblog.blogspot.com/2014/01/load-balancing-and-failover-in-jdbc.html
[3]
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html

Thanks,
Samitha


On Tue, Jan 9, 2018 at 9:20 AM, Godwin Shrimal <[email protected]> wrote:

> Hi Samith,
>
> There is a java connector called Clusterj which provides APIs to connect
> MySQL NDB cluster. Please see the links below.
>
> [1] https://dev.mysql.com/doc/ndbapi/en/mccj.html
> [2] http://www.clusterdb.com/mysql-cluster/using-clusterj-
> part-of-mysql-cluster-connector-for-java-a-tutorial
>
>
> Thanks
> Godwin
>
>
> On Mon, Jan 8, 2018 at 9:02 PM, Samitha Chathuranga <[email protected]>
> wrote:
>
>> Hi,
>>
>> How to configure a wso2 product with a MySQL NDB cluster database so as
>> the High availability as well the load balancing can be catered altogether.
>> We can have these two capabilities separately by configuring the database
>> connection url appropriately as below.
>>
>> *For High Availability [1]*
>>
>> jdbc:mysql://[*primary host*][:*port*],[*secondary host 
>> 1*][:*port*][,[*secondary host 
>> 2*][:*port*]]...[/[*database*]]»[?*propertyName1*=*propertyValue1*[&*propertyName2*=*propertyValue2*]...]
>>
>> *For Load balancing [2] *
>>
>> jdbc:mysql:loadbalance://[*host*1][:*port*],[*host*2][:*port*][,[*host*3][:*port*]]...[/[*database*]]
>>  »[?*propertyName1*=*propertyValue1*[&*propertyName2*=*propertyValue2*]...]
>>
>>
>> The query is how to achieve both these capabilities with mysql ndb
>> cluster if that is possible.
>>
>> [1] - https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-
>> config-failover.html
>> [2] - https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-
>> usagenotes-j2ee-concepts-managing-load-balanced-connections.html
>> --
>> Samitha Chathuranga
>> Software Engineer, WSO2 Inc.
>> lean.enterprise.middleware
>> Mobile: +94715123761
>>
>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Godwin Amila Shrimal*
> Associate Technical Lead
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
> <https://www.linkedin.com/in/godwin-amila-2ba26844/>*
> twitter: https://twitter.com/godwinamila
> <http://wso2.com/signature>
>



-- 
Samitha Chathuranga
Software Engineer, WSO2 Inc.
lean.enterprise.middleware
Mobile: +94715123761

[image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to