ramverma | af74a62 | 2018-07-31 18:25:39 +0100 | [diff] [blame] | 1 | // |
| 2 | // ============LICENSE_START======================================================= |
| 3 | // Copyright (C) 2016-2018 Ericsson. All rights reserved. |
| 4 | // ================================================================================ |
| 5 | // This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE |
| 6 | // Full license text at https://creativecommons.org/licenses/by/4.0/legalcode |
| 7 | // |
| 8 | // SPDX-License-Identifier: CC-BY-4.0 |
| 9 | // ============LICENSE_END========================================================= |
| 10 | // |
| 11 | // @author Sven van der Meer (sven.van.der.meer@ericsson.com) |
| 12 | // |
| 13 | |
| 14 | == Introduction to APEX |
| 15 | |
| 16 | APEX stand for Adaptive Policy EXecution. |
| 17 | It is a lightweight engine for execution of policies. |
| 18 | APEX allows you to specify logic as a policy, logic that you can adapt on the fly as your system executes. |
| 19 | The APEX policies you design can be really simple, with a single snippet of logic, or can be very complex, with many states and tasks. |
| 20 | APEX policies can even be designed to self-adapt at execution time, the choice is yours! |
| 21 | |
| 22 | .Simple APEX Overview |
| 23 | image::apex-intro/ApexSimple.png[Simple APEX Overview] |
| 24 | |
| 25 | The Adaptive Policy Engine in APEX runs your policies. |
| 26 | These policies are triggered by incoming events. |
| 27 | The logic of the policies executes and produces a response event. |
| 28 | The __Incoming Context__ on the incoming event and the __Outgoing Context__ on the outgoing event are simply the fields and attributes of the event. |
| 29 | You design the policies that APEX executes and the trigger and action events that your policies accept and produce. |
| 30 | Events are fed in and sent out as JSON or XML events over Kafka, a Websocket, a file or named pipe, or even standard input. |
| 31 | If you run APEX as a library in your application, you can even feed and receive events over a Java API. |
| 32 | |
| 33 | .APEX States and Context |
| 34 | image::apex-intro/ApexStatesAndContext.png[APEX States and Context] |
| 35 | |
| 36 | You design your policy as a chain of states, with each state being fed by the state before. |
| 37 | The simplest policy can have just one state. |
| 38 | We provide specific support for the four-state link:https://www.researchgate.net/publication/303564082_Apex_An_Engine_for_Dynamic_Adaptive_Policy_Execution[MEDA (Match Establish Decide Act)] policy state model and the three-state link:https://en.wikipedia.org/wiki/Event_condition_action[ECA (Event Condition Action)] policy state model. |
| 39 | APEX is fully distributed. |
| 40 | You can decide how many APEX engine instances to run for your application and on which real or virtual hosts to run them. |
| 41 | |
| 42 | In APEX, you also have control of the __Context__ used by your policies. |
| 43 | Context is simply the state information and data used by your policies. |
| 44 | You define what context your policies use and what the scope of that context is. |
| 45 | __Policy Context__ is private to a particular policy and is accessible only to whatever APEX engines are running that particular policy. |
| 46 | __Global Context__ is available to all policies. |
| 47 | __External Context__ is read-only context such as weather or topology information that is provided by other systems. |
| 48 | APEX keeps context coordinated across all the the instances running a particular policy. |
| 49 | If a policy running in an APEX engine changes the value of a piece of context, that value is is available to all other APEX engines that use that piece of context. |
| 50 | APEX takes care of distribution, locking, writing of context to persistent storage, and monitoring of context. |
| 51 | |
| 52 | .The APEX Eco-System |
| 53 | image::apex-intro/ApexEcosystem.png[The APEX Eco-System] |
| 54 | |
| 55 | The APEX engine (AP-EN) is available as a Java library for inclusion in your application, as a microservice running in a Docker container, or as a stand-alone service available for integration into your system. |
| 56 | APEX also includes a policy editor (AP-AUTH) that allows you to design your policies and a web-based policy management console you use to deploy policies and to keep track of the state of policies and context in policies. |
| 57 | Context handling (AP-CTX) is integrated into the APEX engine and policy deployment (AP-DEP) is provided as a servlet running under a web framework such as link:http://tomcat.apache.org/[Apache Tomcat]. |