Cloudify your applications with Amazon Web Services

Federico Feroldi
Federico FeroldiDigital Transformation leadership & CTO
Cloudify your applications with Amazon Web Services
              Federico Feroldi, Cloudify




 phpDay 2009 - May 15, 16 2009 - Verona, Italy
       http://grusp.it - http://phpday.it - http://joind.in/event/view/34
Before we start




          Feel free to ask questions!


                                 phpDay 2009 - May 15, 16 2009 - Verona, Italy
About me


 “I’m a technologist, I like to
 find simple solutions to
 solve hard challenges”
             Federico Feroldi




                                  phpDay 2009 - May 15, 16 2009 - Verona, Italy
About me: the beginning


   First BASIC program at
   7 years old on my
   Commodore 64




                            phpDay 2009 - May 15, 16 2009 - Verona, Italy
About me: coding for fun


   Had fun during late 90s
   DemoScene coding
   realtime GFX in C and
   i386 assembly




                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
About me: work experience


   Working in the Internet
   industry since 1996 for
   many small and big
   companies




                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
About me: thinking big

   6 years in Yahoo!
   Member of the intl
   MyYahoo team during
   the rewriting project,
   from C++/Perl to PHP
   + C++ extensions




                            phpDay 2009 - May 15, 16 2009 - Verona, Italy
About me: the future


  Founded Cloudify in
  January 2009, helping
  customers unleash the
  power of cloud computing
  technologies

  http://cloudify.me


                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Agenda




         phpDay 2009 - May 15, 16 2009 - Verona, Italy
Agenda


   •   The cloud advantage




                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Agenda


   •   The cloud advantage
   •   Overview of Amazon Web Services




                                phpDay 2009 - May 15, 16 2009 - Verona, Italy
Agenda


   •   The cloud advantage
   •   Overview of Amazon Web Services
   •   Amazon Web Services and PHP




                                phpDay 2009 - May 15, 16 2009 - Verona, Italy
Agenda


   •   The cloud advantage
   •   Overview of Amazon Web Services
   •   Amazon Web Services and PHP
   •   Examples




                                phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: a definition




                         phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: a definition
  NIST Working Definition of Cloud Computing




                              phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: a definition
  NIST Working Definition of Cloud Computing

   “Cloud computing is a pay-per-use model for
   enabling available, convenient, on-demand network
   access to a shared pool of configurable computing
   resources (e.g., networks, servers, storage,
   applications, services) that can be rapidly provisioned
   and released with minimal management effort or
   service provider interaction.”
                                  http://tinyurl.com/qjfonl




                                         phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: a definition
  NIST Working Definition of Cloud Computing

   “Cloud computing is a pay-per-use model for
   enabling available, convenient, on-demand network
   access to a shared pool of configurable computing
   resources (e.g., networks, servers, storage,
   applications, services) that can be rapidly provisioned
   and released with minimal management effort or
   service provider interaction.”
                                  http://tinyurl.com/qjfonl




                                         phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: optimize resource usage
                   100


                    75
   Systems usage




                         Idle
                    50


                    25

                                Active
                     0
                                 Time




                                         phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: optimize resource usage

                    100
                                  Cloud
                     75
    Systems usage




                     50
                          Idle
                     25
                                 Active
                      0
                                  Time




                                          phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud: you can scale FAST!

   Animoto server                   > 3500
   instances grew from
   less than 80 to more
   than 3500 in 3 days
   after launch of
   Facebook application      < 80

                          http://tinyurl.com/6fa7qo



                               phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud advantage



             cloud platform




                              phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud advantage
               Technology



             cloud platform




                              phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud advantage
               Technology



             cloud platform                    Speed




                              phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud advantage
               Technology



             cloud platform                    Speed



               Flexibility



                              phpDay 2009 - May 15, 16 2009 - Verona, Italy
The cloud advantage
               Technology



    Cost     cloud platform                    Speed



               Flexibility



                              phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services




                      phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: overview




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: overview




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: overview



        More than 540,000 developers




                               phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2




                   S3



                        phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2




                   S3



                        phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2




                   S3



                        phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                SimpleDB




                   S3



                        phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                SimpleDB




                   S3



                        phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                     SimpleDB

                       SQS


                   S3



                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                     SimpleDB

                       SQS


                   S3               EC2



                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                     SimpleDB

                       SQS


    CloudFront     S3               EC2



                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                     SimpleDB

                       SQS


    CloudFront     S3               EC2



                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: components
                 EC2


                                     SimpleDB

                       SQS


    CloudFront     S3               EC2



                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
EC2
Amazon Web Services: EC2




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
EC2
Amazon Web Services: EC2

    •   Create or destroy instances in minutes




                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
