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.
Oy. Had a power supply go bad a couple days ago. Had to do emergency transplant today to get my machine up and running again. I've been working on Linux alot lately and have been really enjoying but I'm still pretty tied to my Windows box. I have been using CVS for alot of my documents, particularly the text ones, and I like it. I need to start using the same apps across platforms so I can use a CVS repository to store (and have backups of) my documents and then I'll be able to edit the latest versions no matter what OS I'm on. Time to fire up OpenOffice on Linux (strange that I use in on Win but not on linux)
I find it funny and frustrating at the same time that this "new" technology that is making such a buzz these days (AJAX) is technology that has been around for years. We were working with XMLHTTPRequest stuff in mozilla more than 2 years ago. The problem seems to be we didn't have any really great applications that used it. Now Google uses it for some web apps and now there's a book coming out on it: ( at amazon) Crap, I guess there are 3 books out or coming out on it. This is a technology I think is great and I for one am going to make sure I'm up on it.
Oh, and if you want to read some online articles about the technology developer.mozilla.org has a whole section on it.