Presentation is loading. Please wait.

Presentation is loading. Please wait.

Server-Side Plugins Andrew Johnson, Ralph Lange

Similar presentations


Presentation on theme: "Server-Side Plugins Andrew Johnson, Ralph Lange"— Presentation transcript:

1 Server-Side Plugins Andrew Johnson, Ralph Lange
EPICS Fall Collaboration Meeting, October 2011 PSI

2 Motivation Things get faster Not all clients want all updates
Wide use of timing/event systems Clients want to get updates only during “interesting” system states

3 Current Limitations Update rate / deadband are configured in the database One setup for all clients Existing timing/event system driver and support May cause records to process on event May set time stamps from hardware No filtering of updates for unrelated records

4 Design Considerations
Channel Access protocol compatibility Changes create a lot of trouble Modularity Small systems need small footprint API Compatibility Don’t break existing “3rd party” code

5 Server-Side Plugins Stackable modules Configuration and Instantiation
Channel Access Client 1 Channel Access Client 2 Client Stackable modules Inserted below or above the event queue between database and Channel Access server Configuration and Instantiation Client uses JSON modifiers in PV name Plug-in framework parses configuration and calls filter function Ethernet IOC Channel Access Server Event Task 1 Event Task 2 Post-Event-Queue Filters Event Queue ring buffer Event Queue ring buffer Event Queue ring buffer One set of event queues per client Record processing or field changes cause event updates Pre-Event-Queue Filters Record Event Subscription field 1 flags Event Subscription field 2 flags Event Subscription field 3 flags Event Subscription field 1 flags MLIS field 1 field 2 field 3 …

6 Plugin Integration Plugin registers its interface (at boot-up):
Name and interface (jump table) Filter function (and private pointer argument) to be inserted into the pre- or post-event-queue chain Description of the configuration options and config value locations Framework Creates the plugin instance Parses the configuration and stores results Calls the registered filter function when appropriate

7 Plugins May Manipulate the data
Manipulate the meta data (alarm, timestamp) Change the type of data Change the size of arrays Drop updates Insert updates

8 ts – Timestamp “Now” myPv.A{”ts”:{}}
Pre-event-queue: Sets the timestamp of the data update to “now” Works around the issue that updates to fields which do not cause record processing create data updates that always show the (older) record timestamp, leading to e.g. the archiver creating wrong entries

9 dbnd – Deadband Throttling
myPv.RVAL{”dbnd”{”m”:”rel”,”d”:7.5}} Pre-event-queue: Deadband throttling similar to analog records Client specifies absolute or relative (%) delta Works for any field, not just .VAL

10 arr – Array Subset myArray.VAL{”arr”:{”s”:-5,”i”:2}}
Post-event-queue: Creates a sub-array with given start, increment, stop Shorthand notation for convenience

11 sync – Sync with Timing System
myPv.VAL{”sync”:{”m”:”while”,”s”:”red”}} Pre-event-queue: Synchronizes updates with timing system by pushing the update only under certain conditions Refers to IOC globally configured named states that are defined by timing system events

12 sync Options my.VAL Client subscribes to Client gets
Record my processing State “red” Timing events #17 #42 #17 #42

13 sync Options: before my.VAL{”sync”:{”m”:”before”,”s”:”red”}}
Client subscribes to my.VAL{”sync”:{”m”:”before”,”s”:”red”}} Client gets Record my processing State “red” Timing events #17 #42 #17 #42

14 sync Options: first my.VAL{”sync”:{”m”:”first”,”s”:”red”}}
Client subscribes to my.VAL{”sync”:{”m”:”first”,”s”:”red”}} Client gets Record my processing State “red” Timing events #17 #42 #17 #42

15 sync Options: last my.VAL{”sync”:{”m”:”last”,”s”:”red”}}
Client subscribes to my.VAL{”sync”:{”m”:”last”,”s”:”red”}} Client gets Record my processing State “red” Timing events #17 #42 #17 #42

16 sync Options: after my.VAL{”sync”:{”m”:”after”,”s”:”red”}}
Client subscribes to my.VAL{”sync”:{”m”:”after”,”s”:”red”}} Client gets Record my processing State “red” Timing events #17 #42 #17 #42

17 sync Options: while my.VAL{”sync”:{”m”:”while”,”s”:”red”}}
Client subscribes to my.VAL{”sync”:{”m”:”while”,”s”:”red”}} Client gets Record my processing State “red” Timing events #17 #42 #17 #42

18 sync Options: unless my.VAL{”sync”:{”m”:”unless”,”s”:”red”}}
Client subscribes to my.VAL{”sync”:{”m”:”unless”,”s”:”red”}} Client gets Record my processing State “red” Timing events #17 #42 #17 #42

19 Status Framework in place, interfaces stabilizing
ts, dbnd, arr, sync plugins: implemented Unit tests for framework and plugins exist Working on: rate based throttling Planned: atomic put/get, array stats, default configuration values through info tags

20 Status Unclear: access security integration
3.14 code is available (please give feedback): lp:~ralph-lange/epics-base/server-side-plugins Framework being merged into 3.15 trunk Acknowledgements: Michael Davidsaver Supported by Helmholtz-Zentrum Berlin / BESSY II


Download ppt "Server-Side Plugins Andrew Johnson, Ralph Lange"

Similar presentations


Ads by Google