This document discusses best practices for writing, deploying, and monitoring scheduled agents in Lotus Notes/Domino. It covers:
- An introduction to the Agent Manager and the types of agents it handles
- Tips for ensuring scheduled agents are scalable, such as optimizing memory usage and view caching
- Potential issues like exceeding time limits, replication lag, and remote debugging challenges
- Strategies for effective scheduled agent monitoring through logging and error reporting
The document discusses configuring Domino servers for SMTP replication and routing. It describes enabling the SMTP listener to receive mail over SMTP and enabling SMTP routing to send mail to other servers using SMTP. It provides steps to configure a Domino server to use SMTP for sending and receiving mail, including enabling tasks in the server document, specifying relay hosts, and setting up mail restrictions and exceptions.
Dev buchan everything you need to know about agent designBill Buchan
The document discusses agent design options and security in LotusScript. It provides an overview of the Agent Manager and how it handles scheduled and triggered agents. It then discusses security in depth, covering the seven layers of security in Domino including access control, roles, reader/author fields, and field-level encryption. It demonstrates how to access the C API security interfaces from LotusScript, focusing on functions to get ID information and change passwords.
1. Scheduled agents should be monitored to ensure they are running successfully on servers. A central log database can be used to store status documents from agents and alert if reports are overdue.
2. Logging is important for scheduled agents but the NotesLog model can result in large log files. It is better to develop a "ticker-tape" style log facility that stores each log entry in a small document.
3. When designing scheduled agents, consider how to handle processing large amounts of data within the limited runtime. The agent may need to run multiple times and checkpoint processing to avoid timeouts.
Dev buchan everything you need to know about agent designBill Buchan
This document provides an overview of using the Lotus Notes C API security interfaces from LotusScript. It discusses two specific C API functions - REGGetIDInfo and SECKFMChangePassword. REGGetIDInfo allows you to examine an existing ID file and retrieve information such as whether it is hierarchical or a certifier. SECKFMChangePassword is used to change a password on an ID file. The document includes LotusScript code examples for calling these functions and retrieving the returned values. It defines several constants needed to specify the type of information to retrieve from the ID file.
Gearman is a software framework that allows distributing work across multiple machines. It consists of a daemon, clients, and workers. The daemon handles communication between clients and workers. Clients submit work to the daemon, which passes it to workers to complete. Workers register functions they can perform and handle tasks asynchronously. Gearman provides load balancing and allows processing work in parallel across languages. It can improve performance for tasks like image processing, email sending, and log analysis.
This document is a presentation about Gearman, an open source application framework for distributing tasks to multiple machines or processes. The presentation covers what Gearman is, its main concepts of client-daemon-worker communication and distributed model, how to do a quick start with Gearman including installation and a simple PHP example, digging deeper into topics like persistence, workers and monitoring, and PHP integration including usage, frameworks, handling conditions, and use cases like image processing and log analysis. The presenter provides contact details to find more information and asks if there are any questions.
This document discusses tools and techniques for managing Notes clients, user IDs, mail files, and archives to improve efficiency and security in a Domino environment. It covers best practices for taking inventory of clients, managing passwords, quotas and mailboxes, and using server-side archiving to reduce database size. The overall goal is to help optimize the Domino infrastructure through proper administration of users, clients and mail files.
This document provides tips for writing LotusScript code for large systems with a focus on logging, performance, code reuse, and handling weird situations. Some key points include:
- Logging is important for stability and managing large systems. Recommends using OpenLog or creating and emailing log documents to avoid performance impacts.
- Views with click-sorted columns and unnecessary views hurt performance. Recommends minimizing views and avoiding click-sort.
- Agents need to be well-behaved to avoid overloading servers. Suggests profiling agents, breaking large tasks into multiple runs, and not relying on Agent Manager to kill misbehaving agents.
- Code reuse is important for maintenance. Recommends creating
The document discusses configuring Domino servers for SMTP replication and routing. It describes enabling the SMTP listener to receive mail over SMTP and enabling SMTP routing to send mail to other servers using SMTP. It provides steps to configure a Domino server to use SMTP for sending and receiving mail, including enabling tasks in the server document, specifying relay hosts, and setting up mail restrictions and exceptions.
Dev buchan everything you need to know about agent designBill Buchan
The document discusses agent design options and security in LotusScript. It provides an overview of the Agent Manager and how it handles scheduled and triggered agents. It then discusses security in depth, covering the seven layers of security in Domino including access control, roles, reader/author fields, and field-level encryption. It demonstrates how to access the C API security interfaces from LotusScript, focusing on functions to get ID information and change passwords.
1. Scheduled agents should be monitored to ensure they are running successfully on servers. A central log database can be used to store status documents from agents and alert if reports are overdue.
2. Logging is important for scheduled agents but the NotesLog model can result in large log files. It is better to develop a "ticker-tape" style log facility that stores each log entry in a small document.
3. When designing scheduled agents, consider how to handle processing large amounts of data within the limited runtime. The agent may need to run multiple times and checkpoint processing to avoid timeouts.
Dev buchan everything you need to know about agent designBill Buchan
This document provides an overview of using the Lotus Notes C API security interfaces from LotusScript. It discusses two specific C API functions - REGGetIDInfo and SECKFMChangePassword. REGGetIDInfo allows you to examine an existing ID file and retrieve information such as whether it is hierarchical or a certifier. SECKFMChangePassword is used to change a password on an ID file. The document includes LotusScript code examples for calling these functions and retrieving the returned values. It defines several constants needed to specify the type of information to retrieve from the ID file.
Gearman is a software framework that allows distributing work across multiple machines. It consists of a daemon, clients, and workers. The daemon handles communication between clients and workers. Clients submit work to the daemon, which passes it to workers to complete. Workers register functions they can perform and handle tasks asynchronously. Gearman provides load balancing and allows processing work in parallel across languages. It can improve performance for tasks like image processing, email sending, and log analysis.
This document is a presentation about Gearman, an open source application framework for distributing tasks to multiple machines or processes. The presentation covers what Gearman is, its main concepts of client-daemon-worker communication and distributed model, how to do a quick start with Gearman including installation and a simple PHP example, digging deeper into topics like persistence, workers and monitoring, and PHP integration including usage, frameworks, handling conditions, and use cases like image processing and log analysis. The presenter provides contact details to find more information and asks if there are any questions.
This document discusses tools and techniques for managing Notes clients, user IDs, mail files, and archives to improve efficiency and security in a Domino environment. It covers best practices for taking inventory of clients, managing passwords, quotas and mailboxes, and using server-side archiving to reduce database size. The overall goal is to help optimize the Domino infrastructure through proper administration of users, clients and mail files.
This document provides tips for writing LotusScript code for large systems with a focus on logging, performance, code reuse, and handling weird situations. Some key points include:
- Logging is important for stability and managing large systems. Recommends using OpenLog or creating and emailing log documents to avoid performance impacts.
- Views with click-sorted columns and unnecessary views hurt performance. Recommends minimizing views and avoiding click-sort.
- Agents need to be well-behaved to avoid overloading servers. Suggests profiling agents, breaking large tasks into multiple runs, and not relying on Agent Manager to kill misbehaving agents.
- Code reuse is important for maintenance. Recommends creating
Cloud Foundry Summit 2015: 12 Factor Apps For OperationsVMware Tanzu
Speakers: Rags Srinivas, EMC; Matt Cowger, EMC
To learn more about Pivotal Cloud Foundry, visit http:///www.pivotal.io/platform-a-as-a-service/pivotal-cloud-foundry.
The document provides an overview of Luis Guirigay's experience and services for performing health checks on IBM collaboration software. It discusses why health checks are important, when to perform them, and tools that can be used, including Domino Domain Monitoring, Domino Configuration Tuner, and Health Monitor. It also outlines various aspects to examine like messaging, clusters, DAOS, transaction logging, and features that should be utilized.
This document summarizes different methods for monitoring and remotely accessing systems. It discusses the differences between historical and real-time monitoring, and outlines ways to monitor user machines, servers, and remotely log into machines using Remote Desktop Services. Specific monitoring tools covered include Microsoft Management Console, Event Viewer, Task Manager, Performance Monitor, and event and performance logs. The document provides examples of information to monitor and considerations for remote access and server monitoring.
Entwickercamp - Development for AdministratorsBill Buchan
The document provides an overview of best practices for application development and administration in a Domino environment. It discusses setting up separate development, test, and production environments to prevent unauthorized changes and encourage proper testing. It also covers deploying applications, using a signing agent to sign scheduled agents during deployment, when to use @Formula agents versus LotusScript agents, and some essential LotusScript concepts. The presentation aims to help administrators and developers work together effectively.
BP101 - 10 Things to Consider when Developing & Deploying Applications in Lar...Martijn de Jong
Many common development techniques can cause dramatic effects when your application is rolled out over hundreds of servers. As a developer, you need a good understanding of certain parts of the infrastructure to build an application designed for wide-scale deployment. System administrators who review applications before deployment should know what to look for in the code to prevent problems when rolled out to production. This session takes a look at the area where Application Development and System Administration come together. You will hear about real-life problems, view examples of bad code as well as good code, and learn what you should consider when you have to develop or deploy an application which will be rolled out in a large-scale deployment, or how to "harden" your code to support large quantities of documents.
The document contains the 11 commandments for administrators and developers working with Lotus Notes and Domino. It discusses important principles for each role, such as change control, security practices, writing maintainable code, understanding versions, and monitoring systems. The speakers provide guidance and warnings about common problems that can occur when these best practices are not followed.
A presentation on PHP's position in the enterprise, its past & present, how to get ready for developing for enterprise.
Inspired by Ivo Jansch's "PHP in the real wolrd" presentation.
Presented at SoftExpo 2010, Dhaka, Bangladesh.
The 12 Factor App methodology provides guidelines for building software-as-a-service applications in the cloud. It advocates for codebases that are tracked in revision control, explicit declaration of dependencies, separation of configuration from code, treating backing services as attached resources, and strict separation between build, release, and run stages. The methodology also includes guidelines for processes, port binding, concurrency, disposability, keeping development and production environments similar, and treating logs as event streams. Following the 12 factors can help applications maximize portability, be more robust and agile, and scale smoothly by avoiding reliance on implicit tools or behaviors.
Not my problem - Delegating responsibility to infrastructureYshay Yaacobi
Slides for for my talk, appeared on Code-Europe Poznan 12.06.2018
(https://www.codeeurope.pl/en/speakers/yshay-yaacobi)
https://github.com/yshayy/not-my-problem-talk
https://github.com/Yshayy/not-my-problem-talk/blob/master/slides/demo.md
The document discusses the evolution of agile teams from having no tests to implementing behavior-driven development and domain-driven design using Behat acceptance tests. It provides examples of using Behat scenarios to drive the development of a domain model for a messaging system without frameworks or controllers. The benefits are a simple, framework-agnostic domain model that is easy to understand and test and separates business logic from the user interface layers.
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
This is a presentation that Richard Mateosian gave to the STC-Silicon Valley chapter in November 2015. To learn more, see http://www.stc-siliconvalley.org.
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinMatt Tesauro
An overview of how to change security from a reactive part of the org to a collaborative part of the agile development process. Using concepts from agile and DevOps, how can applicaton security get as nimble as product development has become.
Npm has modules for devops, like logging, metrics, service discovery. But when you arrive to production, you may find that these are already handled by old players. Avoid the same mistakes I did, when my first node app was on its way to the world.
Security is more critical than ever with new computing environments in the cloud and expanding access to the Internet. There are a number of security protection mechanisms available for MongoDB to ensure you have a stable and secure architecture for your deployment. We'll walk through general security threats to databases and specifically how they can be mitigated for MongoDB deployments.
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support PerspectiveHostedbyConfluent
"As Apache Kafka gains widespread adoption, an increasing number of people face its pitfalls. Despite completing courses and reading documentation, many encounter hurdles navigating Kafka's subtle complexities.
Join us for an enlightening session led by the customer support team of Conduktor, where we engage daily with users grappling with Kafka's subtleties. We've observed recurring themes in user queries: What happens when a consumer group rebalances? What is an advertised listener? Why aren't my records displayed in chronological order when I consume them? How does retention work?
For all these questions, the answer is ""It depends"". In this talk, we aim to demystify these uncertainties by presenting nuanced scenarios for each query. That way you will be more confident on how your Kafka infrastructure works behind the scenes, and you'll be equipped to share this knowledge with your colleagues. By being aware of the most common misconceptions, you should be able to both speed up your own learning curve and also help others more effectively."
This document outlines a 60 minute presentation on providing quick tips for Notes/Domino administrators and developers. It discusses case scenarios and solutions using tools like Visustin, Lotus Notes Diagnostic Utility, NotesReconn, and FileSendr. Tips are provided on debugging Formula language, understanding code with no documentation, auditing server access, and pushing client-side Notes.INI settings via policy. The goal is to ensure attendees learn something new and find value in the tips shared.
This document provides an overview of wireless internet service providers (WISPs) through a presentation by Bill Buchan, who has 9 years of experience running a WISP. It discusses the technology, networking, and management of WISPs. The presentation walks through solving a rural broadband issue using line-of-sight wireless connections, choosing appropriate antenna types and equipment, and provides an example network design to deliver wireless internet to customers. It also covers potential issues that can arise with WISPs.
This document provides an overview of wireless internet service providers (WISPs) and how they construct their networks. It discusses how WISPs use inexpensive commercial off-the-shelf equipment like Ubiquiti devices along with frequencies like 5.5GHz to connect locations within line of sight and provide internet access to rural areas without wired infrastructure. The document also outlines the typical network architecture involving routers, switches, and wireless backhaul to residential customers.
More Related Content
Similar to The View - Best practices to write, deploy and monitor scheduled agents
Cloud Foundry Summit 2015: 12 Factor Apps For OperationsVMware Tanzu
Speakers: Rags Srinivas, EMC; Matt Cowger, EMC
To learn more about Pivotal Cloud Foundry, visit http:///www.pivotal.io/platform-a-as-a-service/pivotal-cloud-foundry.
The document provides an overview of Luis Guirigay's experience and services for performing health checks on IBM collaboration software. It discusses why health checks are important, when to perform them, and tools that can be used, including Domino Domain Monitoring, Domino Configuration Tuner, and Health Monitor. It also outlines various aspects to examine like messaging, clusters, DAOS, transaction logging, and features that should be utilized.
This document summarizes different methods for monitoring and remotely accessing systems. It discusses the differences between historical and real-time monitoring, and outlines ways to monitor user machines, servers, and remotely log into machines using Remote Desktop Services. Specific monitoring tools covered include Microsoft Management Console, Event Viewer, Task Manager, Performance Monitor, and event and performance logs. The document provides examples of information to monitor and considerations for remote access and server monitoring.
Entwickercamp - Development for AdministratorsBill Buchan
The document provides an overview of best practices for application development and administration in a Domino environment. It discusses setting up separate development, test, and production environments to prevent unauthorized changes and encourage proper testing. It also covers deploying applications, using a signing agent to sign scheduled agents during deployment, when to use @Formula agents versus LotusScript agents, and some essential LotusScript concepts. The presentation aims to help administrators and developers work together effectively.
BP101 - 10 Things to Consider when Developing & Deploying Applications in Lar...Martijn de Jong
Many common development techniques can cause dramatic effects when your application is rolled out over hundreds of servers. As a developer, you need a good understanding of certain parts of the infrastructure to build an application designed for wide-scale deployment. System administrators who review applications before deployment should know what to look for in the code to prevent problems when rolled out to production. This session takes a look at the area where Application Development and System Administration come together. You will hear about real-life problems, view examples of bad code as well as good code, and learn what you should consider when you have to develop or deploy an application which will be rolled out in a large-scale deployment, or how to "harden" your code to support large quantities of documents.
The document contains the 11 commandments for administrators and developers working with Lotus Notes and Domino. It discusses important principles for each role, such as change control, security practices, writing maintainable code, understanding versions, and monitoring systems. The speakers provide guidance and warnings about common problems that can occur when these best practices are not followed.
A presentation on PHP's position in the enterprise, its past & present, how to get ready for developing for enterprise.
Inspired by Ivo Jansch's "PHP in the real wolrd" presentation.
Presented at SoftExpo 2010, Dhaka, Bangladesh.
The 12 Factor App methodology provides guidelines for building software-as-a-service applications in the cloud. It advocates for codebases that are tracked in revision control, explicit declaration of dependencies, separation of configuration from code, treating backing services as attached resources, and strict separation between build, release, and run stages. The methodology also includes guidelines for processes, port binding, concurrency, disposability, keeping development and production environments similar, and treating logs as event streams. Following the 12 factors can help applications maximize portability, be more robust and agile, and scale smoothly by avoiding reliance on implicit tools or behaviors.
Not my problem - Delegating responsibility to infrastructureYshay Yaacobi
Slides for for my talk, appeared on Code-Europe Poznan 12.06.2018
(https://www.codeeurope.pl/en/speakers/yshay-yaacobi)
https://github.com/yshayy/not-my-problem-talk
https://github.com/Yshayy/not-my-problem-talk/blob/master/slides/demo.md
The document discusses the evolution of agile teams from having no tests to implementing behavior-driven development and domain-driven design using Behat acceptance tests. It provides examples of using Behat scenarios to drive the development of a domain model for a messaging system without frameworks or controllers. The benefits are a simple, framework-agnostic domain model that is easy to understand and test and separates business logic from the user interface layers.
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
This is a presentation that Richard Mateosian gave to the STC-Silicon Valley chapter in November 2015. To learn more, see http://www.stc-siliconvalley.org.
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinMatt Tesauro
An overview of how to change security from a reactive part of the org to a collaborative part of the agile development process. Using concepts from agile and DevOps, how can applicaton security get as nimble as product development has become.
Npm has modules for devops, like logging, metrics, service discovery. But when you arrive to production, you may find that these are already handled by old players. Avoid the same mistakes I did, when my first node app was on its way to the world.
Security is more critical than ever with new computing environments in the cloud and expanding access to the Internet. There are a number of security protection mechanisms available for MongoDB to ensure you have a stable and secure architecture for your deployment. We'll walk through general security threats to databases and specifically how they can be mitigated for MongoDB deployments.
Apache Kafka's Common Pitfalls & Intricacies: A Customer Support PerspectiveHostedbyConfluent
"As Apache Kafka gains widespread adoption, an increasing number of people face its pitfalls. Despite completing courses and reading documentation, many encounter hurdles navigating Kafka's subtle complexities.
Join us for an enlightening session led by the customer support team of Conduktor, where we engage daily with users grappling with Kafka's subtleties. We've observed recurring themes in user queries: What happens when a consumer group rebalances? What is an advertised listener? Why aren't my records displayed in chronological order when I consume them? How does retention work?
For all these questions, the answer is ""It depends"". In this talk, we aim to demystify these uncertainties by presenting nuanced scenarios for each query. That way you will be more confident on how your Kafka infrastructure works behind the scenes, and you'll be equipped to share this knowledge with your colleagues. By being aware of the most common misconceptions, you should be able to both speed up your own learning curve and also help others more effectively."
This document outlines a 60 minute presentation on providing quick tips for Notes/Domino administrators and developers. It discusses case scenarios and solutions using tools like Visustin, Lotus Notes Diagnostic Utility, NotesReconn, and FileSendr. Tips are provided on debugging Formula language, understanding code with no documentation, auditing server access, and pushing client-side Notes.INI settings via policy. The goal is to ensure attendees learn something new and find value in the tips shared.
This document provides an overview of wireless internet service providers (WISPs) through a presentation by Bill Buchan, who has 9 years of experience running a WISP. It discusses the technology, networking, and management of WISPs. The presentation walks through solving a rural broadband issue using line-of-sight wireless connections, choosing appropriate antenna types and equipment, and provides an example network design to deliver wireless internet to customers. It also covers potential issues that can arise with WISPs.
This document provides an overview of wireless internet service providers (WISPs) and how they construct their networks. It discusses how WISPs use inexpensive commercial off-the-shelf equipment like Ubiquiti devices along with frequencies like 5.5GHz to connect locations within line of sight and provide internet access to rural areas without wired infrastructure. The document also outlines the typical network architecture involving routers, switches, and wireless backhaul to residential customers.
Bill Buchan presented on worst practices in wireless internet service provision to underline best practices. Some examples included: a wireless site container that tipped over during a storm due to incorrect wind loading calculations; overloading an inverter powering multiple radios and cameras; a cable that was damaged by rust allowing water ingress; an antenna mounted upside down allowing water to fill it; fiber cables being chewed by mice; and safety issues like working at heights without harnesses or falling tools. The presentation emphasized planning, maintenance, equipment siting and securing cables and gear to avoid outages and hazards.
Marykirk raft race presentation night 2014Bill Buchan
This document summarizes the 2014 Marykirk Raft Race event which raises money for charity. Some key details:
- The event involves teams racing homemade rafts down a river while dressed in costumes, followed by further activities in a park. It has been held annually since the mid-1990s.
- In 2014 there were 13 participating raft teams who raced to win trophies for fastest time and best costumes. The top three finishers were announced.
- Over £7,000 was raised and distributed between several local charities, including the Children's Hospice Association Scotland and a local school.
- Volunteers are thanked for their help each year and attendees are encouraged to join the committee
LSX allows LotusScript code to connect to and exchange data with external databases. It provides several methods with different performance, platform independence, and whether it requires a native client. The presentation explores using LSX to read and write data between a Notes database and an Access or Oracle database. Code examples demonstrate connecting via ODBC, retrieving records from SQL and writing them to Notes documents, and inserting Notes document fields into SQL tables. Overall LSX provides a way to interface Notes with other databases for bulk data transfer applications.
This document provides a summary of leveraging the Notes C API in LotusScript. It discusses calling both simple and complex Notes C API functions from LotusScript code. Platform differences are highlighted when calling the C API directly. Custom classes are demonstrated as a way to hide platform differences and properly manage Notes C API handles. Examples are provided of calling simple API functions as well as handling complex sequences involving database handles.
This document provides an overview of 30 tips for optimizing LotusScript development. It begins with introductions and outlines, then groups the tips into three sections: Theory, Practice, and Advanced. The Theory section covers 10 fundamental tips regarding best practices like using Option Declare, version control, application lifecycles, code structure, testing, and error handling. The Practice section presents 10 tips that should be implemented regularly, such as defensive coding, extending arrays, logging, and using NotesDateTime. The Advanced section introduces more complex topics like custom classes and binding. The goal is to help LotusScript developers improve code quality, maintainability, and performance.
This document discusses calling the Notes C API from LotusScript. It describes the LotusScript eXtension (LSX) toolkit, which allows extending LotusScript with custom C code by building platform-specific libraries. It also covers differences between platforms when calling the Notes C API directly from LotusScript, such as data types and library file names. As an example, it demonstrates calling the simple NSFGetServerLatency() API function from LotusScript to get network latency between servers.
1. The document describes a workshop on developing BlackBerry applications that access Domino applications via web services.
2. It provides an overview of architectures for connecting BlackBerry and Domino, teaches how to enable a Domino application as a web service, and how to use the BlackBerry MDS Studio to build a basic BlackBerry app to retrieve and display data from the web service.
3. The workshop takes attendees through lessons building their first app and then a more complex one, with the goal of teaching how to enable mobile access to Domino data on BlackBerry devices.
This document provides an agenda and overview for a training session on advanced object-oriented programming techniques for LotusScript. The session will cover why OOP is useful, basic OOP concepts, and then more advanced techniques like inheritance, polymorphism, singleton patterns, and strategies for organizing large codebases. The goal is to help developers improve code quality, reuse, efficiency and robustness by leveraging OOP principles in LotusScript applications.
This document summarizes a presentation on leveraging object-oriented programming techniques in LotusScript. It introduces object-oriented concepts like classes, objects, and encapsulation. It then walks through building an application to monitor news sites for company mentions using a class to represent each site and a nested class to represent individual news items. The presentation demonstrates encapsulating the news item class within the site class and using inheritance by extending all classes from a base class. It shows how to make the application more robust by adding logging through the base class.
This document outlines an agenda for a talk on 30 LotusScript tips. It begins with an introduction that explains the structure of the talk and why it will cover 30 tips. The agenda is then broken into sections on fundamental tips ("Nursery Slopes"), less well known everyday tips, and more advanced tips to provoke thought. Each section provides 10 tips on topics like using Option Declare, templates and versions, error handling, classes, and performance coding. The document aims to share a variety of LotusScript best practices and techniques.
Bill Buchan will present on consuming and providing web services using Domino. The presentation will cover using Domino to provide SOAP-based web services, using Notes to consume web services, using XPages to provide REST-based web services, and consuming web services from C#. The goal is to help Domino developers get started with or enhance the web services capabilities in their environments.
The document provides a 12 step guide to writing effective LotusScript code. The steps include how to code for maintenance, testing code often and completely, spending time planning before coding, using defensive coding practices, leveraging built-in data types like Lists and NotesDateTime, and using logging and error handling techniques. Following the guide is intended to help produce code that is easier to maintain, has fewer bugs, and higher performance.
Everything you ever wanted to know about lotus scriptBill Buchan
Bill Buchan, a CEO and consultant with experience in LotusScript since 1995, gave a presentation on LotusScript. He discussed that LotusScript is an older language that is no longer a priority for development. However, it is still used to maintain many existing Domino applications. The presentation covered LotusScript basics like variables, classes, lists and the NotesSession object. It also discussed advanced topics such as calling C APIs, using the Execute statement, and creating web services with LotusScript.
This document discusses two methods for implementing single sign-on (SSO) between Active Directory and Domino: the Websphere plugin method and the SPNEGO method. The Websphere plugin method uses IIS as a front-end and relies on Kerberos tickets to pass authentication to Domino. The SPNEGO method implemented directly in Domino 8.5.1 and above also relies on Kerberos but does not require IIS. The document provides high-level overviews of how each method works and their relative pros and cons.
The presentation "Development for Administrators" was presented at AdminCamp 2006 in Germany, and a revised version presented at SoftSphere in Frankfurt in October 2007. This presentation intends to show Administrators:
Introduce proper development, UAT and production environments
show some basic @Formula language agents
Show some basic LotusScript functions
The document appears to be a presentation about worst practices in IT systems. It discusses several "case studies" or examples of things going wrong. The first case discusses a large organization where users stopped receiving new email due to a flag being incorrectly set in the mail template. The second case discusses archiving issues at another large organization where the archive server was down for weeks without notice. The third case discusses a router crashing multiple times due to an untested agent created in the mail template.
The document describes several "worst practice" case studies involving mistakes made with IBM Notes/Domino environments. Case 1 involved an emergency shutdown of a data center that crashed the SAN due to improper cooling system controls. Case 2 involved a user deleting over 1,500 documents by improperly replicating between servers. Case 3 saw a developer enable out-of-office messages for all 18,000 users by mistake. The remaining cases involve other issues like access control changes locking out users and assuming environment changes would be isolated. Overall the document aims to discuss lessons learned from real mistakes that compromised production environments.
3. Introduction
• Who is the target audience?
Lotus Notes developers who use server-based agents
• What is this talk about?
It’s difficult to imagine a complex Notes application without
some form of scheduled agent
However, these are often deployed quickly without much
thought as to how they can be managed and operated on a
reliable basis
This session attempts to remedy this
3
4. Who Am I?
• Bill Buchan
• Dual Principal Certified Lotus Professional (PCLP) in
Domino v3, v4, v5, v6, v7
• 10+ years senior development consultancy for
Enterprise customers
Learn from my pain!
• 5+ years code auditing
• CEO of HADSL
Developing best-practice tools
4
5. Overview
• This session:
Is mostly slide-based
Contains a few code examples
Is a deep dive in terms of theory
Summarizes 10+ years of enterprise code auditing
5
7. Agent Manager: Introduction
• It’s been in Domino since version 3
• It handles both scheduled and triggered agents
• It handles @Formula, Java, and LotusScript agents
• It’s a very efficient place to run code
Because it’s running on the server, it benefits from all the
server database, view, and document caches
7
8. Agent Manager: Introduction (cont.)
• It changes behavior for daytime and nighttime operation
Defined in the server document
These are the defaults
Should these be changed?
I don’t recommend it …
8
9. Agent Manager: Security
• Three types of agent
security:
Do not allow restricted
operations (default)
Allow restricted operations
Allow restricted operations with full administration rights
9
10. Agent Manager: Security (cont.)
• What does this mean?
Restrictions based on the code you write in your agent
• Restricted operations include:
File I/O: File operations, kill, chdir, etc.
Network operations (in Java)
Using a disk-based NotesLog
Environment variables
Encryption and signing(!)
Embedded objects
Calling C API-based routines
10
11. Agent Manager: Security (cont.)
• Agent security was introduced on ND6
Beware
• On a v5 upgrade to v6 or v7 upgrade, ALL agents by
default are set to level 1
You have to find the agents that run restricted code, and
“upgrade” them
Either examine every agent or use automated tooling, such as
Teamstudio Analyzer
www.teamstudio.com
11
12. Agent Manager: Agent Types
• Scheduled agents
Schedule a repeat time period
Select either “All Servers” or a
particular target server
• Triggered agents
From a client
Before and after mail delivery
After document creation
After document is pasted
• Remember:
Agents can call other agents
Useful for mixing languages …
12
14. Scheduled Agents in LotusScript
• Scheduled agents are:
Pieces of code that you create which can run on the server or
workstation at pre-defined intervals
You can choose to run it on a particular server, or ALL servers
that this database exists on
They are single-threaded
They have a time limit
If they exceed this time limit, they will be killed
In this event, the “Terminate” code is executed
You may have two instances of the same agent executing at
the same time …
Bear this in mind during design
14
15. Scheduled Agents: Time Limit
• If the agent will take a long time, it should:
Record its start time
Find out how long the task should run on this server
Stop processing before this time period occurs
Record its state so that it can restart
This might be as little as marking each document as
“processed”
Log its progress, and allow you to see any issues
• Or:
Re-architect the solution to avoid this
• This sounds difficult …
15
17. Scheduled Agents: Setting Frequency
• The agent schedule gives you a number of choices
The shortest time period is five minutes
Remember, during the day there is, by default, only one agent
manager thread
If you have hundreds of “five-minute” agents scheduled for
five minute intervals, the Agent Manager thread will be
overloaded …
• If you need more frequent time periods, re-architect the
solution by using triggers
Is this triggered by a mail-in document, document paste, etc.?
Alternatively, use TriggerHappy
Open source project, www.openntf.org
Can trigger LotusScript agents on Extension Manager
events
17
18. Triggered Agents
• Triggered agents are:
Pieces of code that can run on servers or workstations, and
operate on certain triggers
Before or after a document has been mailed to a database
When a document is pasted into a database
When a document has been updated
• Agent manager has mechanisms to ensure that it does
NOT trigger too often
Usually needs at least two minutes between each agent run
Mail-in agents may not trigger enough:
So if you have to rely on a mail-in database, create another
mechanism to pick up all “unprocessed” documents, such
as a status view
18
19. What About Agent.RunOnServer?
• In LotusScript, when you use “notesagent.RunOnServer”
or “tell amgr run … ”
Agent manager appears to spawn a new agent thread
The agent does not get terminated if it exceeds the agent
run-time on the server document
The agent appears to run in its own memory space
There is no connection to the agent
You cannot tell it to quit
• This means:
Try not to use this technique in production
If you do, be especially careful about:
Making sure it terminates
Logging all activity
19
21. Tip: Memory Space
• Scheduled agents share the server memory pool
• Be careful of how much memory you consume
Offences, such as keeping large number of NotesDocument
objects open at any time, should be avoided
• If you have to “read” a large number of documents, do
some operation, then update a small number of them
Read the comparison information and the NoteID into memory
(Custom Classes and Lists are good for this)
Do the operation
When updating the document, use the NoteID to quickly
reopen and save the document
21
22. Trap: Profile Documents
• Profile documents are documents that do not appear in
views, and are easily accessible from LotusScript and
@Formula language
Very useful for configuration settings, etc.
• However, Agent Manager tends to cache these
If the profile document contains rapidly changing information,
there is a danger that your agent will not receive the most
up-to-date information
• So:
Don’t store rapidly changing information in a profile document
22
23. Tip: Execution Time
• As mentioned earlier, you have a limited amount of time
to achieve your goal with a scheduled agent
• If you are in danger of exceeding this, re-architect
For instance, if this agent:
Runs once per day
Collects all “outstanding” documents
Processes them
Then have this agent:
Run multiple times
Store its last completion point and run from that point
23
24. Trap: Garbage Collection
• Custom Classes and Lists allow you to store
information in the memory in a structured manner
This leads to simpler code and faster execution
• However:
If you attempt to “clean up” heavily interlinked objects in your
code, you may confuse the garbage collector
It may crash Agent Manager, the server, or a client process
• So:
LotusScript’s garbage collector is pretty good
Just let it happen naturally
24
25. Tip: “Trusted Servers”
• Before Domino 6, scheduled agents could access
databases on the current server only
• Now, if the “Trusted Servers” field is populated, you
may access databases on other servers
• This means that you are no longer required to have
replicas of databases on every server in order to collect
information from that server
No more “replication storms”
However, the link to the other server has to be reliable
25
26. Trap: Run on All Servers
• You can set an agent to run on all servers that the
database exists on
Very useful for distributing workload
• Be careful to make wide-ranging changes on one
instance of the database
A worst practice story:
100K document database, 15 instances
Agent set to update all documents — every HOUR on
each server
Replication pushes out design elements first
Result:
4.8 million new documents
Database grew from 3GB 15GB!
26
27. Tip: Cache Open Views
• Every time you open a view, it may be refreshed
A very time-consuming operation
• Use a “list” to keep all open views in a central location
Dim allViews list as NotesView
Set allViews(“nabNames”) = dbNAB.getView(“($People)”)
Set allViews(“Lookup”) = dbThis.GetView(“vLookup”)
…
Set doc = allViews(“Lookup”).getFirstDocument
…
27
28. Trap: Timing and Replication Lag
• On a distributed application:
Users and agents update documents
Replication is used to move documents around
• Remember, when looking at document round-trip time,
budget at least:
Two replication cycles
One Agent Manager cycle
• You might lessen the agent cycle time to reduce
replication conflicts
28
29. Tip: Profile Those Agents!
• Domino can “profile” your agent
Agent Properties, “Profile this agent”
Once it has run, right click and select
“View Profile Results”
29
30. Tip: Profile Those Agents! (cont.)
• The agent profiles are saved in profile documents
Form = “$BEProfileR7”
Subject = AgentName + “Profile”
Results in body text
You can programmatically find and analyze these
• Check out Teamstudio’s Profiler tool
Can give you run-time analysis of your own functions
Also, free tools include:
Class Browser
Call Tree Analysis, etc.
http://blogs.teamstudio.com
30
31. Trap: Remote Debugging
• Remote debugging should allow you to debug your
agent while running on the server
I haven’t heard of ANYONE getting this to work successfully
• My advice:
Test scheduled agents by constructing test harnesses you can
run manually
• This means:
The agents should have as little code in them as possible
All your code should be in script libraries!
31
32. Tip: Allowing Users to Manage Scheduled Agents
• One common issue is allowing non-designers in
production environments control over agents
Specifically, how often they run, on which servers, etc.
• Rescheduling an agent usually means:
Updating the template and refreshing the database design
However, in larger environments, this may be impractical
• One approach is to:
Schedule the agent to run frequently on all servers
Check a configuration document within the same database to
see if this agent should run at this time on this server
Remember: Profile documents may cache and not show
new information for a significant period of time
32
34. Logging — Introduction
• Scheduled Agents should have:
Logging. This logging should provide:
Run-time information
When did the agent start, where, and why?
How many operations did it process?
Error information
For instance, if a run-time error was triggered, where
and how was it triggered? If there was a data error,
where did this occur? Did the agent then process
beyond this data error?
34
35. Logging — Style
• However:
The NotesLog model creates a new document for every
log line
This means that you either have minimal logging, or a
huge log file
• I recommend:
You develop your own “ticker-tape” style log facility
Similar to Notes log.nsf
Color code different levels of error for easy debugging
Count errors on the log view
35
36. Logging — Style (cont.)
• This logging achieves:
Size
Each log document is small
Ease of use
Errors are highlighted and easy to find
• Optional enhancements
Have a configuration document that shows only logging
documents up to a particular log level
36
37. Logging — Performance
• Huge log databases are slow to open and consume lots
of space if replicated to all servers
• Why not mail log documents to a central log database?
Fast
Your agent doesn’t have to open the log
Easy
It’s very easy to set up a mail-in database and send the log
document via mail
Secure
You don’t have to grant author access for all users
37
38. Monitoring — Introduction
• Scheduled agents are rarely monitored
Bad practice
Failures are often found first by the users
• Business-critical agents should:
Create a status document at the end of each run
Possibly mail that status document to a central location
Another agent should monitor those responses, and alert
operations if a status document is overdue
38
39. Monitoring — Requirements
• All scheduled agents should then:
Be aware of which servers they start on
Be aware of the amount of time they can run for
Be aware of their final status
Report success/failure criteria
Be able to report other statistical information
• A central log database should then:
Be aware of which databases, which servers, and which
scheduled agents are expected to report
Raise alerts if these reports are overdue
39
40. Demo
Demo
Brief Overview of
AgentClass with
Monitoring
40
42. Resources
• My object-orientated programming presentation
www.billbuchan.com/web.nsf/htdocs/BBUN6MQECQ.htm
• Steve McConnell, Code Complete, Second Edition,
(Microsoft Press, 2004).
www.amazon.com/gp/product/0735619670
• OpenNTF projects — OpenLog and Stubby
www.OpenNTF.org
• The Notes FAQ!
www.keysolutions.com/NotesFAQ
42
43. Resources (cont.)
• SearchDomino.com — LotusScript Learning Guide
http://searchdomino.techtarget.com/originalContent/
0,289142,sid4_gci1001826,00.html
• Brian Benz and Rocky Oliver, Lotus Notes and Domino 6
Programming Bible (Wiley, 2003).
www.amazon.com/gp/product/0764526111
• THE VIEW
Mark Roden, “Simple Methods for Creating HTML-Formatted
E-mail in Domino Web Applications and Scheduled
Agents” (May/June 2003).
www.eView.com
43
44. 7 Key Points to Take Home
• Agent Manager is a harsh taskmaster
• Scheduled Agents should be time-sensitive
Run quickly and behave well
Profile your agents to understand where they spend their time
• Object-orientated techniques can:
Help manage complexity
Add standard code
• “If you can’t measure it, you can’t manage it”
44
45. 7 Key Points to Take Home (cont.)
• Monitoring scheduled agents:
Is not hard
Aids environmental stability
But be sensitive to how much logging information your
application generates
• Ensure that your agent security level is set correctly
• Avoid “notesAgent.RunOnServer” in production code
It may create unmanageable Agent Manager “zombie”
processes …
45
46. Your Turn!
How to Contact Me:
Bill Buchan
Bill@hadsl.com
46