Hi All,

Please refer [1] on the initial discussion on deploying WSO2 middleware on
Apache Mesos. It needs a Carbon Membership Scheme for automatically
dis-coverying the Hazelcast based cluster and allowing the instances to be
scaled in any order without breaking the cluster at any point.

On high level a such Carbon Membership Scheme [2] would work as follows:

   - When a Carbon server is bootstrapped, the clustering agent will
   initialize the membership scheme given in the clustering configuration in
   the axis2.xml (relates to Carbon 4.2.x, 4.4.x).
   - Then it will try to talk to an API and get the list of members
   available in the given cluster.
   - The above API response should include the hostname/ip address and the
   Hazelcast port (might be a proxy port) of each member.
   - Thereafter the membership scheme will initialize the Hazelcast
   configuration by using the above member information and let Carbon create
   the Hazelcast instance.
   - According to this model each Carbon server in the cluster will get
   connected to every other instance. As a result the cluster will be able to
   autoscaled in any order.

In Mesos, the Marathon REST API [3] can be used for the above purpose. Once
a Carbon server is deployed in Mesos via Marathon, it schedules tasks for
creating the containers. Each task would represent a container and
containers would get dynamic host ports allocated for each port it exposes.

Using the below API method [4] those tasks can be listed:

*GET /v2/apps/<application-id>/tasks*

HTTP/1.1 200 OKContent-Type: application/jsonServer:
Jetty(8.y.z-SNAPSHOT)Transfer-Encoding: chunked

{
    "tasks": [
        {
            "host": "agouti.local",
            "id": "my-app_1-1396592790353",
            "ports": [
                31336,
                31337
            ],
            "stagedAt": "2014-04-04T06:26:30.355Z",
            "startedAt": "2014-04-04T06:26:30.860Z",
            "version": "2014-04-04T06:26:23.051Z"
        },
        {
            "host": "agouti.local",
            "id": "my-app_0-1396592784349",
            "ports": [
                31382,
                31383
            ],
            "stagedAt": "2014-04-04T06:26:24.351Z",
            "startedAt": "2014-04-04T06:26:24.919Z",
            "version": "2014-04-04T06:26:23.051Z"
        }
    ]}


[1] [Architecture] Deploying WSO2 Middleware on Mesos
[2]
https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme
[3] https://mesosphere.github.io/marathon/docs/rest-api.html
[4]
https://mesosphere.github.io/marathon/docs/rest-api.html#get-v2-apps-appid-tasks


Thanks

-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.io
Lean . Enterprise . Middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to