Debugging Ensemble Productions CAMTA Meeting 11 th November 2010 John Murray.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Professional Toolkit V2.0 C:\Presentations - SmartCafe_Prof_V2.0 - bsc page 1 Professional Toolkit 2.0.
11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Google Apps: Google Mail Got Gmail?....Need Help? Mrs. Connor.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 Introduction to Programming Environment Using MetroWerks CodeWarrior and Palm Emulator.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
CGI programming Using Apache. Concepts Browser prepares parameter list List is attached to name of program to run on server "submit" button sends string.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
Digital Image Processing Lecture3: Introduction to MATLAB.
ATM 315 Environmental Statistics Course Goto Follow the link and then choose the desktop application.
Excel Connector for JIRA Installation and functional presentation.
A First Program Using C#
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Geo CE-XM ch 4 Edited 10/14/05 1 The XM is the newest of the rovers, and unlike other units, it comes with software installed on the unit as well as using.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Guideline: How to build AMSS source code? History: 01/02/ Make Draft 05/02/2010 – Release /02/2010 – Updated.
Compiled Matlab on Condor: a recipe 30 th October 2007 Clare Giacomantonio.
Excel Connector for JIRA Installation and functional presentation.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications.
Active-HDL Interfaces Debugging C Code Course 10.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
Introduction to Web Services. Examples Using a Web Service Creating a new Web Service.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Configuring IQmol for Windows machines, use version!
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
© I-Logix Rhapsody C++ V /01/2004E1-1 “Essential” Tool Training Basic Rhapsody Basic Rhapsody Rhapsody in C++ V /01/04.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July  Tucson, Arizona GDT Tips.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
Interactions & Automations
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
9/21/04 James Gallagher Server Installation and Testing: Hands-on ● Install the CGI server with the HDF and FreeForm handlers ● Link data so the server.
bitcurator-access-webtools Quick Start Guide
Chapter 2: The Visual Studio .NET Development Environment
Getting Eclipse for C/C++ Development
Introduction to the Visual C# 2005 Express Edition IDE
Bomgar Remote support software
Multi-host Internet Access Portal (MIAP) Enhancement Guide
ECE 3567 Microcontroller Lab
These slides are for reference only. They are not "lecture notes"
Software Setup & Validation
bitcurator-access-webtools Quick Start Guide
Getting Eclipse for C/C++ Development
The Role of Command Line Compiler (csc.exe)
Selenium IDE Installation and Use.
ECE 3567 Microcontrollers Lab
Presentation transcript:

Debugging Ensemble Productions CAMTA Meeting 11 th November 2010 John Murray

Ensemble What is an Ensemble Session? A collection of messages Begins when the primary request message enters the Ensemble production Continues to exist while the production generates internal requests and responses to process the primary request Ends when the last internal activity prompted by the primary request is complete Messages of a session can be viewed in EMP [Ensemble] > [Messages] > [Visual Trace] Messages flow between numerous background jobs, in which your code executes to produce the appropriate response for each request

Example: Demo.Loan.FindRateFileService Demo.Loan.FindRateProduction in ENSDEMO FindRateFileService looks for xyz.application textfiles in the input directory Reads file, initiates an Ensemble session to process the application for a loan Moves the file to ‘Sent’ subdirectory Writes initial xyz.record file in the output directory, confirming that the application is being processed Sends messages to three Business Processes BankSoprano BankManana BankUS When all responses are in, writes best offer (or refusal if no offers) to xyz.approval in output directory Session ends

Setting Up Demo.Loan.FindRateProduction Focus on FindRateFileService Create FileIn, Sent and FileOut directories Configure FindRateFileService Point “File Path” to FileIn Point “Archive Path” to Sent Apply settings Configure FindRateFileOperation Point “File Path” to FileOut Apply setting Create textfile with.application extension in FileIn 150:Terry: :USA Disable two business hosts FindRateTCPOperation My Terminal Output Start production Check results

Tracing Developer puts $$$TRACE macros in business host code E.g. $$$TRACE("Got this far") If business host configured to “Log Trace Events” the text will be added to the Event Log Also adds an icon in the Message Trace view

Running in Foreground If business host configured to run in “Foreground”, job will launch an Ensemble Terminal window Trace text appears in terminal window Can place hard BREAK commands in code and use command-line debugger Private pool recommended Awkward on Vista

To Interrupt, You Need INT Ensemble executes OBJ code Not readable by us Lowest level of readable source is INT code This is what debuggers step through INT code may be… Hand-written (e.g. you edit Foo.INT) Generated from a MAC (e.g. Foo.MAC) May contain embedded SQL statements Generated from class definition (e.g. User.Foo.CLS) Generated from BPL If INT code is absent, debugging is almost impossible Execution can still happen, provided OBJ exists

Class Compilation Settings Keep INT code during compilation Studio Tools, Options, Compile tab or Compiler tree-node Check “Keep generated source code” Build, Compile With Options Check “Keep generated source code” Consider checking “Set As Default” Same effect as changing setting in Tools, Options Terminal Use the “k” flag on $system.OBJ.Compile* methods Check default flags for namespace, e.g. SAMPLES>D $system.OBJ.ShowFlags()... Default flags for this namespace =adilo1... SAMPLES> Add “k” to default flags using $system.OBJ.SetFlags

Adding Serenji to the Production Download and install Serenji from Install server-side support routines as per Serenji documentation Load the Ens.Serenji package into ENSLIB Compile during import Load modified versions of InterSystems classes into ENSLIB Export your originals first Compile during import Recompile all classes in production, preserving INT code Add two Serenji business hosts to production Ens.Serenji.Debug (BO) Ens.Serenji.Replay (BP) Update running production, or restart it

Debug by Replaying Locate Demo.Loan.FindRateFileService message in Message Browser Set checkbox alongside it Click “Resend Messages” link Choose Ens.Serenji.Replay from dropdown Remember to click “Set New Target” button Click “Yes” button Serenji window should load Demo.Loan.FindRateDecisionProcessCustom.1 and suspend execution at zOnRequest+1

Stepping Through the Session’s Processing Demonstration

Stepping, Going, Disconnecting “Step In” behaves like “Step Over” if target code is part of Ensemble infrastructure “Go” continues to next soft breakpoint, or to beginning of next message handler Break button is available “Fast Forward” continues to next soft breakpoint Break button not active “Disconnect” allows Ensemble session to complete without further Serenji involvement

Timers While debugging, you need time to think Conditionally disable timers Demo.Loan.BankUS OnRequest method Set tSC =..SetTimer("PT15S") becomes If '##class(Ens.Serenji.API).IsEnabled(##this) Set tSC=..SetTimer("PT15S") Demo.Loan.FindRateDecisionProcessCustom OnRequest method Quit..SetTimer("PT5S") becomes Set tSC = $$$OK If '##class(Ens.Serenji.API).IsEnabled(##this) Set tSC =..SetTimer("PT5S") Quit tSC

BPL State Machine Code Demo.Loan.BankSoprano is defined in BPL Compilation generates INT code Demo.Loan.BankSoprano.Thread1.1 Line label zS1 is where state #1 begins Other states are implemented by zS2, zS3 etc. Demo.Loan.BankManana also defined in BPL “Delay” element in BPL can give similar debug issues to those of timers