EC2
Amazon Web Services: EC2

    •   Create or destroy instances in minutes
    •   Many sizes: 1-20 Core(s) , 1.7-15GB RAM




                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
EC2
Amazon Web Services: EC2

    •   Create or destroy instances in minutes
    •   Many sizes: 1-20 Core(s) , 1.7-15GB RAM
    •   You can create custom VM images (AMI)




                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
EC2
Amazon Web Services: EC2

    •   Create or destroy instances in minutes
    •   Many sizes: 1-20 Core(s) , 1.7-15GB RAM
    •   You can create custom VM images (AMI)
    •   Fixed IPs, persistent volumes, snapshots




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
EC2
Amazon Web Services: EC2

    •   Create or destroy instances in minutes
    •   Many sizes: 1-20 Core(s) , 1.7-15GB RAM
    •   You can create custom VM images (AMI)
    •   Fixed IPs, persistent volumes, snapshots
    •   You pay cpu time and data transferred




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: S3                                          S3




                          phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: S3                                                    S3

    •   Create a bucket and put objects inside




                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: S3                                                    S3

    •   Create a bucket and put objects inside
    •   http://s3.amazonaws.com/bucket/object
        or http://xxx.yoursite.com/object




                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: S3                                                    S3

    •   Create a bucket and put objects inside
    •   http://s3.amazonaws.com/bucket/object
        or http://xxx.yoursite.com/object
    •   You can put an infinite number of objects in
        a bucket, objects have 5GB size limit




                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: S3                                                    S3

    •   Create a bucket and put objects inside
    •   http://s3.amazonaws.com/bucket/object
        or http://xxx.yoursite.com/object
    •   You can put an infinite number of objects in
        a bucket, objects have 5GB size limit
    •   You pay storage, data transferred and
        operations



                                    phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SimpleDB
                                               SimpleDB




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SimpleDB
                                                             SimpleDB

    •   Key/Value store (not relational)




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SimpleDB
                                                             SimpleDB

    •   Key/Value store (not relational)
    •   Domains, Items and Attributes




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SimpleDB
                                                             SimpleDB

    •   Key/Value store (not relational)
    •   Domains, Items and Attributes
    •   Very simple query language (no JOINs)




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SimpleDB
                                                             SimpleDB

    •   Key/Value store (not relational)
    •   Domains, Items and Attributes
    •   Very simple query language (no JOINs)
    •   You pay storage, data transferred and
        operations




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SQS
                                               SQS




                       phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SQS
                                                           SQS



    •   Implements message queing service




                                   phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SQS
                                                           SQS



    •   Implements message queing service
    •   Useful to build asyncronous workers and
        offload web servers




                                   phpDay 2009 - May 15, 16 2009 - Verona, Italy
Amazon Web Services: SQS
                                                           SQS



    •   Implements message queing service
    •   Useful to build asyncronous workers and
        offload web servers
    •   You pay messages and data transferred




                                   phpDay 2009 - May 15, 16 2009 - Verona, Italy
AWS and PHP



   How do I build my PHP application on AWS?




                                phpDay 2009 - May 15, 16 2009 - Verona, Italy
AWS and PHP: Amazon libraries




                        phpDay 2009 - May 15, 16 2009 - Verona, Italy
AWS and PHP: Amazon libraries

     Amazon “official” PHP libraries

      ✓ support all services
      ✓ many tutorials available
      - verbose and often incostintent syntax
      - not very well documented

                                      phpDay 2009 - May 15, 16 2009 - Verona, Italy
