db.OpenWithFailover - What is the catch?

Hi all!

I’m currently rewriting an application to be able to open other databases with cluster failover. That’s not the problem…

I’m wondering…

What is the catch about using OpenWithFailover?

I mean - I’f there is no difference in opening a database the “normal” way and using OpenWithFailover then:

1: Why are developers not always using the OpenWithFailover?

2: Why are the “normal” way to open a database, not implemented with automatic OpenWithFailover?

There must be a catch somewere, otherwise Iris would have done it automatic - don’t you think?

Anybody got any clues?

Regards

Christian A. Gravgaard,

Theilgaard Mortensen A/S

Subject: db.OpenWithFailover - What is the catch?

The non-failover method means you’re always addressing the same database, so conflicts are less likely.

Subject: db.OpenWithFailover - What is the catch?

I can think of three reasons:

  1. Backward compatibility. I don’t know when OpenWithFailover was introduced, but I’m betting it came after LotusScript was introduced. If the non-failover version wasn’t there to begin with, they need to stay there so that older scripts don’t fail.

  2. Error handling. If your initial Open attempt fails, there may be cases when you don’t want to fail over or, at least, when you want to note that the database isn’t there or the desired server isn’t talking to you and deal with that in a particular way.

  3. Overhead. If you’re operating in a non-clustered environment (single server, local databases, multiple but non-clustered servers, etc.), there’s no point in trying to fail over. I don’t know for sure, but I’d bet that OpenWithFailover eats a tiny bit more time and/or memory than Open.