The Lua Chunk Vault, an enhancement to epics base

Slides:



Advertisements
Similar presentations
SDL+ The Simplest, Useful Enhanced SDL-Subset The documentation is the design, the design is the system! Copyright © SDL Task Force Consortium.
Advertisements

.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Channel Access Enhancements J. Hill. R3.14 Enhancements Large array support in the portable server –nearly complete –a priority for SNS Port syntax for.
Lua By: Michael Coffman Peter Sussman. History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Jeffrey Hill.  LANSCE Requirements – a Review  EPICS Paradigm Shift – a Review  Status – What is Implemented  What is an Abstract Data Type?  Benefits.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
SCRIPTING LANGUAGE. The first interactive shells were developed in the 1960s to enable remote operation of the first time-sharing systems, and these,
Course Instructor: Aisha Azeem
CSE 380 – Computer Game Programming Scripting and Lua Lua.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Obsydian OLE Automation Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
J. Hill. Overview  Introduction  LANSCE Requirements  EPICS Event Queue  Event Queue Upgrade  Milestones.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Introduction to Java University of Sunderland CSE301 Harry R. Erwin, PhD.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Games Development 2 Lua Scripting CO3301 Week 6. Contents Introducing Lua –Comparison with Python Lua Language Overview Interfacing Lua with C++
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
Reliability/ Secure IOC / Outlook M. Clausen / DESY 1 CA-Put Logging BurtSave Warm Reboot Matthias Clausen DESY/ MKS.
© All rights reserved. U.S International Tech Support
EPICS DIAMOND EPICS Meeting, EPICS base 3.14 OSI: Operating System Independent Support Marty Kraimer.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Chapter 10: Classes and Data Abstraction. Objectives In this chapter, you will: Learn about classes Learn about private, protected, and public members.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
Web Services An Introduction Copyright © Curt Hill.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
Java – in context Main Features From Sun Microsystems ‘White Paper’
1 Classes II Chapter 7 2 Introduction Continued study of –classes –data abstraction Prepare for operator overloading in next chapter Work with strings.
Chapter 10: Classes and Data Abstraction. Classes Object-oriented design (OOD): a problem solving methodology Objects: components of a solution Class:
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
1. Presentation Agenda  Identify Java Card Technology  Identify Elements of Java Card applications  Communicating with a Java Card Applet  Java Card.
Java Thread Programming
Introduction to Operating Systems Concepts
Web Database Programming Using PHP
Applications Active Web Documents Active Web Documents.
TK1924 Program Design & Problem Solving Session 2011/2012
Chapter 5: Enhancing Classes
Java Interview Questions
© 2002, Cisco Systems, Inc. All rights reserved.
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Viewbiquity HTML5 Tom Shafron Developer’s Blog CEO, Viewbiquity
Web Database Programming Using PHP
Spark Presentation.
Chapter 2: System Structures
Computer Engg, IIT(BHU)
Introduction Enosis Learning.
Introduction Enosis Learning.
What Is a Program? A program is like an algorithm, but describes a process that is ready or can be made ready to run on a real computer Retrieved from:
Web Development Using ASP .NET
Catharine West Bo Aye Saljin LaRocca references
Server-Side Plugins Andrew Johnson, Ralph Lange
Principles of Programming Languages
Configuration management suite
Chapter 2: Operating-System Structures
Criteria for rapid prototyping
SPL – PS1 Introduction to C++.
Presentation transcript:

The Lua Chunk Vault, an enhancement to epics base Jeff Hill

The Lua Chunk Vault – Lua, a Brief Introduction (review) EPICS Integration of Lua milestones (review) Lua Chunk Vault, Motivation Lua Chunk Vault, Implantation Conclusions

The Lua Chunk Vault – Lua, a Brief Introduction (review) Lua embeddable language was created in 1993 By members of the Computer Graphics Technology Group (Tecgraf) at the Pontifical Catholic University of Rio de Janeiro, in Brazil. "Lua" (pronounced LOO-ah) means "Moon" in Portuguese Interpreted, compiled at load-time to byte-code A mixture of C-like and Pascal-like syntax Dynamic typed, automated conversion between string and numeric types Efficient virtual machine execution, small footprint, incremental garbage collection, easily interfaced with C code Liberal MIT license Some negatives also, see my talk at Michigan EPICS meeting In particular, variables are globally scoped by default