AWS and PHP: Tarzan AWS


     ✓ full AWS support (S3, EC2, SQS,
       SimpleDB, CloudFront)

     ✓ clean, consistent API
     ✓ well documented
                               http://tarzan-aws.com/



                                   phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');
                                          Include Tarzan
                                            core class
 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php
                           Create AmazonS3
                                 object
 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

                   Create a new bucket that
 require_once('tarzan.class.php');
                     will contain the file
 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');

               Upload a local file to S3
 $s3 = new AmazonS3();
                 and make it public
 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Upload a file to S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU);

 $file_url = $s3->store_remote_file(
     'file://local.jpg',
     'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC)
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Get a file from S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $file = $s3->get_object('tarzan.test', 'remote.jpg');

 header('Content-type:' . $file->headers['content-type']);
 echo $file->body;

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Get a file from S3
 <?php

                     Get a handler to a
 require_once('tarzan.class.php');
                        remote file
 $s3 = new AmazonS3();

 $file = $s3->get_object('tarzan.test', 'remote.jpg');

 header('Content-type:' . $file->headers['content-type']);
 echo $file->body;

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Get a file from S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $file = $s3->get_object('tarzan.test', 'remote.jpg');

 header('Content-type:' . $file->headers['content-type']);
 echo $file->body;

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Get a file from S3
 <?php

 require_once('tarzan.class.php');
                    Output the file
 $s3 = new   AmazonS3();
                content to the client
 $file = $s3->get_object('tarzan.test', 'remote.jpg');

 header('Content-type:' . $file->headers['content-type']);
 echo $file->body;

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Get a file from S3
 <?php

 require_once('tarzan.class.php');

 $s3 = new AmazonS3();

 $file = $s3->get_object('tarzan.test', 'remote.jpg');

 header('Content-type:' . $file->headers['content-type']);
 echo $file->body;

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php

 require_once('tarzan.class.php');
 $ec2 = new AmazonEC2();

 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php
                                      Include Tarzan class and
 require_once('tarzan.class.php');
                                     create AmazonEC2 object
 $ec2 = new AmazonEC2();

 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php

 require_once('tarzan.class.php');
 $ec2 = new AmazonEC2();

 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php
                 Create an EC2 instance of an
                Ubuntu 8.04 LTS Hardy Server
 require_once('tarzan.class.php');
 $ec2 = new AmazonEC2();

 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php

 require_once('tarzan.class.php');
 $ec2 = new AmazonEC2();

 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php

 require_once('tarzan.class.php');
 $ec2 = new AmazonEC2();
        Allocate an Elastic IP (fixed public IP) and
          associate it with the instance created
 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Run an EC2 instance
 <?php

 require_once('tarzan.class.php');
 $ec2 = new AmazonEC2();

 $run = $ec2->run_instances('ef48af86', 1, 1);
 $instance_id = $run->body->instancesSet->item->instanceId;

 $allocate = $ec2->allocate_address();
 $ip_addr = $allocate->body->publicIp;
 $associate = $ec2->associate_address($instance_id, $ip_addr);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);

 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id
 ));

 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);
                                         Disassociate and
 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id    release the Elastic IP
 ));

 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);

 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id
 ));

 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);

 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id     Reboot the instance
 ));

 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);

 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id
 ));

 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);

 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id
 ));
                                       Shutdown the instance
 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Manage an EC2 instance
 <?php

 $disassociate = $ec2->disassociate_address($ip_addr);
 $ec2->release_address($ip_addr);

 $ec2->reboot_instances(array(
     'InstanceId.1' => $instance_id
 ));

 $ec2->terminate_instances(array(
     'InstanceId.1' => $instance_id;
 ));

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);
                                       Create a persistent
 $ec2->create_snapshot($volume_id);   volume of 10 GB size
 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);
                              Attach the volume to the
                             running instance as /dev/sdh
 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);
                   Crate a snapshot (backup)
 $ec2->delete_volume($volume_id); volume
                          of the
 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);


                  Unmount the volume
 $ec2->delete_volume($volume_id);

 ?>             from the running instance



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

             Delete the volume
 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Elastic Book Stores
 <?php

 $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;);

 $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;);

 $ec2->create_snapshot($volume_id);

 $ec2->detach_volume($volume_id);

 $ec2->delete_volume($volume_id);

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();

 $domain = $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User',
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
         'fantastic'
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();

 $domain = $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User', Create a domain named
                       “tarzan_test” that will store items
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
         'fantastic'
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();

 $domain = $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User',
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
         'fantastic'
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();        Create an item with
 $domain =                          ID=”testuser”
             $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User',
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
         'fantastic'
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();

 $domain = $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User',
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
         'fantastic'
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();

 $domain = $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User',
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
                          Attributes have a key and
         'fantastic'         one or more values
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, create items
 <?php
 require_once('tarzan.class.php');
 $sdb = new AmazonSDB();

 $domain = $sdb->create_domain('tarzan_test');

 $put = $sdb->put_attributes('tarzan_test', 'testuser', array(
     'name' => 'Test User',
     'email' => 'test.user@gmail.com',
     'password' => 'test',
     'tags' => array(
         'awesome',
         'cool',
         'fantastic'
     )
 ));
 ?>


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));
                                    Get the password for
 $q = $sdb->$query('tarzan_test',    the user “testuser”
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
                                  Get the ID of 50 users
     array( 'MaxNumberOfItems' => 10 ),
                               without any particular order
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php
         Get at most 50 users that have
 $q =    the tags ”cool” and “awesome”
         $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q =
             but not the tag “deleted”
         $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                                phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );
             Fetch all the attributes,
 ?>             not only the IDs


                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: SimpleDB, query items
 <?php

 $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password');

 $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50));

 $q = $sdb->$query('tarzan_test',
     array( 'MaxNumberOfItems' => 10 ),
     quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; .
     quot;intersection not ['tags' = 'deleted']quot;,
     true
 );

 ?>




                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();                  Create the queue
 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

                             Push a message into the queue
 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();


           Remove temporaly a
 $queue = $sqs->create_queue('tarzan_test_queue');

         message from the queue
 $message = $sqs->send_message('This is   my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                               phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');


                       Remove permanently the
 $message = $sqs->send_message('This is my message!');

 $message =
                       message from the queue
              $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

                Destroy the queue
 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
