...

View Full Version : Performing web services without affecting page load...



iLLin
01-03-2008, 03:05 PM
Ok let me explain that ;)

What I am doing is having a consumer fill out a registration form. That form is say for a estimate on home remodeling. Ok they fill out their form with the basic information with first/last name, phone and address...etc. I want to perform two external calls (web services) for verifications. First call would be an IP Lookup. I want to bump their IP information to there address. Obviously for those that do this I can pretty much only use the state, but I gather all the data anyway... city, isp, state, areacode, country... etc. So I am bumping the state of the ip to the state of the address the user specified. Yes I know AOL and other ISP's that you just can't rely on that information. It's just a verification.. This call I am using SOAP.

Next call I am using XML to send that data to a lead verifier to check the phone to name. Simply I send them what I got and they send me back either corrected data, success, or failure and why.

Now I can do both of these fine and everything works, here is my question/problem. When they submit the form all of this happens and basically my server will be waiting on their server, so if say the IP lookup server is down or times out or is just very slow at the moment, that sucks.

What are my options to get around this where the user never has to wait on those external calls?

Thanks for any ideas ahead of time,
Dennis

hammer65
01-03-2008, 03:52 PM
You could use AJAX and provide feedback to the user on progress (won't work if Javascript is disabled). You could also fork the process and then send them email when the process was finished. They can then proceed with whatever else you need them to do.

aedrin
01-03-2008, 04:44 PM
Yes I know AOL and other ISP's that you just can't rely on that information. It's just a verification.

Not only that, but ISPs commonly cover a larger area than just one city. Yet the IP will be reported as coming from the central city.

It's not helpful, even just for verification.

iLLin
01-03-2008, 08:25 PM
It is helpful as I am doing "state" not "city" and my verification relies on a point system just as spam does. Verify their email address, there state matches the ip state, the phone matches the name... etc. If a certain amount of points is not achieved then the lead coming in is marked to be manually confirmed by a live person.

Make more sense on why I am doing it this way?

Also yea I thought about using AJAX, I wonder if I should just do this as an extra action with a cron job. Just log the ip to the lead and go with my verifications every 15 mins or so during business hours and every 4 hours or so after business hours. Just trying to prevent lots of overhead. Need to think more on this I guess.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum