Blog of The SJG

Thursday, February 28, 2008

The Adobe Trifecta Hath Arrived

http://www.adobe.com/products/flashmediaserver/
http://www.adobe.com/products/flex/
http://www.adobe.com/products/air/

Monday, February 04, 2008

The Barack Obama Call Center


I'm an Obama supporter, but I'm also that guy who wants to put a knife in someone's eye when he receives an unsolicited political call. Especially, ESPECIALLY, when it is an unsolicited unprofessional political call. So, now.... ... I'm really not sure what to say about this. Introducing, the Barack Obama call center! They are inviting me and you and any other would-be supporter to go ahead and start calling to voice our support. Who would you be calling? Your friends? Oh no, they will supply you with scripts to read to the complete strangers whose names and numbers are being provided! ... Great ...

Sunday, February 03, 2008

PowerDNS / PostgreSQL & Web Interfaces 2

After a bit of eat and drink, as well as a half hour of zOMG why is this not werking!?!?! (iptables), Supermaster/Superslave is operating famously. It seems to "just work". No complaints thus far, which is, well... highly unusual for me to put it lightly.

Feb 03 05:35:55 Received NOTIFY for flixn.com from 72.232.239.130 for which we are not authoritative
Feb 03 05:35:55 Created new slave zone 'flixn.com' from supermaster 72.232.239.130, queued axfr
Feb 03 05:35:55 gpgsql Connection succesful
Feb 03 05:35:55 No serial for 'flixn.com' found - zone is missing?
Feb 03 05:35:55 AXFR started for 'flixn.com', transaction started
Feb 03 05:35:55 AXFR done for 'flixn.com', zone committed

PowerDNS / PostgreSQL & Web Interfaces

http://evilcode.net/sjg/infernal/PowerDNS/SCHEMA/

I have been looking at PowerDNS for a while now, and after regular confirmation that it is in fact performing extremely admirably over at DreamHost I decided that it was time to deploy it.

While PowerDNS is the least braindead DNS server I have ever come across, there were a couple of things that I was not 100% happy with, at least in terms of coupling it to a web frontend.


  • SOA records are stored space-delimited. This would hardly be a problem except that our serial is stored here. In its defense, PowerDNS has an alternate method of handling serials that is probably better in most circumstances. Hardly, but we would still have to break it apart and put it back together again to edit the minimum (default in practice) TTL, etc.

  • Record types are stored textually. Even when implemented as an enumerated value this still violates DRY, as you must re-state these values in your frontend code.

  • Everything must be represented fully qualified. This = FAIL from a normalization perspective.



Here I have come up with a somewhat optimal schema from the point of view of my web interface, and I have tied it to PowerDNS's preferred table structure via domain logic. This could have been handled in other ways of course, but I tend to like this one for a number of reasons.


  • First, the alternative is to add custom queries to the PowerDNS configuration file to make it understand whatever schema we might have in place, PowerDNS actually makes this very easy.

  • Another alternative would be to use dynamic (normal) views.



On to the benefits, some being quite minor.


  • Querying against serialized views will have performance benefits versus the above two options, this of course has to be weighed against the cost of maintaining the views.

  • As mentioned, PowerDNS has two methods of handling serials, either in the SOA record, which we are keeping up to date with our domain logic. Alternatively PowerDNS will scan each record for you to find the most recently updated (if you maintain change_date). The former should logically be more performant, so we have implemented that option. This could have been handled either way in the domain logic, but most importantly we aren't relying on our web frontend to keep our serials up to date.

  • Most importantly, namely for debuggability, data on master's and slave's "looks the same".



To get you rolling your PowerDNS configuration file need not be any more complicated than this:


launch=gpgsql
gpgsql-host=hostname
gpgsql-user=powerdns
gpgsql-password=password
gpgsql-dbname=pdnstest
daemon=yes


I haven't tried slaving yet, but I suspect it will work without a hitch. Will update here when I do and when this rolls out.

David Jaffe on Flixn

David Jaffe, a video game designer responsible for directing the Twisted Metal series and God of War has been video blogging with Flixn lately. His regular updates have been keeping some of us in the office rather amused, especially his latest video. I have included two links below, the first for proper context.

http://blog.wired.com/games/2008/01/interview-david.html
http://blog.wired.com/games/2008/02/video-jaffe-res.html

All told about 20,000 (rough, I am far too lazy to database dive and pull 100% accurate numbers, but that's pretty darn close) have actually watched David's videos since he started blogging with Flixn, not too shabby. (Just to clarify for the stat's nazi's, watched in this context means people who hit the play button. Not some other definition, which would potential put the number of views at some number of hundreds of thousands.)

Perhaps surprisingly considering the potentially venomous nature (very humorous, really) of the video above, it's number of views isn't growing nearly as fast as David's Uncharted review. See it here: http://flixn.com/play/q8dhyr/.

For those who want to check out David's blog you can see it here: http://criminalcrackdown.blogspot.com/.