Modern web tools and midas Ben Smith TRIUMF Midas workshop – July 2015 Ben Smith - Modern web tools and Midas 1 15/07/15.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

Using EBSCOs Search Box Builder Tool Tutorial. Would you like to promote your EBSCOhost resources by adding an easy-to-use search box to your website?
Creating an EDS Search Box Using EBSCO’s Search Box Builder Tool
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
UNESCO ICTLIP Module 4. Lesson 3 Database Design, and Information Storage and Retrieval Lesson 3. Information storage and retrieval using WinISIS.
Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann,
Calendar Browser is a groupware used for booking all kinds of resources within an organization. Calendar Browser is installed on a file server and in a.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
DT211/3 Internet Application Development JSP: Processing User input.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Bar|Scan ® Asset Inventory System The leader in asset and inventory management.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Database Updates Made Easy In WebFocus Using SQL And HTML Painter Sept 2011 Lender Processing Services 1.
Fuddle Baris Tevfik Matt Lee David Cheung Ben Paolillo.
Chapter 5 Roles and features. objectives Performing management tasks using the Server Manager console Understanding the Windows Server 2008 roles Understanding.
CAEL 5012 Rich Internet Applications. What you need For this part of the course you will need access to a server with PHP and MYSQL which will be supplied.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
JavaScript & jQuery the missing manual Chapter 11
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Server-side Scripting Powering the webs favourite services.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
MySQL + PHP.  Introduction Before you actually start building your database scripts, you must have a database to place information into and read it from.
Marcel Casado NCAR/RAP WEATHER WARNING TOOL NCAR.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
Improving e:Vision user interface using Bootstrap and jQuery
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Basic & Advanced Reporting in TIMSNT ** Part Two **
More about Databases. Data Entry through Forms Table View (Data sheet view) is useful for data entry of new records But sometimes customization would.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
IPortal Bringing your company and your business partners together through customized WEB-based portal software. SanSueB Software Presents iPortal.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Binding Basics.
Access Forms and Queries. Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  This.
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
MySQL and GRID status Gabriele Carcassi 9 September 2002.
Classwork: Common Errors Primary keys: don’t forget them! Primary keys: choose the best one! – “Name” and “birthday” are not the best choices. – “Phone.
30 Copyright © 2009, Oracle. All rights reserved. Using Oracle Business Intelligence Delivers.
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
CAESked Computer Aided Engineering Scheduler. Introduction Team Members: Chris Fruin & Jerry Grochowski What CAESked is: Web based class scheduling application.
Advanced HTML Tags:.
JavaScript, Sixth Edition
Web Technologies Computing Science Thompson Rivers University
Practical Office 2007 Chapter 10
Introduction and Principles
MongoDB Er. Shiva K. Shrestha ME Computer, NCIT
Data Virtualization Tutorial… CORS and CIS
Introduction to Web programming
PHP Training at GoLogica in Bangalore
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
How Can I Download My Transactions Directly Into Quicken
Housing application Presented by Phil Callaghan MD Caltech CRM
More about Databases.
Please thank our sponsors!
Grauer and Barber Series Microsoft Access Chapter One
Web Technologies Computing Science Thompson Rivers University
Introduction to AJAX and JSON
Tutorial Introduction to help.ebsco.com.
ASSETS, SNIPPETS & COMPONENTS
Presentation transcript:

Modern web tools and midas Ben Smith TRIUMF Midas workshop – July 2015 Ben Smith - Modern web tools and Midas 1 15/07/15

Introduction DEAP-3600 will run for 3 years There are not many DAQ experts We want the DAQ to be as simple as possible to operate, so we don't get woken at 3am I'll explain the technologies I've used to make the operator interfaces as user-friendly as possible Ben Smith - Modern web tools and Midas 2 15/07/15

CouchDB is a JSON document store Ben Smith - Modern web tools and Midas 3 15/07/15 CouchDB is a "database" that doesn't talk SQL Stores everything as JSON documents No defined tables, just documents referenced by IDs Communicates via HTTP(S) HTTP GET retrieves a document or list of documents HTTP PUT / POST adds or updates a document HTTP DELETE removes a document Together, this means you can directly communicate with a database using javascript!

