Upload
zendcon
View
1.944
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Talk by Wil Sinclair of Zend at ZendCon 2009
Citation preview
PHP and Platform Independence in the Cloud
By Wil Sinclair – Cloud Zealot
2
What is the Cloud?And why can’t we all move on to the next big thing already?
3
One Definition
4
Another Definition
From http://www.burtongroup.com
5
Yet Another Definition
6
My Definition
Cloud:Tools::Internet:Content
7
The Cloud is all around us.On your iPhone. Under your Facebook apps. All up in your twitter account.
8
The Cloud is the future.But, then again, you could say that about almost anything if you make its definition broad enough.
9
Select Benefits
Elasticity
Scalability
High Availability
Resilience
Location Independence
Development Best Practices
Security
10
CAPexOPex
Big Win for Startups
11
But it sounds too good to be true.
12
Making the most of it.
13
Secret Sauce
Don’t just deploy your applications on the cloud, write them for the cloud.
14
Secret Sauce, cntd.
Use best-fit cloud application services.
15
Cloud Application Services
S3
Azure Blob Storage
Rackspace Cloud Files
Unstructured Storage
16
Cloud Application Services
SimpleDB
Azure Table Storage
Quickbase
Google Datastore
Document Storage
17
Cloud Application Services
SQS
Azure Queue Storage
OnlineMQ
Simple Queues
18
Future Cloud Application Services
Authentication and Authorization
Session Management
Messaging
Scheduler
Search
Spam/Virus Detection
Analytics
And on. . .
And on. . .
19
Applications written for the cloud are. . .
More Performant
More Scalable
Better Designed
More Secure
Less Expensive
20
. . .assuming you chose the right cloud provider.
21
Now You’re ScrewedEvery API is different! I’m locked in! My cloud provider is bending me over! The sky is falling!
22
Or are you?After all, there’s lots of commonality across cloud application services.
23
Yes, you are.All that commonality is hidden behind uninteresting differences.
24
Porting an AWS Application to Azure
Change your signature algorithm
‘buckets’ are now ‘containers’
‘objects’ are now ‘blobs’
SQS RESTish query API needs to be changed to the RESTful Azure Queue Storage API
SimpleDB to Azure Table Storage? Good luck with that.
25
Moving Your Applications is HardAnd not for interesting reasons. :-/
26
Let's Open Up a Can of Standards on these APIs!
27
Let's Open Up a Can of Standards on these APIs!
28
Ummm. . .
29
Let’s not.
30
Open Source to the RescueIs there anything it can’t do?
31
Standards vs Open Source Bring a lot of minds
together to think about a problem
Intelligent design
Can stifle innovation
Sloooooooooooow
Can be abortive
Unenforceable
Brings a lot more minds together to think about a problem
Survival of the smartest
Encourages innovation
Slow
Can be abortive
Unenforceable
32
The PHPilosophy
We can't change the server-side APIs, but we can change the client-side libraries.
Start with Something You Can Change
33
The PHPilosophy
Build on What's Already There
34
The PHPilosophy
Wave the magic wand of abstraction. . .
35
The PHPilosophy
Until You Have Something That's Useful
36
The PHPilosophy
Don’t Forget to Share
http://framework.zend.com
37
The PHPilosophy
Repeat until you have something that's taken on a life of its own.
38
You knew it was coming. . .
39
40
Respect Due
41
Storage Serviceinterface Zend_Cloud_StorageService{ public function fetchItem($path, $options = null); public function storeItem($data, $destinationPath, $options = null); public function deleteItem($path, $options = null); public function copyItem($sourcePath, $destinationPath, $options = null);
public function moveItem($sourcePath, $destinationPath, $options = null); public function fetchMetadata($path, $options = null);
public function storeMetadata($metadata, $destinationPath, $options = null); public function deleteMetadata($path);}
42
Document Serviceinterface Zend_Cloud_DocumentService{ public function createCollection($name, $options = null);
public function deleteCollection($name, $options = null); public function listCollections($options = null); public function listDocuments($options = null);
public function insertDocument($document, $options = null); public function updateDocument($document, $options = null); public function deleteDocument($document, $options = null);
public function query($query, $options = null);}
43
Queue Serviceinterface Zend_Cloud_QueueService{ public function createQueue($name, $options = null);
public function deleteQueue($name, $options = null);
public function listQueues($options = null); public function fetchQueueMetadata($name, $options = null); public function storeQueueMetadata($metadata, $name, $options = null); public function sendMessage($message, $queueName, $options = null); public function recieveMessages($queueName, $max = 1, $options = null); public function deleteMessage($id, $queueName, $options = null); public function peekMessage($id, $queueName, $options = null);}
44
Available today!