Examples: Simple Queing Service
 <?php
 require_once('tarzan.class.php');

 $sqs = new AmazonSQS();

 $queue = $sqs->create_queue('tarzan_test_queue');

 $message = $sqs->send_message('This is my message!');

 $message = $sqs->receive_message();

 $message = $sqs->delete_message($message_id);

 $queue = $sqs->delete_queue();

 ?>



                                             phpDay 2009 - May 15, 16 2009 - Verona, Italy
What we have learned?

     The cloud is real and it takes less than 5
    minutes to start using it in you applications!

     With Tarzan you can easily integrate the
     powerful Amazon Web Services into you
      application or start build one on them.




                                     phpDay 2009 - May 15, 16 2009 - Verona, Italy
Thank you! Questions?
                               http://cloudify.me

                               info@cloudify.me

                                    @cloudify


      We’re hiring, send your resume to jobs@cloudify.me




                                           phpDay 2009 - May 15, 16 2009 - Verona, Italy
1 of 134

Recommended

Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer by
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferLeveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferJoseph Labrecque
1.1K views45 slides
Secr презентация дружинина by
Secr презентация дружининаSecr презентация дружинина
Secr презентация дружининаLuxoftTraining
423 views32 slides
From Startup to Exit in 18 months by
From Startup to Exit in 18 monthsFrom Startup to Exit in 18 months
From Startup to Exit in 18 monthsFederico Feroldi
1.3K views9 slides
Innovate, optimize and profit with cloud computing by
Innovate, optimize and profit with cloud computingInnovate, optimize and profit with cloud computing
Innovate, optimize and profit with cloud computingFederico Feroldi
521 views32 slides
Design and development of an Online Social Network crawler by
Design and development of an Online Social Network crawlerDesign and development of an Online Social Network crawler
Design and development of an Online Social Network crawlerFederico Feroldi
1.2K views86 slides
Scaling web application in the Cloud by
Scaling web application in the CloudScaling web application in the Cloud
Scaling web application in the CloudFederico Feroldi
2.8K views34 slides

More Related Content

Viewers also liked

コンテナのユースケース考察 by
コンテナのユースケース考察コンテナのユースケース考察
コンテナのユースケース考察Shuji Yamada
3.3K views27 slides
A Blueprint for Scala Microservices by
A Blueprint for Scala MicroservicesA Blueprint for Scala Microservices
A Blueprint for Scala MicroservicesFederico Feroldi
4.1K views46 slides
Programming Amazon Web Services for Beginners (1) by
Programming Amazon Web Services for Beginners (1)Programming Amazon Web Services for Beginners (1)
Programming Amazon Web Services for Beginners (1)Markus Klems
11.2K views34 slides
会社にGitHub Enterpriseを導入してみた話 by
会社にGitHub Enterpriseを導入してみた話会社にGitHub Enterpriseを導入してみた話
会社にGitHub Enterpriseを導入してみた話Shuji Yamada
31.6K views21 slides
Mule esb presentation by
Mule esb presentationMule esb presentation
Mule esb presentationLakshmi Prasanna Mavillapalli
2.6K views43 slides
Implementation in mule esb by
Implementation in mule esbImplementation in mule esb
Implementation in mule esbVamsi Krishna
1.1K views39 slides

Viewers also liked(9)

コンテナのユースケース考察 by Shuji Yamada
コンテナのユースケース考察コンテナのユースケース考察
コンテナのユースケース考察
Shuji Yamada3.3K views
A Blueprint for Scala Microservices by Federico Feroldi
A Blueprint for Scala MicroservicesA Blueprint for Scala Microservices
A Blueprint for Scala Microservices
Federico Feroldi4.1K views
Programming Amazon Web Services for Beginners (1) by Markus Klems
Programming Amazon Web Services for Beginners (1)Programming Amazon Web Services for Beginners (1)
Programming Amazon Web Services for Beginners (1)
Markus Klems11.2K views
会社にGitHub Enterpriseを導入してみた話 by Shuji Yamada
会社にGitHub Enterpriseを導入してみた話会社にGitHub Enterpriseを導入してみた話
会社にGitHub Enterpriseを導入してみた話
Shuji Yamada31.6K views
Implementation in mule esb by Vamsi Krishna
Implementation in mule esbImplementation in mule esb
Implementation in mule esb
Vamsi Krishna1.1K views
2011 Introduction to Cloud Computing and Amazon Web Services by Simone Brunozzi
2011 Introduction to Cloud Computing and Amazon Web Services2011 Introduction to Cloud Computing and Amazon Web Services
2011 Introduction to Cloud Computing and Amazon Web Services
Simone Brunozzi4.9K views
Crawling the web for fun and profit by Federico Feroldi
Crawling the web for fun and profitCrawling the web for fun and profit
Crawling the web for fun and profit
Federico Feroldi8.5K views

