100 likes | 265 Views
CAMP Lifecycles. A Proposal for CAMP-55, CAMP-27, and CAMP-20. Problems. “Application” is an abstract concept in CAMP Represented by trees of resources rooted in AssemblyTemplate and Assembly Difficult to talk about the lifecycle of an abstract concept
E N D
CAMP Lifecycles A Proposal for CAMP-55,CAMP-27, and CAMP-20
Problems • “Application” is an abstract concept in CAMP • Represented by trees of resources rooted in AssemblyTemplate and Assembly • Difficult to talk about the lifecycle of an abstract concept • Many-to-one relationship of Assemblies to AssemblyTemplate is not represented • “Uploaded” is not a state of either the AssemblyTemplate or the Assembly • State within the lifecycle is not surfaced by any attribute(s)
Step 1 • Don’t describe the lifecycle of the abstract “Application” • Describe lifecycle of concrete resources • AssemblyTemplate • Assembly
AssemblyTemplate Notes • AssemblyTemplate enters DEPLOYED • externally via “register” • internally via “clone” of an existing AssemblyTemplate • Defined mechanisms for register • POST a URL that refers to a PDP • POST PDP in body of request • extensions allowed • Cloning an AssemblyTemplate creates a new, separate AssemblyTemplate
AssemblyTemplate Notes (contd) • AssemblyTemplates are RUNNABLE if all their ApplicationComponentTemplates have their dependencies resolved • last resolution triggers “resolve” transition • breaking an ACT link triggers “unresolve” • resolution may be performed automagically by implementation • RUNNABLE AssemblyTemplates can be used to create Assemblies
Assembly Lifecycle Notes • Deleting a RUNNING or SUSPENDED Assembly implicitly stops the underlying application • STOPPED state allows introspection of an application that: • has finished its work • has encountered some fatal error • was stopped by the Application Admin
Step 2 • Add “lifecycleState” attributes to both AssemblyTemplate and Assembly resources • AssemblyTemplate may be one of “DEPLOYED” or “RUNNABLE” • extension states possible • Assembly may be one of RUNNING, “SUSPENDED”, or “STOPPED” • extension states possible
Open Issues • How does the Application Admin trigger the “suspend”, “resume”, and “stop” transitions? • Can you DELETE an AssemblyTemplate that has existing Assemblies? • Do we need to specify this behavior? • What happens when you instantiate an Assembly then “customize” the AssemblyTemplate it was created from? • Do we need to specify this behavior?