At Songbird we have a server set up to receive crash reports from our users. It's the same system Mozilla uses, written largely by Google employees and it's called socorro. It's great having that data and there is a web app that you can run that will display the data, the stack frames, charts and other goodies. You can do some simple searches and see the top crashers over a certain period of time.
There is a lot of data there though, and to make really good use of it you need some automation. So I'm working on setting up some automatic queries to run each night via a crontab that will pull topcrash data and deposit the results in a file somewhere in such a manner that I can create a csv file and create a nifty chart for it.
The first step has been figuring out how to run a postgres query command in a crontab. It's taken some time but I've finally figured it out. I should make a little tutorial section somewhere like I did for extensions but I'm so busy I doubt I'll get to that. So here's a list and some links (I assume an already setup postgres socorro database with an additional user: crashreports_user)
- allow the crashreports_user to log in with a password. I didn't actually create the user, but I believe it was created something like this: http://www.ubuntugeek.com/howto-setup-database-server-with-postgresql-and-pgadmin3.html
- set up the permissions on the postgres server to allow a user to connect that *doesn't* exist as a system account (can't log into the machine): http://solyaris.wordpress.com/2008/08/09/setup-postgres-in-ubuntu/ (I also looked at the comments in the pg_hba.conf and pg_ident.conf files)
- the kicker was to set up my account on the machine with the password for the crashreports_user in a .pgpass file, like so: http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html
After those steps I was able to run a psql command from the command line as the crashreporst_user and not get prompted for the password. Next step is to work on the proper sql query statement to return exactly the data I need.
I've been making some slow progress on the bugzilla webservice. Last week I actually found a couple of hours at work and time on the train and was able to get a functioning XMLHttpRequest based service running. I was actually building the requests by hand initially but remembered that Prototype has an Ajax class and switched the code over. It is making the code much sleeker and easier to read and maintain so far.
Part of the difficulty was my desire to understand the python SimpleXMLRPCService and to actually implement both XMLRPC over HTTP POST and a JSON implementation using HTTP GET. I have a server that is capable of handling both type of requests but like the JSON approach better so will probably trim down the server to reject anything but that.
The next hurdle is to start defining the actual interfaces I need. I have a basic idea of the functionality I want, and some wireframes scratched out on a legal pad, but I want to set down and really think through the API and the requirements. Mainly as an exercise in project mgmt.
After that it will be figure out the python connection to the db and how to run queries. That will include creating the webservice's object model and data storage mechanism (another db?).
ps - I put things in categories but they are so limited, I think I'll try adding tags and see if I like that better.
For a long time I've wanted to put together a web service to host on my site. I always had modest goals in mind; start with a service to spit out movie lines, favorite lyrics, or quotes. I never got around to implementing them though, even when I was working on WSDL support at Netscape or flat-out investigating web services for opportunities there. I even put together some tools to auto-generate all the files and configuration you need for a Java based web service. (man what a pain!).
Today I finally got an XML-RPC service running for the first time, in Python. I've been playing around with it on the train to and from work, off and on, for a week or two. Today I finally had a chunk of solid time to dig and figure out my problem. (as it turns out, it was the lack of an actual procedure call -duh). While doing it I got to play around with the SimpleXMLRPCServer and BaseHTTPServer (because I thought I had to do something really tricky, which I didn't). In the end I got my little helloworld web service written and functioning. I'll post the code and maybe even host it on jgaunt.com for fun.
Part of what may have kicked me into gear to get this finally written was the end goal. This time around it's not just a silly web service. I have in mind a pretty complicated integration with bugzilla to allow me to do more tracking of the Songbird eng team. We have an agile shop going and as lead I need to keep a close eye on the bugs and having a tool that is written with that in mind should really help (versus the standard bugzilla query-based interface).
In other Songbird news I'm having a really good discussion with a couple of Mozilla engineers (:bs and :rstrong) over in bmo bug 472606 about appname and distributionId and the effect of changing how those pieces fit in to the application puzzle. I have an idea of what I think would work for Songbird, but I don't think Mozilla has the same requirements for customization (or end goals), so I may have to adjust my vision of what an ideal solution will be, hopefully we can hash our way into a solution that works for both parties and is backward compatible with what they need (we don't have anything to be backward compatible with!).
I'm working on writing more posts and making them of some interest and hopefully some insight. To that end I'm using the draft section of my blog software to actually draft my ideas and work on them over time. An additional goal is to improve my writing skills which have gone seriously downhill since college. Instead of just firing up some jumbled series of thoughts I want to put some actual thought into each post, like a little mini essay.
Right now I have a draft about the information organization system I'm using at work and have another draft, in a text file, about some of the issues faced by companies that build their software on the XULRunner platform. It's not a bitch session but thoughts about the kinds of hurdles we face and how we can get over them. In the future I expect there will be more writings on Songbird, Mozilla and being in the open source software business as well as the digital media business. I'm also very interested in the productivity things going on lately and have 43folders on my feed, so I'm sure there will be more about that. (interestingly merlin has re-focused his site a bit and I really dig the new direction he's heading).
I know it's been out for a little while now, but I just tried the streaming service on Netflix tonight. It was pretty great. I have to hold out a little because my dsl at home is terrible and I was on their lowest of three levels for connectivity. So my picture wasn't that great and after 30 minutes or so I had to wait another 5 for the rest of the show to download, but still it was not bad.
I caught the first episode of Heroes in case you're wondering. I came late to the party and started watching shortly into the second season during the "Save the cheerleader, save the world" plot line. Which, by the way, was genius. That tagline was enough to finally get me to tune in. Now I'm starting back at the beginning to see what I missed while I wait for the writers strike to end and new episodes to start up again.
And while on the subject, the studios need to pull their heads out of their collective butts and give the writers their additional % for dvd sales and their internet residuals. Lamers.