90 likes | 185 Views
Wir schaffen Wissen – heute für morgen. Gateway (Redux) PSI - GFA Controls IT Alain Bertrand Renata Krempaska, Hubert Lutz, Matteo Provenzano, Dirk Zimoch May, 2013. Content. Basic introduction to the CA protocol through (our) gateway Why a rewrite Concept Configuration Current status
E N D
Wir schaffen Wissen – heute für morgen Gateway (Redux) PSI - GFA Controls IT Alain Bertrand Renata Krempaska, Hubert Lutz, Matteo Provenzano,Dirk Zimoch May, 2013
Content • Basic introduction to the CA protocol through (our) gateway • Why a rewrite • Concept • Configuration • Current status • Roadmap • Live demo / Conclusion EPICS Gateway redux
Base introduction CA Protocol How it works with the new gateway In green => Usually UDP broadcast messages In black => TCP messages (using a single TCP connection per IOC) EPICS Gateway redux
Why a rewrite • 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 EPICS Gateway redux
Concept of the new gateway • 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 wait • a 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 EPICS Gateway redux
Configuration 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 by our inventory database Generates an XML file. (gateway is not dependent of the inventory) XML file locally stored (for security in case of DB issues or manual configuration) EPICS Gateway redux
Current status • 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) EPICS Gateway redux
Roadmap Slowly replace old gateways with the new one, while keeping theold VM for quick failover in case of issues. Planned full replacement: End 2014 EPICS Gateway redux
Conclusion • 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. EPICS Gateway redux