The Lua Chunk Vault – EPICS INTEGRATION Of lua milestones Lua 5.2.3, the current release, embedded inside of EPICS base Built by the EPICS build system Lua 5.2.3 has the upgraded support for integer primitive types The current released version of Lua is now at 5.3

The Lua Chunk Vault – EPICS INTEGRATION Of lua milestones Lua based subscription filtering in the CA server Event queue is order correct Based on C++ 11 shared pointer Subset of boost included in EPICS base supporting prior compilers Based on Data Access abstract base class Interface is independent of data source implementation

The Lua Chunk Vault – EPICS INTEGRATION Of lua milestones Lua based subscription filtering in the CA server Filters specified as channel name postfix Invoking Lua methods supplied when the IOC boots Each client attaching to the server Instantiates an independent Lua context

The Lua Chunk Vault – EPICS INTEGRATION Of lua milestones Alternative EPICS SHELL In contrast, a fully functionality scripting language Powerful libraries, built-in and community An environment well proven for use in Configuration Scripting Rapid-prototyping

The Lua Chunk Vault – EPICS INTEGRATION Of lua milestones EPICS IOC shell can invoke, and pass arguments to, Lua scripts Lua scripts can invoke, and pass arguments to Any of the commands registered into EPICS IOC shell We can, for example, instantiate records within a Lua for loop

The Lua Chunk Vault – EPICS INTEGRATION Of lua milestones Currently we have two computational record-level building block components EPICS calc record Excellent rapid prototyping, but limited functionality EPICS subroutine record Excellent efficiency, but possibly less popular for rapid prototyping A new Lua based record provides Comprehensive functionality set A reasonable compromise runtime execution efficiency The rapid prototyping we depend on with the calc record Upgrade in-place Runtime code updates via CA puts to lua record fields And, hopefully the heavy lifting comes for free with Lua

The Lua Chunk Vault – Motivation Lua has good capability as a language for implementing user extensions Lua code Lua interfaced C code The preexisting EPICS Lua shell and the EPICS Lua record already can Open any Lua source code in the file system Compile it And run it The preexisting EPICS Lua integration already can Compile Lua to byte code and embed Lua byte code in a C object code This is automated by the EPICS build system Load C object code embedded Lua byte code Into a new Lua context efficiently at runtime

The Lua Chunk Vault – Motivation The above capabilities are almost sufficient, but … Each CA client executes subscription filters in its private Lua context We need capabilities for this private Lua context to be Initialized with application specific code This needs to be implemented efficiently So that we don’t impact the delay required For initializing new CA client connections Also, it would be convenient for IOC applications to Enhance the IOC with C object code embedded Lua byte code Lua interfaced C code To be used in various Lua end application within the IOC

The Lua Chunk Vault – implementation One possibility would be to cache Lua byte codes in Cache purpose dedicated Lua state instance This is certainly possible and Lua provides good features for implementing this However a Mutex lock would be required for accessing any shared Lua state Resulting in additional overhead Performance might really matter if this is impacting CA client connect delays

The Lua Chunk Vault – implementation Instead enhance the IOC’s registrar to allow registration of C object code embedded Lua code Lua interfaced C code Facilitate these components to be instantiated into Lua contexts when they initialize EPICS Lua IOC Shell per-shell private Lua contexts EPICS Lua record per-record private Lua contexts EPICS CA server per-client private Lua contexts Use C++ shared_ptr for life time management of read-only Lua byte code chunks Less overhead, no Mutex required

The Lua Chunk Vault – status LUA chunk vault Implementation is in progress Hope to have this ready for release soon All other Lua features described here can be found in a Bazaar branch at lp:~johill-lanl/epics-base/server0

The Lua Chunk Vault – conclusion LANSCE has implemented a comprehensive integration of Lua into EPICS base Lua based EPICS shell Lua script record CA server subscription update filtering The source code is publically available EPICS base registrar is being enhanced to allow IOC application specific C object code embedded Lua code Lua interfaced C code