SEM Development

January 31, 2006

The terror of forking and LWP::Parallel

Filed under: Tips & Tricks — Bob @ 6:37 pm

I’m not sure about anyone else but I hate using the raw fork() command in Perl. It may just be a psychological thing but even in programs I know will run well with good sychronization, I alway harbor a deep fear that the parent will start spawning zombie processes like an undead rabbit. Up until now, I’ve had to deal with that fear in my campaign updating processes. I fork both Google and YSM updates and it saves a ton of time.

Today, however, I was directed toward LWP::Parallel. It allows you to run HTTP calls in parallel. There’s also an LWP::Parallel::UserAgent. This is perfect. I currently inherit the LWP::UserAgent module and overload the request methods for both Google and YSM. Then I just use these modules as I would LWP::UserAgent. Now I’m going to add some logic to take advantage of this parallelization. I’ll keep you apprised of the details.

January 25, 2006

destinationUrl in KeywordService and CriteriaService behaves oddly

Filed under: Google AdWords, annoyances — Bob @ 6:44 pm

Maybe I’m the only one that sees it this way but I think you should be able to omit the destinationUrl when updating a Keyword or Criteria record. Currently, it is required, and thus omitting it results in a <destinationUrl xsi:nil="true"> being sent. This means your current destinationUrl is erased in favor of the ad group’s default URL. I just think that’s annoying. If I wanted to erase the destinationUrl I’d send a blank or NULL field. If I just don’t want to waste bandwidth by including it in the call, I’d like to be able to omit it. Apparently, that isn’t allowed.