stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Eppel (meppel)" <mep...@cisco.com>
Subject RE: [Discuss] Fixing Comma Separated Dependency JSON Definitions
Date Wed, 13 May 2015 00:45:01 GMT
Hi Imesh,

Looking at your example :
{
   "startupOrders":[
      {
         "aliases":[
            "cartridge.oracle1",
            "cartridge.cassandra1",
            "cartridge.tomcat1"
         ]
      },
      {
         "aliases":[
            "cartridge.oracle1",
            "cartridge.redis1"
         ]
      }
   ],


Just to confirm, does this mean the following ?

Oracle1 starts up first, when active -> cassandra1 and redis1 start up, when cassandra1
is active -> tomcat1 starts up ?

Thanks

Martin



From: Shaheedur Haque (shahhaqu)
Sent: Tuesday, May 12, 2015 9:32 AM
To: dev@stratos.apache.org
Cc: Reka Thirunavukkarasu; Dakshika Jayathilaka; Martin Eppel (meppel)
Subject: RE: [Discuss] Fixing Comma Separated Dependency JSON Definitions

Let me come to the alias part in a moment, because I have thought about that last night ☺.

The question I posed might be phrased like this:


·        My expectation is that startup orders were originally meant to be expressed as pairwise
relationships.

·        So, I don’t understand the significance of the first part of your example (highlighted
in red below).

o   Is the idea that this is saying “start oracle1, then cassandra1 and then tomcat1”?

The question about aliases is an interesting one. As you know, I disagree with the idea that
aliases are used instead of the basic name in these constructs because from a user’s point
of view, s/he only cares about the original names. AFAICS, aliases are a manifestation of
the internal implementation of Stratos and do not belong in the public JSON. To the extent
that they are already there, and already used for other stuff, does not justify proliferating
their use.

From: Imesh Gunaratne [mailto:imesh@apache.org]
Sent: 12 May 2015 02:27
To: dev
Cc: Reka Thirunavukkarasu; Dakshika Jayathilaka
Subject: Re: [Discuss] Fixing Comma Separated Dependency JSON Definitions

Hi Shaheed,

I'm sorry I did not get what you mean. Do you think we need to avoid using the "aliases" attribute
and make the syntax as below?

{
   "startupOrders":[
      [
         "cartridge.oracle1",
         "cartridge.cassandra1",
         "cartridge.tomcat1"
      ],
      [
         "cartridge.oracle1",
         "cartridge.redis1"
      ]
   ],
   "scalingDependents":[
      [
         "cartridge.redis1",
         "cartridge.tomcat1"
      ]
   ]
}

On Tue, May 12, 2015 at 4:03 AM, Shaheedur Haque (shahhaqu) <shahhaqu@cisco.com<mailto:shahhaqu@cisco.com>>
wrote:
I’m confused by the new syntax. Originally, startup orders were pairs of comma separated
strings, “A, B” implying an order between A and B, and that the change was simply to make
it [“A”, “B”]. What does it mean when you have [“A”, “B”, “C”]:


1.      Is the order A then B then C?

2.      Is the meaning EXACTLY the same as specifying [“A”, “B”] and also [“B”,
“C”]?


From: Imesh Gunaratne [mailto:imesh@apache.org<mailto:imesh@apache.org>]
Sent: 10 May 2015 10:37
To: dev
Cc: Shaheedur Haque (shahhaqu); Reka Thirunavukkarasu; Dakshika Jayathilaka
Subject: Re: [Discuss] Fixing Comma Separated Dependency JSON Definitions

I have now updated the Cartridge Group & Application creation pages in the UI with this
modification:

[cid:image001.png@01D08CDA.46448840]

[cid:image002.png@01D08CDA.46448840]

Thanks

On Sun, May 10, 2015 at 2:15 PM, Imesh Gunaratne <imesh@apache.org<mailto:imesh@apache.org>>
wrote:
I have now updated the API and the samples accordingly. The changes were pushed to master
branch with the following commit revision:
112680a12ec5dc0a53d8253eb7818bf0e76adf07

We need to update the UI with this modification.

Thanks

On Sun, May 10, 2015 at 1:47 PM, Imesh Gunaratne <imesh@apache.org<mailto:imesh@apache.org>>
wrote:
It looks like I have made a mistake in the above sample when defining aliases. Aliases should
either start with "cartridge." or "group.":

{
   "startupOrders":[
      {
         "aliases":[
            "cartridge.oracle1",
            "cartridge.cassandra1",
            "cartridge.tomcat1"
         ]
      },
      {
         "aliases":[
            "cartridge.oracle1",
            "cartridge.redis1"
         ]
      }
   ],
   "scalingDependents":[
      {
         "aliases":[
            "cartridge.redis1",
            "cartridge.tomcat1"
         ]
      }
   ]
}

On Sun, May 10, 2015 at 12:42 PM, Imesh Gunaratne <imesh@apache.org<mailto:imesh@apache.org>>
wrote:
A good point Chamila! IMO order of elements in array is by default preserved by CXF. We might
need to verify it.

Thanks

On Sun, May 10, 2015 at 12:12 PM, Chamila De Alwis <chamilad@wso2.com<mailto:chamilad@wso2.com>>
wrote:

Hi Imesh,

Is the order among the array preserved during serialization and de serialization in JSON?
Is it explicitly declared in the bean via JsonPropertyOrder annotation?
On May 10, 2015 11:57 AM, "Imesh Gunaratne" <imesh@apache.org<mailto:imesh@apache.org>>
wrote:
Hi Devs,

According to a suggestion made by Shaheed I have now updated the dependency JSON definitions
(startup orders and scaling dependents) as follows:

{
   "startupOrders":[
      {
         "aliases":[
            "oracle.oracle1",
            "cassandra.cassandra1",
            "tomcat.tomcat1"
         ]
      },
      {
         "aliases":[
            "oracle.oracle1",
            "redis.redis1"
         ]
      }
   ],
   "scalingDependents":[
      {
         "aliases":[
            "redis.redis1",
            "tomcat.tomcat1"
         ]
      }
   ]
}

Please feel free to share your thoughts on this.

Thanks

--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos



--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos



--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos



--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos



--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos



--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
Mime
View raw message