|
|
|
|
|
|
|
|
|
|
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.
[ Next ]
|
|
|
|
|
|
-- Advertisement --
AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.
Learn more about HELP Software products
|
-- Advertisement --
Now for the first time, real-time dashboards within Notes!
No more tedious report iteration and endless data exporting! The New IntelliPRINT Dashboard Reporting now empowers you to easily create analyzable widgets and real-time dashboard reports. Your business managers can then quickly customize, extend, and analyze these dashboards to their heart's content!
All from within your Lotus Notes data, all in real-time!
Download your Free Trial today!
|
|
|
|
|
|
|
|
|