44
PHP and Platform Independence in the Cloud By Wil Sinclair – Cloud Zealot

PHP and Platform Independance in the Cloud

  • Upload
    zendcon

  • View
    1.944

  • Download
    0

Embed Size (px)

DESCRIPTION

Talk by Wil Sinclair of Zend at ZendCon 2009

Citation preview

Page 1: PHP and Platform Independance in the Cloud

PHP and Platform Independence in the Cloud

By Wil Sinclair – Cloud Zealot

Page 2: PHP and Platform Independance in the Cloud

2

What is the Cloud?And why can’t we all move on to the next big thing already?

Page 3: PHP and Platform Independance in the Cloud

3

One Definition

Page 4: PHP and Platform Independance in the Cloud

4

Another Definition

From http://www.burtongroup.com

Page 5: PHP and Platform Independance in the Cloud

5

Yet Another Definition

Page 6: PHP and Platform Independance in the Cloud

6

My Definition

Cloud:Tools::Internet:Content

Page 7: PHP and Platform Independance in the Cloud

7

The Cloud is all around us.On your iPhone. Under your Facebook apps. All up in your twitter account.

Page 8: PHP and Platform Independance in the Cloud

8

The Cloud is the future.But, then again, you could say that about almost anything if you make its definition broad enough.

Page 9: PHP and Platform Independance in the Cloud

9

Select Benefits

Elasticity

Scalability

High Availability

Resilience

Location Independence

Development Best Practices

Security

Page 10: PHP and Platform Independance in the Cloud

10

CAPexOPex

Big Win for Startups

Page 11: PHP and Platform Independance in the Cloud

11

But it sounds too good to be true.

Page 12: PHP and Platform Independance in the Cloud

12

Making the most of it.

Page 13: PHP and Platform Independance in the Cloud

13

Secret Sauce

Don’t just deploy your applications on the cloud, write them for the cloud.

Page 14: PHP and Platform Independance in the Cloud

14

Secret Sauce, cntd.

Use best-fit cloud application services.

Page 15: PHP and Platform Independance in the Cloud

15

Cloud Application Services

S3

Azure Blob Storage

Rackspace Cloud Files

Unstructured Storage

Page 16: PHP and Platform Independance in the Cloud

16

Cloud Application Services

SimpleDB

Azure Table Storage

Quickbase

Google Datastore

Document Storage

Page 17: PHP and Platform Independance in the Cloud

17

Cloud Application Services

SQS

Azure Queue Storage

OnlineMQ

Simple Queues

Page 18: PHP and Platform Independance in the Cloud

18

Future Cloud Application Services

Authentication and Authorization

Session Management

Messaging

Scheduler

Search

Spam/Virus Detection

Analytics

And on. . .

And on. . .

Page 19: PHP and Platform Independance in the Cloud

19

Applications written for the cloud are. . .

More Performant

More Scalable

Better Designed

More Secure

Less Expensive

Page 20: PHP and Platform Independance in the Cloud

20

. . .assuming you chose the right cloud provider.

Page 21: PHP and Platform Independance in the Cloud

21

Now You’re ScrewedEvery API is different! I’m locked in! My cloud provider is bending me over! The sky is falling!

Page 22: PHP and Platform Independance in the Cloud

22

Or are you?After all, there’s lots of commonality across cloud application services.

Page 23: PHP and Platform Independance in the Cloud

23

Yes, you are.All that commonality is hidden behind uninteresting differences.

Page 24: PHP and Platform Independance in the Cloud

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.

Page 25: PHP and Platform Independance in the Cloud

25

Moving Your Applications is HardAnd not for interesting reasons. :-/

Page 26: PHP and Platform Independance in the Cloud

26

Let's Open Up a Can of Standards on these APIs!

Page 27: PHP and Platform Independance in the Cloud

27

Let's Open Up a Can of Standards on these APIs!

Page 28: PHP and Platform Independance in the Cloud

28

Ummm. . .

Page 29: PHP and Platform Independance in the Cloud

29

Let’s not.

Page 30: PHP and Platform Independance in the Cloud

30

Open Source to the RescueIs there anything it can’t do?

Page 31: PHP and Platform Independance in the Cloud

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

Page 32: PHP and Platform Independance in the Cloud

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

Page 33: PHP and Platform Independance in the Cloud

33

The PHPilosophy

Build on What's Already There

Page 34: PHP and Platform Independance in the Cloud

34

The PHPilosophy

Wave the magic wand of abstraction. . .

Page 35: PHP and Platform Independance in the Cloud

35

The PHPilosophy

Until You Have Something That's Useful

Page 36: PHP and Platform Independance in the Cloud

36

The PHPilosophy

Don’t Forget to Share

http://framework.zend.com

Page 37: PHP and Platform Independance in the Cloud

37

The PHPilosophy

Repeat until you have something that's taken on a life of its own.

Page 38: PHP and Platform Independance in the Cloud

38

You knew it was coming. . .

Page 39: PHP and Platform Independance in the Cloud

39

Page 40: PHP and Platform Independance in the Cloud

40

Respect Due

Page 41: PHP and Platform Independance in the Cloud

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);}

Page 42: PHP and Platform Independance in the Cloud

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);}

Page 43: PHP and Platform Independance in the Cloud

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);}

Page 44: PHP and Platform Independance in the Cloud

44

Available today!