Example CouchDB doc $ curl /deapdb/RUNINFO_quality_10698_ >/dev/null | python -m json.tool { "_id": "RUNINFO_quality_10698_10698", "_rev": "3-9b2eb29a73dd91e307399b5565cbb3a2", "createdOn": , "index": "quality", "name": "RUNINFO", "runBad": [ 0, 9, 9 ], "run_range": [ 10698, ], "shiftComment": "Everything looks good", "shifter": "Peter Sh" } CouchDB also supports querying to search for documents Ben Smith - Modern web tools and Midas 4 15/07/15 Database nameDocument name "Revision", for conflict detection Other fields, as defined by DEAP

DEAP-3600 loves CouchDB We use CouchDB for lots of things Radio-purity information (for background events) Data quality record for each run Status of PMTs Calibration source information Analysis toolkit designed to read JSON too! We have 3 CouchDB servers, operating in "multi- master" configuration Any conflicts are easily resolved by admins (though we haven't had any yet) Ben Smith - Modern web tools and Midas 5 15/07/15

We use CouchDB for storing ODB settings DEAP-3600 has many different "run types" We sometimes need to change hundreds of ODB settings between runs! ODB can dump settings as JSON, and CouchDB stores JSON documents – perfect match! We have a custom "run start" page The operator chooses a run type We load the right ODB settings from CouchDB Then start the run Ben Smith - Modern web tools and Midas 6 15/07/15

Custom run start page Ben Smith - Modern web tools and Midas 7 15/07/15 Accessed like any other custom page Regular start/stop buttons are disabled

Custom page supports "edit on start" parameters too Operator chooses from a list of run types Custom run start page – main interface Ben Smith - Modern web tools and Midas 8 15/07/15

Operator chooses whether to update ODB or update CouchDB After clicking "Start run", we check if the current ODB settings match the saved CouchDB settings for the chosen runtype Custom run start page – after clicking "Start run" Ben Smith - Modern web tools and Midas 9 15/07/15

Use ODBSet to update any settings that need changing (153 in this case!) Custom run start page – applying the settings Ben Smith - Modern web tools and Midas 10 15/07/15 Then actually start the run by posting a hidden form to../.., with a cmd=Start

We replicate bits of mhttpd The custom page uses javascript to replicate a lot of the mhttpd functionality Get /Experiment/edit on start using ODBMCopy, so we know what extra fields to show Get bits of /Runinfo, so we can show the current run status This is fine, but relies on Midas not changing its internal #defines Ben Smith - Modern web tools and Midas 11 15/07/15

Other things we can do Show extra fields depending on the run type Some runs use lasers, so we can ask the operator for the laser wavelength Update ODB with that information, then add it to a "run configuration" CouchDB document when the run starts Update one of the "Status items" to include a link to the data quality plots for this run Ben Smith - Modern web tools and Midas 12 15/07/15 Unique link for this run

After clicking "Stop run", present a modal dialog for operator to add initial data quality assessment The values are then written to another CouchDB doc Enhance the experience when stopping a run too Ben Smith - Modern web tools and Midas 13 15/07/15

Mobile-friendly – bootstrap Custom pages use the bootstrap CSS framework Pages automatically adapt based on size of viewport Can easily use webpages from mobile phone Very little overhead to make pages look good! Ben Smith - Modern web tools and Midas 14 15/07/15

Custom program page One of our programs requires some ODB settings Combine changing the ODB settings and starting the program into one webpage Uses ODBSet/Get and an AJAX call to ?cmd=Programs&Start=Start Ben Smith - Modern web tools and Midas 15 15/07/15

Online plots using flot.js Monitoring PMT pulse rates is very important We have automatic monitoring (using rootana) and write values to Midas history We will have ~300 PMTs eventually, so regular history plots are not user-friendly Use flot.js to give a more compact representation The colours correspond to other interface elements on the webpage Ben Smith - Modern web tools and Midas 16 15/07/15

Midas features wishlist The most useful web feature would be to run a script and get the exit code/stdout/stderr back Currently you can call a script, but getting the output back is not easy This would allow us to control even more things from nice web interfaces rather than the command line Also useful would be a nicer way to operate non- C++ programs using Midas Some of our devices are controlled using python Currently I have a Midas C++ wrapper that spawns a process for the python program, and monitors whether it is still alive – not very elegant! Ben Smith - Modern web tools and Midas 17 15/07/15

Summary Free CSS and JS frameworks can be used to make attractive and dynamic custom pages We use jquery, flot and bootstrap CouchDB is a database that talks HTTP, and stores information as JSON documents On DEAP we've combined the two to make user- friendly web interfaces This should lead to fewer errors, and fewer calls to DAQ experts Ben Smith - Modern web tools and Midas 18 15/07/15