Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 43DA1200CC1 for ; Mon, 10 Jul 2017 21:11:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4274A1642E3; Mon, 10 Jul 2017 19:11:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 60B711642D6 for ; Mon, 10 Jul 2017 21:11:10 +0200 (CEST) Received: (qmail 98711 invoked by uid 500); 10 Jul 2017 19:11:04 -0000 Mailing-List: contact commits-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.apache.org Delivered-To: mailing list commits@helix.apache.org Received: (qmail 98701 invoked by uid 99); 10 Jul 2017 19:11:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2017 19:11:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B7C39193EE4 for ; Mon, 10 Jul 2017 19:11:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.752 X-Spam-Level: X-Spam-Status: No, score=-99.752 tagged_above=-999 required=6.31 tests=[KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ANWmeRx7WeXz for ; Mon, 10 Jul 2017 19:11:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2988662668 for ; Mon, 10 Jul 2017 19:11:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 56320E0984 for ; Mon, 10 Jul 2017 19:11:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1461824696 for ; Mon, 10 Jul 2017 19:11:00 +0000 (UTC) Date: Mon, 10 Jul 2017 19:11:00 +0000 (UTC) From: "Jiajun Wang (JIRA)" To: commits@helix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HELIX-659) Extend Helix to Support Resource with Multiple States MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 10 Jul 2017 19:11:11 -0000 [ https://issues.apache.org/jira/browse/HELIX-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jiajun Wang updated HELIX-659: ------------------------------ Description: h1. Problem Statement h2. Single State Model v.s. Multiple State Models Currently, Each Helix resource is associated with a single state model, and each replica of a partition can only be in any one of these states defined in the state model at any time. And Helix manages state transition based on the single state model. !https://documents.lucidchart.com/documents/e19ab04e-aa06-4ab3-9e57-cfe273554fa1/pages/0_0?a=2416&x=-11&y=71&w=517&h=198&store=1&accept=image%2F*&auth=LCA%20313ced8fb855e8fc1a7043f7fe91cdfa15fffb6b-ts%3D1498857664! However, in many scenarios, resources could be more complicated to be modeled by a single state model. As an example, partitions from a resource could be described in different dimensions: SlaveMaster state, Read or Write state and its versions. They represent different dimensions of the overall resource status. States from each dimension are based on different state models. Note that we have state machines simplified in this document. !https://documents.lucidchart.com/documents/e19ab04e-aa06-4ab3-9e57-cfe273554fa1/pages/0_0?a=2416&x=-71&y=66&w=1822&h=308&store=1&accept=image%2F*&auth=LCA%2041fa743ba130f41786dee3527de6206cebdd4534-ts%3D1498857664! The basic idea is that states in these 3 dimensions are in parallel and can be changed independently. For instance, R/W state may be changed without updating slave/master state. h2. Finite State Machine v.s. Dynamic State Model In addition, Helix employs finite state machine to define a state model. However, some state model can not be easily modeled by a finite state machine with fixed states, for example, the versions. We call such state model as the dynamic state model. It is read, set, and understood by the application. We will need to extend Helix to support such dynamic state model. Note that Helix should not and will not be able to calculate the best possible dynamic states. The version of a software is one of the best examples to understand dynamic state. Let's consider one application that is deployed on multiple nodes, which work together as a cluster. The green node works as the master, and all dark blue nodes are slaves. When Admins upgrades the service from 1.0.0 to 1.1.0, they need to ensure upgrading all nodes to the new version and then claim upgrade is done. After the upgrade process, it is important to ensure that all software versions are consistent. If Helix framework is leveraged to support upgrading the cluster, it will help to simplify application logic and ensure consistency. For instance, the service (cluster) itself is regarded as the resource. And each node is mapped as a partition. Then upgrading is simply a state transition. Admins can check external view for ensuring consistency. Note that during this version upgrade, the master node is still master node, and slave nodes are still slave nodes. So the version state is parallel to the other states. was: h1. Problem Statement h2. Single State Model v.s. Multiple State Models Currently, Each Helix resource is associated with a single state model, and each replica of a partition can only be in any one of these states defined in the state model at any time. And Helix manages state transition based on the single state model. https://documents.lucidchart.com/documents/e19ab04e-aa06-4ab3-9e57-cfe273554fa1/pages/0_0?a=2416&x=-11&y=71&w=517&h=198&store=1&accept=image%2F*&auth=LCA%20313ced8fb855e8fc1a7043f7fe91cdfa15fffb6b-ts%3D1498857664 However, in many scenarios, resources could be more complicated to be modeled by a single state model. As an example, partitions from a resource could be described in different dimensions: SlaveMaster state, Read or Write state and its versions. They represent different dimensions of the overall resource status. States from each dimension are based on different state models. Note that we have state machines simplified in this document. https://documents.lucidchart.com/documents/e19ab04e-aa06-4ab3-9e57-cfe273554fa1/pages/0_0?a=2416&x=-71&y=66&w=1822&h=308&store=1&accept=image%2F*&auth=LCA%2041fa743ba130f41786dee3527de6206cebdd4534-ts%3D1498857664 The basic idea is that states in these 3 dimensions are in parallel and can be changed independently. For instance, R/W state may be changed without updating slave/master state. h2. Finite State Machine v.s. Dynamic State Model In addition, Helix employs finite state machine to define a state model. However, some state model can not be easily modeled by a finite state machine with fixed states, for example, the versions. We call such state model as the dynamic state model. It is read, set, and understood by the application. We will need to extend Helix to support such dynamic state model. Note that Helix should not and will not be able to calculate the best possible dynamic states. The version of a software is one of the best examples to understand dynamic state. Let's consider one application that is deployed on multiple nodes, which work together as a cluster. The green node works as the master, and all dark blue nodes are slaves. When Admins upgrades the service from 1.0.0 to 1.1.0, they need to ensure upgrading all nodes to the new version and then claim upgrade is done. After the upgrade process, it is important to ensure that all software versions are consistent. If Helix framework is leveraged to support upgrading the cluster, it will help to simplify application logic and ensure consistency. For instance, the service (cluster) itself is regarded as the resource. And each node is mapped as a partition. Then upgrading is simply a state transition. Admins can check external view for ensuring consistency. Note that during this version upgrade, the master node is still master node, and slave nodes are still slave nodes. So the version state is parallel to the other states. > Extend Helix to Support Resource with Multiple States > ----------------------------------------------------- > > Key: HELIX-659 > URL: https://issues.apache.org/jira/browse/HELIX-659 > Project: Apache Helix > Issue Type: New Feature > Components: helix-core > Affects Versions: 0.6.x > Reporter: Jiajun Wang > > h1. Problem Statement > h2. Single State Model v.s. Multiple State Models > Currently, Each Helix resource is associated with a single state model, and each replica of a partition can only be in any one of these states defined in the state model at any time. And Helix manages state transition based on the single state model. > !https://documents.lucidchart.com/documents/e19ab04e-aa06-4ab3-9e57-cfe273554fa1/pages/0_0?a=2416&x=-11&y=71&w=517&h=198&store=1&accept=image%2F*&auth=LCA%20313ced8fb855e8fc1a7043f7fe91cdfa15fffb6b-ts%3D1498857664! > However, in many scenarios, resources could be more complicated to be modeled by a single state model. > As an example, partitions from a resource could be described in different dimensions: SlaveMaster state, Read or Write state and its versions. They represent different dimensions of the overall resource status. States from each dimension are based on different state models. Note that we have state machines simplified in this document. > !https://documents.lucidchart.com/documents/e19ab04e-aa06-4ab3-9e57-cfe273554fa1/pages/0_0?a=2416&x=-71&y=66&w=1822&h=308&store=1&accept=image%2F*&auth=LCA%2041fa743ba130f41786dee3527de6206cebdd4534-ts%3D1498857664! > The basic idea is that states in these 3 dimensions are in parallel and can be changed independently. For instance, R/W state may be changed without updating slave/master state. > h2. Finite State Machine v.s. Dynamic State Model > In addition, Helix employs finite state machine to define a state model. However, some state model can not be easily modeled by a finite state machine with fixed states, for example, the versions. We call such state model as the dynamic state model. It is read, set, and understood by the application. We will need to extend Helix to support such dynamic state model. Note that Helix should not and will not be able to calculate the best possible dynamic states. > The version of a software is one of the best examples to understand dynamic state. > Let's consider one application that is deployed on multiple nodes, which work together as a cluster. The green node works as the master, and all dark blue nodes are slaves. When Admins upgrades the service from 1.0.0 to 1.1.0, they need to ensure upgrading all nodes to the new version and then claim upgrade is done. After the upgrade process, it is important to ensure that all software versions are consistent. > If Helix framework is leveraged to support upgrading the cluster, it will help to simplify application logic and ensure consistency. For instance, the service (cluster) itself is regarded as the resource. And each node is mapped as a partition. Then upgrading is simply a state transition. Admins can check external view for ensuring consistency. > Note that during this version upgrade, the master node is still master node, and slave nodes are still slave nodes. So the version state is parallel to the other states. -- This message was sent by Atlassian JIRA (v6.4.14#64029)