Similar to Cloudify your applications with Amazon Web Services

HTML5 and Google Chrome - DevFest09 by
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09mihaiionescu
17K views32 slides
Memi Beltrame Collaborative Design by
Memi Beltrame Collaborative DesignMemi Beltrame Collaborative Design
Memi Beltrame Collaborative DesignGrUSP
299 views48 slides
Made by Many: On Collaborative Design by
Made by Many: On Collaborative DesignMade by Many: On Collaborative Design
Made by Many: On Collaborative DesignMemi Beltrame
2.6K views48 slides
Comparision of CMS : Improving TYPO3 functionality by
Comparision of CMS : Improving TYPO3 functionalityComparision of CMS : Improving TYPO3 functionality
Comparision of CMS : Improving TYPO3 functionalityFedir RYKHTIK
2K views86 slides
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra... by
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...apidays
82 views46 slides
Oracleolapshort by
OracleolapshortOracleolapshort
Oracleolapshortgertjandenooij
150 views5 slides

Similar to Cloudify your applications with Amazon Web Services(20)

HTML5 and Google Chrome - DevFest09 by mihaiionescu
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09
mihaiionescu17K views
Memi Beltrame Collaborative Design by GrUSP
Memi Beltrame Collaborative DesignMemi Beltrame Collaborative Design
Memi Beltrame Collaborative Design
GrUSP299 views
Made by Many: On Collaborative Design by Memi Beltrame
Made by Many: On Collaborative DesignMade by Many: On Collaborative Design
Made by Many: On Collaborative Design
Memi Beltrame2.6K views
Comparision of CMS : Improving TYPO3 functionality by Fedir RYKHTIK
Comparision of CMS : Improving TYPO3 functionalityComparision of CMS : Improving TYPO3 functionality
Comparision of CMS : Improving TYPO3 functionality
Fedir RYKHTIK2K views
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra... by apidays
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
apidays82 views
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305... by Amazon Web Services
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305...
Choosing the right Rich Internet Application technology path by marcocasario
Choosing the right Rich Internet Application technology pathChoosing the right Rich Internet Application technology path
Choosing the right Rich Internet Application technology path
marcocasario5.7K views
The Twitter API: A Presentation to Adobe by Alex Payne
The Twitter API: A Presentation to AdobeThe Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to Adobe
Alex Payne3K views
Why Memcached? by Gear6
Why Memcached?Why Memcached?
Why Memcached?
Gear610.8K views
Single sourcing using Rich Ajax Platform by Ankur Sharma
Single sourcing using Rich Ajax PlatformSingle sourcing using Rich Ajax Platform
Single sourcing using Rich Ajax Platform
Ankur Sharma320 views
Learn how to build decentralized and serverless html5 applications with Embar... by Codemotion
Learn how to build decentralized and serverless html5 applications with Embar...Learn how to build decentralized and serverless html5 applications with Embar...
Learn how to build decentralized and serverless html5 applications with Embar...
Codemotion500 views
Learn how to build decentralized and serverless html5 applications with embar... by Alessandro Confetti
Learn how to build decentralized and serverless html5 applications with embar...Learn how to build decentralized and serverless html5 applications with embar...
Learn how to build decentralized and serverless html5 applications with embar...
API WORLD 2017: Workshop - APIs for Cloud Connectivity and Device Management by Soracom Global, Inc.
API WORLD 2017: Workshop - APIs for Cloud Connectivity and Device Management API WORLD 2017: Workshop - APIs for Cloud Connectivity and Device Management
API WORLD 2017: Workshop - APIs for Cloud Connectivity and Device Management
Oracle Developer Meetup March 2018 by Phil Wilkins
Oracle Developer Meetup March 2018Oracle Developer Meetup March 2018
Oracle Developer Meetup March 2018
Phil Wilkins1.1K views
OpenStack Murano introduction by Victor Zhang
OpenStack Murano introductionOpenStack Murano introduction
OpenStack Murano introduction
Victor Zhang6.3K views

More from Federico Feroldi

