1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An...

29
1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL- iSE An overview of the new kernel

Transcript of 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An...

Page 1: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

1

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

From CRISTAL to CRISTAL-iSE

An overview of the new kernel

Page 2: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

2

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Concepts• Item– Dynamic object configured at runtime– Object lifecycle driven

• Agent– Items representing users, other actors

• Description– Data structure definition– Application logic definition– Stored as data in Items

Page 3: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

3

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Item Data Structures• Workflow– Lifecycle implementation. Directed acyclic graph of

Activities– Sequences data collection & logic

• Property– Name/Value pairs– Identification and typing information

• Collection– Type constrained links between Items– Layout or List

Page 4: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

4

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Activities• Composite (sub-workflow) or Atomic– Active/Inactive – dictates availability– State - User-definable state machine)– Activity properties

• Activity Properties define– Schema for data collection (Outcome)– Outcome tag/label (Viewpoint)– Application logic to run to complete (Script)– Custom configuration…

Page 5: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

5

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Agents and Jobs• Agents represent users (human or machine)– Log into CRISTAL-iSE to provide data to Activities and

advance the lifecycle– Roles control authorization

• Job = change of state in an Activity possible by a given Agent right now– Requires work to be done and Outcome generated– Agent can query Item for available Jobs– Certain Roles may push jobs to Agents

Page 6: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

6

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Collecting data• Agent implementations generate Outcomes– Validated against XML Schema

• Stored in a database– ClusterStorage interface conveys Item data objects to

DB• Currently eXist XMLDB• Previously Oracle, MySQL, SQLite• Custom schema specification – domain specific

• Query directly on the database

Page 7: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

7

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Changing stuff• Agents may run Scripts when executing Jobs– Javax.script API

• Agent processes may not write to DB, only execute Jobs

• Special activities alongside workflow expose Item modification functions– Alter Collections, Properties– Influence directory entries– Treat this Item as an Item description, and use it to

instantiate a new Item!

Page 8: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

8

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Changes from 2.2 to 2.4

• CRISTAL as a CRISTAL development environment– Activity, Schema, Script Factory Items– Simple Item Description Factory

• Modules– Single domain extension into multiple modules– Jar containing metafile declaring module contents

Page 9: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

9

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Module Contents• Name, Namespace (resource reference)• <Info> - Metadata about the module– Description (verbal), Version– Dependencies (dictates import order)

• <Config> - System properties– Client or Server– Plugin specification

• <Script> - scripts to run on startup/shutdown

Page 10: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

10

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Module Contents• <Imports> - Items, Roles and Agents to

import/synchronize– <Resource>: Activities (EA), CompositeActivity (CA),

Scripts (SC), Schemas (OD)• Single file, specify Version number

– <Item>: Full Item import (Properties, Collections, Outcomes, Viewpoints)• Heavy, for resources implement custom ResourceHandler

– <Agent>, <Role>

Page 11: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

11

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Kernel 3.0 New Features

Page 12: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

12

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

State Machine• Definable State Machine, per Activity• <State>– Name, ID, proceeds (is terminal)

• <Transition>– Name, ID, origin state, terminal state– Outcome required, possible or not allowed– Enabling property• Boolean activity property to enable/disable transition

Page 13: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

13

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

State Machine• Role override– Given Role may execute this transition

• Reservation modification– Allocates Activity to the performing Agent– Set, Preserve, Clear

• Values may be explicit, or reference Activity properties ${like this}

Page 14: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

14

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Built-in State Machines• Composite– Default for sub workflows–Waiting, Started, Finished

• PredefinedStep– Atomic– 1 State: Available– 1 Transition: Done

• Default ->

Page 15: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

15

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

UUID System Key

• EntityPath >> ItemPath– Single level string UUID

• CORBA interfaces use SystemKey (2x64bit int)• Globally persistent– Resources and Items should preserve between servers– Optional in kernel & module resources

Page 16: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

16

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Lookup & Authenticator• LDAP removed from kernel – cristal-ldap module• Paths are abstract• Lookup & LookupManager• Authenticator– Initializes both directory and cluster storage

• No auth stored in Gateway!– Cleaner multi-user processes

Page 17: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

17

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Users, Roles and Jobs

• Agent now extends Item– Has lifecycle– Predefined steps• Password & Role management

– Agent descriptions• NOT Role, but not quite sure what it is yet.

• Hierarchical Roles

Page 18: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

18

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Client Shell CLI

• Experimental Javascript client console

• Modules can contain domain specific function definitions

• Pluggable authentication

Page 19: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

19

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Item Local Object Changes• AddC2KObject and RemoveC2KObject are now

Admin only– Ordinary scripts must use specific steps to update

LocalObjects, which validate input

• Properties– isMutable property now copied to Property instance–WriteProperty step verifies that property exists and is

mutable before it writes.

Page 20: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

20

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Item Local Object Changes• Collections– Now included in Item.initialize()– API simplified– Collections are now versioned• Additional path element for version• Current collection named ‘last’• CreateNewCollectionVersion copies the current collection as

a numbered snapshot• Used during Item instantiation, along with

PropertyDescription viewpoint name

Page 21: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

21

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Item Local Object Changes• Workflow– Abstract properties in ActivityDef• Must be overriden by ActivityDefSlot

• Event– Schema and Viewpoint details

• Outcome– XPath support for query

Page 22: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

22

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Initialization & CreateItem• Supply initial Properties, Workflow and

Collections– Properties may be overridden (if mutable and

declared in PropertyDescription)– Passed as new parameter to

CreateItemFromDescription– Collections were originally written outside of

initialize()• ItemInitialization Event and Outcome stored

containing initial properties

Page 23: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

23

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

System Properties• Built from (in order of precedence):–Module properties– Config file– Connect file– Command-line arguments

• New ‘ObjectProperties’, allows plugins to be specified by class name or as instance.

Page 24: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

24

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Exceptions• ClusterStorageException replaced with

PersistencyException• MembershipException replaced with

InvalidCollectionModification exception• Better transmission of CORBA exceptions to client

processes

Page 25: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

25

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Predefined Steps• Big overhaul of PredefinedSteps– New in 3.0: AddNewCollectionDescription,

CreateNewCollectionVersion

– Agent container: SetAgentPassword, SetAgentRoles, CreateAgentFromDescription, RemoveAgent

– Server container:– Directory context management– Role management

Page 26: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

26

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Predefined Steps• Modified steps– CreateItemFromDescription• Description version• Initial properties (PropertyArrayList)

– AddMemberToCollection• Supply additional slot properties

– AddNewSlot• Reference description version

• Richer exception set

Page 27: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

27

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Future• Improved model semantics in collections– Item > Item Description– ActivityDef > Schema, Script and StateMachine• Properties still supported, but deprecated and migrated

automatically

– CompositeActivityDef > ActivityDef• Enhanced security– Auth tokens for server communications– Per-item read permissions (in Lookup)– SSL

Page 28: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

28

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

Future• Use-case Items–Model Agents and their interactions with the system– Executable model: self-documenting development– Captures test data, supplying automatic Agent input

simulation for testing• Much more:– Non-layout composite ‘Activity Bags’, BPMN2.0

features, Do/Loop workflow construct, ViewpointDescriptions, Automatic property population, client-side composite activities

Page 29: 1 Andrew Branson - CRISTAL OSS Launch 15 th October 2014 - CERN From CRISTAL to CRISTAL-iSE An overview of the new kernel.

29

Andrew Branson - CRISTAL OSS Launch15th October 2014 - CERN

END