DOTS (Domino OSGi Tasklet Services) allows developers to run background tasks in a lightweight scalable container separate from the Domino server JVM. DOTS was contributed as an OpenNTF project in 2010 and included in Domino 9 and 12. It provides advantages over Java agents like better performance, scalability, and compatibility. Example uses of DOTS include importing blog posts, running long-running upload tasks from a CRM system, and more. The presentation provides an overview of DOTS and recommendations for getting started with it.
3. WHAT IS DOTS?
• DOTS: Domino OSGi Tasklet Services
• Develop and run OSGi level server Tasklets for Domino
• Run background tasks in a lightweight scalable container
• Tasklet: A lightweight server task
• Manual (console commands / socket trigger)
• Scheduled or on server start
• Triggered (Hooks through data events)
• Tooling: Eclipse IDE + OpenNTF XPagesSDK
• Leverage existing OSGi assets
4. HISTORY OF DOTS
• OpenNTF project contributed by IBM
• Named as JAVADDIN project in 2010
• Renamed as OSGi Tasklet Service in 2011
• Added to IBM Domino 9 Social Edition in 2013
• Installed with the OpenSocial add-on
• For internal use (Out of Support)
• Removed in version 10 in 2018
5. DOTS RETURNED TO DOMINO V12!
• Installed with the Core product
• Support: Windows 64 and Linux 64
• Upgraded to Eclipse OSGi 4.6.2 (Neon 2)
6. OVERVIEW OF DOTS
• DOTS task coordinate its tasklets/threads
• Separate JVM and OSGi Container
• Supports multiple profiles
• Virtual containers
• Separate service threads
• Great for scalability
Source: Domino OSGi Tasklet Service (DOTS) Documentation
7. WHEN SHOULD YOU USE DOTS?
• Need Background processing in your application?
• Accessing Domino resources
• Long-running
• Unattended
• Scalable
• High performance
• Great alternative to Java agents
• More compatible
• Much faster / scalable
• Less buggy
8. WHEN SHOULDN’T YOU USE DOTS?
• Expensive for simple tasks
• More time consuming to develop/maintain/deploy
• Steep learning curve
• Java, OSGi, Eclipse, Deployment, etc.
• Attended background tasks
• If not scheduled or not triggered by internal event
• Some form of user interaction
9. DOTS OR JAVA AGENTS?
• Agents are easier to develop
• Easy development/maintenance/deployment
• Well-integrated into Domino Designer
• Wide range of triggers
• Scheduling
• Web/XPages/Notes actions
• High level database events
• Good Security
• Code signing, ACL, etc.
• Runs on Notes client too…
• However, they are not perfect!
10. DOTS OR JAVA AGENTS?
• Java Agents are inherently slow…
11. DOTS OR JAVA AGENTS?
• Java Agents are inherently slow…
Run!
DOTS tasklet: Everything is ready to run
> tell amgr run "testXPagescrash.nsf" 'LongJobAgent'
09.11.2012 19:38:39 JVM: Java Virtual Machine initialized.
09.11.2012 19:38:39 AMgr: Start executing agent 'LongJobAgent' in 'testXPagescrash.nsf'
09.11.2012 19:38:39 Agent Manager: Agent printing: 181349
09.11.2012 19:41:02 Agent Manager: Agent printing: 2227
09.11.2012 19:41:02 Agent Manager: Agent printing: Finished in 143 secs... -
09.11.2012 19:41:02 AMgr: Agent 'LongJobAgent' in 'testXPagescrash.nsf' completed execution
> load dots
> Listening for transport dt_socket at address: 8001
09.11.2012 19:42:40 Domino OSGi Tasklet Container started ( profile DOTS )
> 181349
> 2227
09.11.2012 19:43:22 [DOTS] (annotated) Finished in 41 secs...
AMGR
launches a
Thread
JVM
Initializes
Prepare
Java and JNI
interfaces
Load Agent
Bytecode Run!
Java Agent:
12. DOTS OR JAVA AGENTS?
• Java Agents are inherently slow…
• Old and Buggy
• Incompatible with many modern libraries
• Design limitations (SSL, reflection, etc)
• Buggy behaviours (Memory leak in JAR files)
• Java Agents are not scalable
• A resource-intensive agent can block other agents
13. DOTS OR XOTS?
• XOTS might be a feasible alternative…
• “DOTS tasklets within XPages” (credits to Paul Withers)
• Part of the OpenNTF Domino API
• Differences:
• XOTS: Shares context and code base with XPages apps
• Developed as Java classes right in the DDE
• Utilises all functionalities of ODA (logging, auto-recycling, etc.)
• Disadvantages
• Shares the same resources with XPages apps.
• XOTS is a community-driven effort
15. FEEDMONSTER
• DOTS module in OpenNTF Collaboration Today
• Problem:
• Curators adding news stories manually
• Find the news story
• Adjust title, summary, etc.
• Publish
• Manual import is a time consuming process
• Curator might save huge time if some blog posts were
imported automatically!
16. FEEDMONSTER
• DOTS module designed to pre-fetch new blog posts
Blog Feeds
Queue Documents
Feed URL #1
Feed URL #2
…
Feed URL #N
Feed Monster
Manual Fetch
Scheduled Queue Refresh
Manual Queue Refresh
Scheduled Fetch
Domino Console
Commands
Blogs
18. E-MAIL MARKETING INTEGRATION
• A customer case
• CRM, Sales and Marketing Automation apps
• Notes Client apps
• Multiple facilities, multiple Domino servers
• Campaign and Newsletter e-mails
• A third party E-mail Marketing service
• Upload CSV file to a secure FTP (SCP) server
• All uploads are transient.
19. E-MAIL MARKETING INTEGRATION
• Tasklet can handle long-running upload process
• Watching queue every minute
• Very small footprint for queue monitoring
• Reuse Java code already developed before
User builds a target
query for the campaign
Predefined target lists
for newsletters
UploadJob Queue DOTS Tasklet
(Scheduled / Manual)
• Fetch next UploadJob
• Run query
• Convert to CSV file
• Compress
• Upload to SCP Server
Upload Job #1
Upload Job #2
…
Upload Job #N
21. HOW TO START? - UPGRADERS
• Update Eclipse 4.6.2 or later
• Recompile your plugins
• Upgrade to Domino v12
• Removes existing DOTS plugins
• Resets everything
22. HOW TO START? - NEWBIES
• Eclipse IDE is needed for development
• Minimum Eclipse 4.6.2 (Neon 2)
• Designer might be used with a few unsupported settings.
• “Unsupported” means “exciting” (like bungee jumping)
• Install the latest OpenNTF XPagesSDK for testing/debugging
• Local Domino Server for development is recommended
• File-level access between Eclipse and Domino is needed
• For Mac users, Linux/Windows VM works well
• Development setup is easy.
• DOTS documentation by HCL
• BP207 slides from IBM Connect 2013
• Notesin9 - Episode 93: Introduction to DOTS