Project IO - TS-Conf 2019 by
Project IO - TS-Conf 2019Project IO - TS-Conf 2019
Project IO - TS-Conf 2019Federico Feroldi
436 views43 slides
Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C... by
Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C...Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C...
Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C...Federico Feroldi
494 views33 slides
From 1 to infinity: how to scale your tech organization, build a great cultur... by
From 1 to infinity: how to scale your tech organization, build a great cultur...From 1 to infinity: how to scale your tech organization, build a great cultur...
From 1 to infinity: how to scale your tech organization, build a great cultur...Federico Feroldi
573 views27 slides
the Picmix experiment by
the Picmix experimentthe Picmix experiment
the Picmix experimentFederico Feroldi
769 views15 slides
Cloudify - Scalability On Demand by
Cloudify - Scalability On DemandCloudify - Scalability On Demand
Cloudify - Scalability On DemandFederico Feroldi
1.2K views9 slides
Federico Feroldi Php In Yahoo by
Federico Feroldi Php In YahooFederico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi
1.2K views40 slides

More from Federico Feroldi(6)

Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C... by Federico Feroldi
Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C...Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C...
Una Pubblica Amministrazione Agile, Funzionale e Serverless: si può fare! - C...
Federico Feroldi494 views
From 1 to infinity: how to scale your tech organization, build a great cultur... by Federico Feroldi
From 1 to infinity: how to scale your tech organization, build a great cultur...From 1 to infinity: how to scale your tech organization, build a great cultur...
From 1 to infinity: how to scale your tech organization, build a great cultur...
Federico Feroldi573 views

Recently uploaded

Vertical User Stories by
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 views16 slides
Future of AR - Facebook Presentation by
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentationssuserb54b561
14 views27 slides
Unit 1_Lecture 2_Physical Design of IoT.pdf by
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdfStephenTec
12 views36 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
33 views43 slides
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc
10 views29 slides
20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
41 views73 slides

Recently uploaded(20)

Future of AR - Facebook Presentation by ssuserb54b561
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
ssuserb54b56114 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc10 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views

