|
Powered by
|
|
Section: All | News & Politics | Geek Stuff | Devel | Non-existent Life | Random | Food! | Life |
Fri, March 25, 2005
interview
I had a job interview with Mark Fletcher for a position at Bloglines today. This is just a follow up to some of his questions (obviously, for my own sake). Show Rest of Post
Here are some of the questions he asked, and what my response would be after having had time to think about it...
Q. Why is Blogmatcher's index rebuilt every time?
A. Mostly because it was easier that way. The index is stored in the search backend's memory, and since the backend is a multiprocess unix daemon, having an updatable index would've required shared memory and all sorts of concurrency headaches (too much for a "weekend project"). As it is, the read-only index is stored in the process's memory, and since Linux does efficient forks with shared memory pages, it's quite efficient. Clearly, this is not an optimal solution, or even a good one, but it was "good enough".
Q. Describe IlohaBlog's authentication scheme
A. A user logs in with a user ID and password. The password is checked against a hash in the database, and if it matches, a session ID is placed as a cookie. From then on, the session ID is used to authenticate.
IlohaMail's session management system is more interesting because it allows for multiple sessions in a single browser. Basically, the session ID is passed around as a GET/POST variable, and an additional session key is stored as a cookie. The session authentication mechanism uses the session ID to figure out the name of the cookie, under which the session key is stored. The session key is then used to decrypt the user's encrypted mail user ID and password.
Q. Thoughts on PHP?
A. PHP is often looked down upon as being inferior to Perl, Python, and most other languages for various reasons, but personally, I like PHP because it allows me create web-based apps that run on a wide range of systems, easily and quickly. At the end, users don't care what your web-app is written in as long as it's got the features and is reasonably responsive. The one downside with PHP is that, because of it's 3rd-class citizen status, it doesn't always get good support for the latest technologies (e.g. XML support was lagging). As for alternatives, I find Perl hard to read and maintain, and even though I love Python, writing and installing web-apps isn't quite as easy as in PHP. Looking forward, I'm interested in looking more into Zope and Ruby on Rails.
Q. Thoughts on MySQL?
A. I've also worked with Postgres, MS SQL Server, and a little bit with Oracle. The main draws for MySQL are that it's widely used/supported, fast, and free. I do miss some of the features other databases have (like views, operations like INTERSECT, transactions), although it appears that'll be changing soon. Scalability appears to be an issue for very large sites, although there are ways to work around this problem.
Q. Why did you use a database for IlohaBlog?
A. Probably because it was just easier that way. The only alternative I can think of would have been to store in flat files. But since the backend and web front-end were assumed to be separated, that would've required some way for the front-end to talk to the backend. With flat files, what are the options? NFS is clearly not a reliable option, and using something like a NAS would've been much more expensive than a couple of linux machines running MySQL.
| |
Posted Sun, September 11, 2005 23:29 by world party poker@216.56.240.7
From: http://www.ihomebroker.com/party-poker.html
[moderate]