How would you implement something like twitter/facebook?
nategraves: You may want to look into some PHP frameworks like CodeIgniter or Zend (if that's your language of choice).  For your API, you could start with a simpler REST API that allows users to make requests through URLs and get back their data as XML.  Finally, you could do some distributing by using a service like mosso.com.  Mosso offers both cloud hosting and cloud servers that would allow your site to scale pretty easily when you start getting a ton of traffic :)