Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Detecting early termination by client

by Mabooka-Mabooka (Sexton)
on Apr 17, 2005 at 05:04 UTC ( [id://448585]=note: print w/replies, xml ) Need Help??


in reply to Detecting early termination by client

Would be lovely to know more. So, this customer doesn't want an acknowledgement, but insists on one? An acknowledgement of.. what?
I speculate that there're two possible acknowledgments here:
1) "I received your XML";
2) "I successfully process-etc-ed it".

If that is so, de-coupling the code into to parts:
1) getting the client data;l
2) processing it asynchronously

would do?
(you'll probabaly still have to add
if($customer is not in $my_piss_off_list) { only_notify_once...}
., but that'ok?

Replies are listed 'Best First'.
Re^2: Detecting early termination by client
by enemyofthestate (Monk) on Apr 18, 2005 at 05:46 UTC
    > Would be lovely to know more. So, this customer doesn't want
    > an acknowledgement, but insists on one?

    Yup. The CGI is part of a system that provides Flood Certificates to Loan companies and Banks. If the Boolean "WaitForCertificate" is set "T" then the customer is indicating he wants a finished certificate sent on the open channel. There is also a provision for the XML copy of the certifcation to be set back to a ResponseURL. The PDF only can be sent via Email or FAX. A customer can even indicate don't send him anything. Presumably he'll send a query when he's ready for it.

    > An acknowledgement of.. what?

    An XML document which is either a compelte certificate or tells him where the order went and trackng information.

    > I speculate that there're two possible acknowledgments here:
    > 1) "I received your XML";
    > 2) "I successfully process-etc-ed it".

    Essentially yes tho number 2 can be a pretty wide range of responses.

    > If that is so, de-coupling the code into to parts:
    > 1) getting the client data;l
    > 2) processing it asynchronously

    I doubt seriously if other customers would tolerate this. Most want an answer back three seconds before they send it but are willing to tolerate a plus five to plus ten second delay. It may become necesary to just change the settings for this one customer from wahtehe says he wants to what his behavior indicates he really wants. I hate that kind of second guessing tho.

      Banks, sertificates, faxes,,, -yuck!

      So, again; what's wrong if you:
      1) suck the data out; 2) put it somewhere so the ProcessDataDaemon will pick it up; 3) in the meantime, display a page: "Thank you for submitting blah... +Press here to view your valuable blah-blah..." , or "Check your email soon to view few-few..." - ?
        What you describe is pretty much what I do. However the customer has some options regarding what he wants in response and this one is requesting a completed certificate be returned on the open connection if possible. That means I have to wait for another process to decide if that can be done. Even if the order automates (95%+ do) that means two to four seconds of idle time. It is someowhere in there I suspect the customer cuts the connection.

        I could just create a bozo list and set his defaults to something closer to what his beahvior indicates he wants but I'd prefer not to. Judging from what I see in the "emergency" logs mentioned below looking for a SIGPIPE might be the correct solution.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://448585]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-28 14:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found