Subscribe to RSS Feed

Archive for May, 2007

When Adventurous Coders get Bored

I convinced a friend to try this, hopefully space/time fabric was unaffected.

One more rule for the universe

  • You may not travel faster than the speed of light
  • You may not power on a virtual machine in a virtual machine
Continue Reading »
No Comments
Amazon Simple Storage Service [S3]

What is S3?? Simple Storage Service: Is a web service that allows any developer to gain access to highly scalable, very reliable, inexpensive storage space. Your data is replicated to multiple servers at multiple data centers. How to get started Go to Amazon’s AWS page, then to the S3 page and sign up (check out the other services while you are there) Pricing (From Amazon’s site…) Pricing New Pricing (effective June 1st, 2007) Storage$0.15 per GB-Month of storage used Data Transfer$0.10 per GB – all data uploaded $0.18 per GB – first 10 TB / month data downloaded$0.16 per GB – next 40 TB / month data downloaded$0.13 per GB – data downloaded / month over 50 TB Data transferred between Amazon S3 and Amazon EC2 is free of charge Requests$0.01 per 1,000 PUT or LIST requests$0.01 per 10,000 GET and all other requests** No charge for delete requests Storage and bandwidth size includes all file overhead I looked around the web for similar services (hard to find someone that posts prices), and for 180 gig’s of reduntantly stored data, it was in the $200/month price range. The same 180Gb on S3 would be $27 to store for 30 days $18 to xmit (the entire 180Gb) to S3 In addition to price, with S3, you are in full control of how and when you put and/or get your data. Only pay for what you actually use One of the niceties about S3 (and the other Amz web services) is that you pay just for what you use. Didn’t use that service last month: Pay $0. This allows you to ‘tinker’ all you want for mere pennies Amazon S3 – Objects What is an Object? Object is the term we use in S3 for the ‘thing’ (file/data) you want to store.Once an object is stored in S3, it contains the original data (contents of the file), plus a given amount of meta-data (name/value pairs). You can add your own metadata but some of the standards are ‘Last-Modified‘ and ‘Content-Type‘ A given Object can be from 1byte to 5GBs Amazon S3 – Buckets Why Buckets? Buckets provides a unique namespace for management of objects contained in the bucket Bucket namespaces are Global across all of S3 (all users of S3. Similar concept as ‘domain names‘) An S3 account is allowed 100 buckets Amazon S3 – Keys Key A key is the unique identifier for an object within a bucket Locating an object Any Object can be located by its Host: s3.amazonaws.com # get object response HTTP/1.1 200 OKx-amz-id-2: FbGpiykb9oJEdJd0bcfwkL6S3lc06X0y7XSeA/GWyRdvlNEZ0irthljxKoeGFfB6x-amz-request-id: 9298531013923634Date: Wed, 08 Mar 2006 04:06:18 GMTLast-Modified: Wed, 08 Mar 2006 04:06:16 GMTETag: “54b0c58c7ce9f2a8b551351102ee0938″x-amz-meta-title: my titleContent-Type: text/plainContent-Length: 14Connection: keep-aliveServer: AmazonS3 this is a test S3 – The PHP way Implementing an API to S3 with PHP Prerequisites You’ll need the PEAR libraries Crypt_HMAC & HTTP_Request (at least things are much easier if you have these) # sudo pear install Crypt_HMACpear.php.net” to updatedownloading Crypt_HMAC-1.0.1.tgz …Starting to download Crypt_HMAC-1.0.1.tgz (2,149 bytes)….done: 2,149 bytesinstall ok: channel://pear.php.net/Crypt_HMAC-1.0.1 sam$ sudo pear install HTTP_Requestpear.php.net” to updatedownloading HTTP_Request-1.4.0.tgz …Starting to download HTTP_Request-1.4.0.tgz (15,262 bytes)…..done: 15,262 bytesdownloading Net_URL-1.0.14.tgz …Starting to download Net_URL-1.0.14.tgz (5,173 bytes)…done: 5,173 bytesdownloading Net_Socket-1.0.7.tgz …Starting to download Net_Socket-1.0.7.tgz (5,419 bytes)…done: 5,419 bytesinstall ok: channel://pear.php.net/Net_URL-1.0.14install ok: channel://pear.php.net/Net_Socket-1.0.7install ok: channel://pear.php.net/HTTP_Request-1.4.0 Creating the API At this point all you really need to do is create a function for each needed interaction with S3 (or better yet, a PHP Object with a method for each). So something like… createBucket() putObject() getObject() getBucketListing() … These functions are going to be creating http requests and reading http responses. Sometimes this can be a bit tricky (one missing ‘\n’ and you’re screwed), so leverage what what other have done befor you. The Amazon web services site has some good examples but in particular, I would recommend you look at ‘Test Utility for Amazon S3 in PHP‘ which does a good job of demo’ing most of the S3 functionality using PHP.I used this code as a starting point to develop a very simple ‘Rsync’ type application for Amazon S3. Resources

Continue Reading »
No Comments

I went to the last organizing meeting for this. It looks to be quite a bit of fun. Don’t forget to remind all of your techie friends that BarCamp iscoming to Portland on May 11-12! We will also be kicking off theregular DemoCamp event series during BarCamp to highlight tech startupactivity in the Portland area. How can you help promote BarCamp Portland?- email your friends (you may find the text below helpful)- add a button to your blog http://barcamp.org/BarcampPortlandChiclet- hand out some flyers at local events http://barcamp.org/BarCampPortlandFlyers More about the event for use in emails, etc … Tech + Geek + Culture. The event for the Portland tech community,produced BY the Portland tech community. What is BarCamp? It is an ad-hoc gathering born from the desire forpeople to share and learn in an open environment. It is an intenseevent with discussions, demos, and interaction from participants. BarCamp is a FREE event and the content is determined by theattendees. The event will be hosted at CubeSpace, which has a numberof conference rooms for breakout sessions, a large main meeting area,wireless access, easy access to public transportation, bike storage,and ample parking. We need your help to make BarCamp Portland a fantastic event for thetech community in Portland. Here’s what you can do… 1) Forward this email on to people in the Portland area that may havean interest in attending. As we have done little marketing of theevent (so far), assume that your local tech social network doesn’tknow about it yet. 2) If you have not already added yourself to the BarCamp Portland wikipage as an attendee, please do so. This will help us get a more accurate attendance count and plan accordingly (you want food,right?): http://barcamp.org/BarCampPortland 3) Add a session idea for the event. This could be a talk, a demo, aroundtable discussion – whatever! Please add it to the ProposedSessions section on the wiki page: http://barcamp.org/BarCampPortland 4) Attend the BarCamp Portland Meetup this Thursday (04/26/07) evening5:30-8pm at Jive Software downtown. Free beer on tap (thanks, Jive!),the opportunity to network with the tech community in Portland, andhelp plan for BarCamp Portland. More details: http://barcamp.org/BarCampPortlandMeetups

Continue Reading »
No Comments