Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Guaranteed e-mail returns

Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
12-24-2005 16:15
I have a server and a group of client objects. The server has a 20 process e-mail sending farm with a single queue manager controlled by link messages. One script loads up the queue manager with all of the messages for the client objects, then starts (on a timer event) calling llGetNextEmail to retrieve the "acknowledgement" messages that are sent by each client when it recieves the message from the server. The calls to llGetNextEmail are made on a 2-second timer event, and the email() event handler calls llGetNextEmail again if more than one message was reported to the email event.

The problem with this is: when I actually stress-test it, with 50 clients, the last 5 acknowledgement messages never arrive. All the messages are reported as being sent. I at first guessed that they were arriving while the server's e-mail queue was too big and being discarded, but I then tried adding a random 1-5 second delay to each client between recieving the message and sending the acknowledgement to break the e-mails up but this made no difference. Does anyone have any idea how this can be managed reliably?
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
12-24-2005 20:21
The problem that screams out at me here is an event queue overflow somehow happening. The event queue of a script tops out at aroud 64 events, after which the scripts will begin dropping events. When flooded with requests, how are you handling them? Here's what I think I see happening:

Master Script is sending out 50 email requests.
Master sends first event out, it queues an event in all scripts.
Emailer1 confirms the recepit of an event, sends the email, is delayed 20 seconds.
<Here's where things get funky>
If the master manages to get another email request out before Emailer1 confirms:
Emailer2 confirms the recepit of an event, sends the email, is delayed 20 seconds.
Emailer1's confirmation queues an event in all scripts.
If not, the reverse happens.

Rinse-and-repeat. Im assuming here you emit a confirmation link message before calling llEmail (OP: "All the messages are reported as being sent.";).

What I like to do is, instead of using the multi-script approach, I rez an emailer object (set to temp-on-rez). Once rezzed, the rezzor llWhispers the email data to the emailer, the emailer's script calls llEmail, and the system takes care of derezzing the emailer. This way bypasses the llEmail delay entirely, replacing it with a 0.1-second llRezObject delay.
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm