> Sorry, today my 'd' key in Pine is pretty hungry and it nuked the email
> about "userstat". Anyway, such command must be lightning fast even with
> 50000 account in your db. Which OS are you using ? How do you run the
> command ?
>

I'm running Linux 8.0 on a Duron 800 system.  The system has literally no
load on it because its an experimental test machine I use for projects like
this one.

I'm not sure that the code I've provided below really tells you much about
how I'm communicating with my server.  I'll try to summarize:
[Test]

public void NoUserStats() {

UserStatCommand cmd = new UserStatCommand();

cmd.Connection = cx;

cmd.Domain = global.Domain;

cmd.UserName = "mxyzptlk";

IResponse rsp = cmd.Execute();

Assertion.Assert(!rsp.IsOK);

Assertion.Assert(rsp.Code != 0);

Assertion.AssertNotNull("XMail Response Message", rsp.Message);

if (rsp.IsOK) {

Console.WriteLine(rsp.Text);

}

else {

Console.Error.WriteLine(rsp.Text);

}

}

The UserStatCommand class is just a simple wrapper that produces the
correctly formatted text string according to the Ctrl API.  The Connection
class is a special class I designed that uses asynchronous sockets
(involving callbacks, etc.) to communicate with the XMail server.  I chose
to use asynchronous sockets because I may want to administer my server
remotely and I've found that network latency effects influence performance.
Actually, the fact that I'm using async sockets shouldn't matter here,
because my workstation and the server are on the same subnet with a switch
connecting the two of them.

The domain, username, etc are just strings, nothing fancy there.

I "open" a connection, authenticate, then using my class, I issue the
command and wait for a response.  I validate the response text to make sure
it adheres to the API guidelines, and run the "tests" etc.



Nothing glamorous.  I use the same sockets, etc. with all the other commands
I've worked on so far (about a dozen of the API commands) and don't see the
same loss of performance.  That made me suspect that the problem is related
to those situations where you don't have a real user's name (that's what I'm
sending here... if you read Superman comics, you'll recognize Mr. Mxyzptlk.
I have to assume I won't have a user with this name on my system (for now).



Rob








-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to