Cloudify your applications with Amazon Web Services

  • 1. Cloudify your applications with Amazon Web Services Federico Feroldi, Cloudify phpDay 2009 - May 15, 16 2009 - Verona, Italy http://grusp.it - http://phpday.it - http://joind.in/event/view/34
  • 2. Before we start Feel free to ask questions! phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 3. About me “I’m a technologist, I like to find simple solutions to solve hard challenges” Federico Feroldi phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 4. About me: the beginning First BASIC program at 7 years old on my Commodore 64 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 5. About me: coding for fun Had fun during late 90s DemoScene coding realtime GFX in C and i386 assembly phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 6. About me: work experience Working in the Internet industry since 1996 for many small and big companies phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 7. About me: thinking big 6 years in Yahoo! Member of the intl MyYahoo team during the rewriting project, from C++/Perl to PHP + C++ extensions phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 8. About me: the future Founded Cloudify in January 2009, helping customers unleash the power of cloud computing technologies http://cloudify.me phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 9. Agenda phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 10. Agenda • The cloud advantage phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 11. Agenda • The cloud advantage • Overview of Amazon Web Services phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 12. Agenda • The cloud advantage • Overview of Amazon Web Services • Amazon Web Services and PHP phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 13. Agenda • The cloud advantage • Overview of Amazon Web Services • Amazon Web Services and PHP • Examples phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 14. The cloud: a definition phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 15. The cloud: a definition NIST Working Definition of Cloud Computing phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 16. The cloud: a definition NIST Working Definition of Cloud Computing “Cloud computing is a pay-per-use model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.” http://tinyurl.com/qjfonl phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 17. The cloud: a definition NIST Working Definition of Cloud Computing “Cloud computing is a pay-per-use model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.” http://tinyurl.com/qjfonl phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 18. The cloud: optimize resource usage 100 75 Systems usage Idle 50 25 Active 0 Time phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 19. The cloud: optimize resource usage 100 Cloud 75 Systems usage 50 Idle 25 Active 0 Time phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 20. The cloud: you can scale FAST! Animoto server > 3500 instances grew from less than 80 to more than 3500 in 3 days after launch of Facebook application < 80 http://tinyurl.com/6fa7qo phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 21. The cloud advantage cloud platform phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 22. The cloud advantage Technology cloud platform phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 23. The cloud advantage Technology cloud platform Speed phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 24. The cloud advantage Technology cloud platform Speed Flexibility phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 25. The cloud advantage Technology Cost cloud platform Speed Flexibility phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 26. Amazon Web Services phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 27. Amazon Web Services: overview phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 28. Amazon Web Services: overview phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 29. Amazon Web Services: overview More than 540,000 developers phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 30. Amazon Web Services: components phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 31. Amazon Web Services: components EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 32. Amazon Web Services: components EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 33. Amazon Web Services: components EC2 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 34. Amazon Web Services: components EC2 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 35. Amazon Web Services: components EC2 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 36. Amazon Web Services: components EC2 SimpleDB S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 37. Amazon Web Services: components EC2 SimpleDB S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 38. Amazon Web Services: components EC2 SimpleDB SQS S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 39. Amazon Web Services: components EC2 SimpleDB SQS S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 40. Amazon Web Services: components EC2 SimpleDB SQS CloudFront S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 41. Amazon Web Services: components EC2 SimpleDB SQS CloudFront S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 42. Amazon Web Services: components EC2 SimpleDB SQS CloudFront S3 EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 43. EC2 Amazon Web Services: EC2 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 44. EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 45. EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 46. EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM • You can create custom VM images (AMI) phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 47. EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM • You can create custom VM images (AMI) • Fixed IPs, persistent volumes, snapshots phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 48. EC2 Amazon Web Services: EC2 • Create or destroy instances in minutes • Many sizes: 1-20 Core(s) , 1.7-15GB RAM • You can create custom VM images (AMI) • Fixed IPs, persistent volumes, snapshots • You pay cpu time and data transferred phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 49. Amazon Web Services: S3 S3 phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 50. Amazon Web Services: S3 S3 • Create a bucket and put objects inside phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 51. Amazon Web Services: S3 S3 • Create a bucket and put objects inside • http://s3.amazonaws.com/bucket/object or http://xxx.yoursite.com/object phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 52. Amazon Web Services: S3 S3 • Create a bucket and put objects inside • http://s3.amazonaws.com/bucket/object or http://xxx.yoursite.com/object • You can put an infinite number of objects in a bucket, objects have 5GB size limit phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 53. Amazon Web Services: S3 S3 • Create a bucket and put objects inside • http://s3.amazonaws.com/bucket/object or http://xxx.yoursite.com/object • You can put an infinite number of objects in a bucket, objects have 5GB size limit • You pay storage, data transferred and operations phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 54. Amazon Web Services: SimpleDB SimpleDB phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 55. Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 56. Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) • Domains, Items and Attributes phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 57. Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) • Domains, Items and Attributes • Very simple query language (no JOINs) phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 58. Amazon Web Services: SimpleDB SimpleDB • Key/Value store (not relational) • Domains, Items and Attributes • Very simple query language (no JOINs) • You pay storage, data transferred and operations phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 59. Amazon Web Services: SQS SQS phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 60. Amazon Web Services: SQS SQS • Implements message queing service phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 61. Amazon Web Services: SQS SQS • Implements message queing service • Useful to build asyncronous workers and offload web servers phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 62. Amazon Web Services: SQS SQS • Implements message queing service • Useful to build asyncronous workers and offload web servers • You pay messages and data transferred phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 63. AWS and PHP How do I build my PHP application on AWS? phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 64. AWS and PHP: Amazon libraries phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 65. AWS and PHP: Amazon libraries Amazon “official” PHP libraries ✓ support all services ✓ many tutorials available - verbose and often incostintent syntax - not very well documented phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 66. AWS and PHP: Tarzan AWS ✓ full AWS support (S3, EC2, SQS, SimpleDB, CloudFront) ✓ clean, consistent API ✓ well documented http://tarzan-aws.com/ phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 67. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 68. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); Include Tarzan core class $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 69. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 70. Examples: Upload a file to S3 <?php Create AmazonS3 object require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 71. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 72. Examples: Upload a file to S3 <?php Create a new bucket that require_once('tarzan.class.php'); will contain the file $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 73. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 74. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); Upload a local file to S3 $s3 = new AmazonS3(); and make it public $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 75. Examples: Upload a file to S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $bucket = $s3->create_bucket('tarzan.test', S3_LOCATION_EU); $file_url = $s3->store_remote_file( 'file://local.jpg', 'tarzan.test', 'remote.jpg', array( 'acl' => S3_ACL_PUBLIC) ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 76. Examples: Get a file from S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 77. Examples: Get a file from S3 <?php Get a handler to a require_once('tarzan.class.php'); remote file $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 78. Examples: Get a file from S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 79. Examples: Get a file from S3 <?php require_once('tarzan.class.php'); Output the file $s3 = new AmazonS3(); content to the client $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 80. Examples: Get a file from S3 <?php require_once('tarzan.class.php'); $s3 = new AmazonS3(); $file = $s3->get_object('tarzan.test', 'remote.jpg'); header('Content-type:' . $file->headers['content-type']); echo $file->body; ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 81. Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 82. Examples: Run an EC2 instance <?php Include Tarzan class and require_once('tarzan.class.php'); create AmazonEC2 object $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 83. Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 84. Examples: Run an EC2 instance <?php Create an EC2 instance of an Ubuntu 8.04 LTS Hardy Server require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 85. Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 86. Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); Allocate an Elastic IP (fixed public IP) and associate it with the instance created $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 87. Examples: Run an EC2 instance <?php require_once('tarzan.class.php'); $ec2 = new AmazonEC2(); $run = $ec2->run_instances('ef48af86', 1, 1); $instance_id = $run->body->instancesSet->item->instanceId; $allocate = $ec2->allocate_address(); $ip_addr = $allocate->body->publicIp; $associate = $ec2->associate_address($instance_id, $ip_addr); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 88. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 89. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); Disassociate and $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id release the Elastic IP )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 90. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 91. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id Reboot the instance )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 92. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 93. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); Shutdown the instance $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 94. Examples: Manage an EC2 instance <?php $disassociate = $ec2->disassociate_address($ip_addr); $ec2->release_address($ip_addr); $ec2->reboot_instances(array( 'InstanceId.1' => $instance_id )); $ec2->terminate_instances(array( 'InstanceId.1' => $instance_id; )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 95. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 96. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); Create a persistent $ec2->create_snapshot($volume_id); volume of 10 GB size $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 97. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 98. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); Attach the volume to the running instance as /dev/sdh $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 99. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 100. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); Crate a snapshot (backup) $ec2->delete_volume($volume_id); volume of the ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 101. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 102. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); Unmount the volume $ec2->delete_volume($volume_id); ?> from the running instance phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 103. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 104. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); Delete the volume $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 105. Examples: Elastic Book Stores <?php $volume_id = $ec2->create_volume(10, quot;us-east-1cquot;); $ec2->attach_volume($volume_id, $instance_id, quot;/dev/sdhquot;); $ec2->create_snapshot($volume_id); $ec2->detach_volume($volume_id); $ec2->delete_volume($volume_id); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 106. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 107. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', Create a domain named “tarzan_test” that will store items 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 108. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 109. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); Create an item with $domain = ID=”testuser” $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 110. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 111. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', Attributes have a key and 'fantastic' one or more values ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 112. Examples: SimpleDB, create items <?php require_once('tarzan.class.php'); $sdb = new AmazonSDB(); $domain = $sdb->create_domain('tarzan_test'); $put = $sdb->put_attributes('tarzan_test', 'testuser', array( 'name' => 'Test User', 'email' => 'test.user@gmail.com', 'password' => 'test', 'tags' => array( 'awesome', 'cool', 'fantastic' ) )); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 113. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 114. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); Get the password for $q = $sdb->$query('tarzan_test', the user “testuser” array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 115. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 116. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', Get the ID of 50 users array( 'MaxNumberOfItems' => 10 ), without any particular order quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 117. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 118. Examples: SimpleDB, query items <?php Get at most 50 users that have $q = the tags ”cool” and “awesome” $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = but not the tag “deleted” $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 119. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 120. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); Fetch all the attributes, ?> not only the IDs phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 121. Examples: SimpleDB, query items <?php $q = $sdb->get_attributes('tarzan_test', 'testuser', 'password'); $q = $sdb->query('tarzan_test', array('MaxNumberOfItems' => 50)); $q = $sdb->$query('tarzan_test', array( 'MaxNumberOfItems' => 10 ), quot;['tags' = 'cool'] intersection ['tags' = 'awesome'] quot; . quot;intersection not ['tags' = 'deleted']quot;, true ); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 122. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 123. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); Create the queue $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 124. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 125. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); Push a message into the queue $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 126. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 127. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); Remove temporaly a $queue = $sqs->create_queue('tarzan_test_queue'); message from the queue $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 128. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 129. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); Remove permanently the $message = $sqs->send_message('This is my message!'); $message = message from the queue $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 130. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 131. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); Destroy the queue $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 132. Examples: Simple Queing Service <?php require_once('tarzan.class.php'); $sqs = new AmazonSQS(); $queue = $sqs->create_queue('tarzan_test_queue'); $message = $sqs->send_message('This is my message!'); $message = $sqs->receive_message(); $message = $sqs->delete_message($message_id); $queue = $sqs->delete_queue(); ?> phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 133. What we have learned? The cloud is real and it takes less than 5 minutes to start using it in you applications! With Tarzan you can easily integrate the powerful Amazon Web Services into you application or start build one on them. phpDay 2009 - May 15, 16 2009 - Verona, Italy
  • 134. Thank you! Questions? http://cloudify.me info@cloudify.me @cloudify We’re hiring, send your resume to jobs@cloudify.me phpDay 2009 - May 15, 16 2009 - Verona, Italy

Editor's Notes