Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
BASIC SERVER TASKS
Coding Domino server tasks in C: the adventure continues
By Ian Cherrill

If you made it through last month's article on using Microsoft Visual C++ 6.0 to write Domino server programs (at http://www.dominopower.com/issues/issue200012/coding001.html), you're probably wondering how to apply this newfound knowledge to a program that does something useful. Well, that's the aim of this article.

I mentioned last time some of the reasons you might want to write a C server task. Since we're going to write a useful program this time rather than compile an example, here's more detail on the reasons you should consider using C server tasks instead of the alternatives, such as a LotusScript or Java scheduled agent.

For one thing, C server tasks always run in an unrestricted mode. You can access the file system of the server, run other programs, and interact with other systems. Unlike Notes agents, you can access Notes databases on other servers too. So there's more things you can do with a C server task than an agent.

"This month I had to write a program to archive 20,000 documents a night from a 450,000 document, 3GB Notes R4.6 database."

C server tasks are the best for performance. This month I had to write a program to archive 20,000 documents a night from a 450,000 document, 3GB Notes Release 4.6 database. The original LotusScript agent failed first because of a signing issue--the new server it ran on didn't allow the signer to run agents on the server. Then it failed because the script didn't handle some errors very well (what is that On Error Resume thing?), and finally it failed because it ran out of its allotted time on the server (it was taking hours to complete), though I have to say the server didn't help as it was an R4.62 machine. I had no such problems with the same task in C, and it ran in half the time even with full logging-per-document turned on. C is simply the best way to make an agent run in a performance-challenged server environment.

C server tasks are not as difficult to write as you might think. The archiving program I mentioned above was written and tested in one afternoon. Once you're used to the debugging environment and you have a library of useful routines (getting each document in a view, listing all the databases on a server, and logging a Notes error are good ones), putting together a server task is not difficult or time-consuming. You certainly have to invest more of your time at the start of the learning curve, but the rewards are there when you're up to speed.

This month, we're going to look at a program my company supplies for free called ACLHelp. ACLHelp is a simple server task that allows you to become manger of a database by using the Domino remote console. This is very useful if you've just dropped yourself out of an ACL (Access Control List) by pressing the wrong button (having a bad day?) or if one of those dear users has deleted everyone including themselves and you out of the ACL of their mail file and now wants to know what you're going to do about it.


1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Lotus Technologies > Access Control (7 articles)
   Forcing immediate indexes to actually update immediately
   Enabling and disabling the single login setting in Notes 6
   Coding Domino server tasks in C: beyond Windows
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Home > Microsoft Technologies > Visual C (2 articles)
   Coding Domino server tasks in C: beyond Windows
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login