wir schaffen wissen – heute für morgen gateway (redux) psi - gfa controls it alain bertrand...
TRANSCRIPT
Wir schaffen Wissen – heute für morgen
Gateway (Redux) PSI - GFA Controls IT Alain Bertrand
Renata Krempaska, Hubert Lutz, Matteo Provenzano, Dirk ZimochMay, 2013
EPICS Gateway redux
Content
-Basic introduction to the CA protocol through (our) gateway
-Why a rewrite
-Concept
-Configuration
-Current status
-Roadmap
-Live demo / Conclusion
Base introduction CA Protocol
EPICS Gateway redux
caget Gateway IOC
Search Request
Search Request
Search Response
Search Response
Create TCP Socket
Create channel
Create TCP socket
Create channel
Access Rights
Access Rights
Create channel answer
Create channel answer
Read Notify (GET)
Read Notify
Read Notify Resp.
Read Notify Resp.
TCP Disconnect
Wait 30 sec before Disc.
How it works with the new gateway
In green => Usually UDP broadcastmessages
In black => TCP messages (using asingle TCP connection per IOC)
Why a rewrite
EPICS Gateway redux
Current official CA Gateway:Written in C++ using CAS and the usual CA library(features limited by the underlining CAS and CA library)
- Hard to debug
- No real maintainer (bug report may or may not be fixed)
- Waits for a complete CA message to be sent before starting to passing it
- Requires more memory as each channel need to allocate the maxpossible memory pro channel (an issue while dealing large arrays)
- Severe performance problem (down to frozen channels) when dealing with arrays.
- Currently not stable with known and reported bugs
- Usually requires 2 process (imp / exp) pro network
Gateway process
EPICS Client
CASC++ code
Like a soft IOC
CA clientC code
Glue code
CA client(MEDM, Python,
etc..)IOC
Concept of the new gateway
EPICS Gateway redux
EPICS Client
CA client(MEDM, Python,
etc..)IOC
Gateway process
Packet Packet PacketPacket
What we need:- More stability.- A code easier to debug.- A lower latency while transferring large arrays.- A single process for the imp / exp (re-use same ports, simpler config).
Our solution:- A “pass through” (as defined by Cosylab) design which doesn’t waita full message before handling it. Act like a firewall more than a proxy.- A cleaner code (which doesn’t use 3rd parties libraries)- More debug information (activity logs)- .NET 4 / C# implementation
Configuration
EPICS Gateway redux
Currently: configured via special files, each gateway have its own set (up to 4 files)stored in CVS and then copied locally.
New gateway:
Configuration handled byour inventory database
XML file locally stored(for security in case of DBissues or manualconfiguration)
Generates an XML file.(gateway is not dependent of the inventory)
Current status
EPICS Gateway redux
- All CA messages implemented (search, get, put, monitor, …)
- Optional log on console, file, XML (with different levels of debug info)
- Fully implemented as standalone and service
- Integrated with our inventory database (the database generates the config).
- 1 in production, a couple of gateways in test
-Tested and running stable with standard EPICS tools, MEDM,QTDisplays, Archiver, capv-view (Java), setpoint.tcl (TCL/TK)
Roadmap
EPICS Gateway redux
Slowly replace old gateways with the new one, while keeping theold VM for quick failover in case of issues.
Planned full replacement: End 2014
Conclusion
EPICS Gateway redux
- The gateway concept works, and works well.
- React differently than the old gateway, as there is no caching,and whatever the IOC sends the clients will get it.