EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Record processing: periodic vs. push vs. pull
From: [email protected]
To: [email protected]
Date: Thu, 20 Dec 2012 10:30:20 -0800 (PST)

One of the EPICS Getting Started slide decks (ref below) discusses
alternatives for record processing in a chain of three records where
data flows: ai VAL -> INPA calc VAL -> DOL ao.  The alternatives are:

1. Periodic: all three records have SCAN .1 second, with advancing phase:
    ai PHAS 0 -> calc PHAS 1 -> ao PHAS 2

2. Push: input ai record is periodic, others are passive, with forward links:
   ai FLNK -> calc FLNK -> ao
  
3. Pull: output ao record is periodic, others are passive, with input links
    INP and DOL with PP attribute (here arrows show control not data flow):
    ai <- INPA PP calc <- DOL PP ao  

I wonder how to choose among these.  I can think of these pros and cons:

1. Periodic
Pro: i. Record definitions do not depend on control flow, no INP PP or FLNK
     ii. No control flow subtleties, records always processed on fixed schedule
Con: i. Processing occurs on fixed schedule, regardless of events or demand
     ii. Might have to tweak control flow after all, with PHAS

2. Push
Pro: i. Processing can be driven by events, when data appears or changes
         (in input ai, replace SCAN .1 second with I/O Intr or ...)
Con: i. Input record definitions depend on downstream data processing
         (must anticipate where data will be consumed to define FLNK)

3. Pull
Pro: i. Processing can be driven by demand
         (in output ao, replace SCAN .1 second with input from FLNK or ...)
     ii. Input record definitions do not depend on downstream processing
Con: i. Control flow may be difficult to analyze or understand, for example
         INP PP gets old value instead of waiting for asynchronous completion
         INP PP flag ignored in CA links (to other IOCs), behaves like NPP

Have I overlooked any important pros or cons?  Is there one
alternative that is more common, or one that is recommended (or
discouraged)?

Jon Jacky

PS - The three alteratives appear in slide 29, "Processing chains", in:

What is an EPICS database?  Andrew Johnson  2004
http://www.aps.anl.gov/bcda/epicsgettingstarted/iocs/Database1&2_1up.pdf



Replies:
RE: Record processing: periodic vs. push vs. pull Emma Shepherd
Re: Record processing: periodic vs. push vs. pull Andrew Johnson

Navigate by Date:
Prev: RE: structs and SNL Zelazny, Michael Stanley
Next: Re: devlib2 bugfix (rare string corruption) Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: SNL with C Benjamin Franksen
Next: RE: Record processing: periodic vs. push vs. pull Emma Shepherd
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024