SlideShare a Scribd company logo
Motivation
Our Solution
     Issues
  Summary




 Going Postal

    Chisel Wright

     NET-A-PORTER


  YAPC::EU 2010




Chisel Wright   Going Postal
Motivation
               Our Solution
                               Talking To Strangers
                    Issues
                 Summary


Motivation




             Why Bother?



               Chisel Wright   Going Postal
Motivation
                             Our Solution
                                             Talking To Strangers
                                  Issues
                               Summary


A Long Time Ago
When There Weren’t Any Better Solutions




        Direct, far away database writes
        Need to know their dialect
        They can’t easily change their schema
        Tightly coupled




                             Chisel Wright   Going Postal
Motivation
                             Our Solution
                                             Talking To Strangers
                                  Issues
                               Summary


A Long Time Ago
When There Weren’t Any Better Solutions




        Direct, far away database writes
        Need to know their dialect
        They can’t easily change their schema
        Tightly coupled




                             Chisel Wright   Going Postal
Motivation
                             Our Solution
                                             Talking To Strangers
                                  Issues
                               Summary


A Long Time Ago
When There Weren’t Any Better Solutions




        Direct, far away database writes
        Need to know their dialect
        They can’t easily change their schema
        Tightly coupled




                             Chisel Wright   Going Postal
Motivation
                             Our Solution
                                             Talking To Strangers
                                  Issues
                               Summary


A Long Time Ago
When There Weren’t Any Better Solutions




        Direct, far away database writes
        Need to know their dialect
        They can’t easily change their schema
        Tightly coupled




                             Chisel Wright   Going Postal
Motivation
                            Our Solution
                                           Talking To Strangers
                                 Issues
                              Summary


Not quite so long ago
When There Were Options




        TheSchwartz
            resolved a slightly different issue
            first step in the right direction
            didn’t help with far away issue
            perl only




                           Chisel Wright   Going Postal
Motivation
                            Our Solution
                                           Talking To Strangers
                                 Issues
                              Summary


Not quite so long ago
When There Were Options




        TheSchwartz
            resolved a slightly different issue
            first step in the right direction
            didn’t help with far away issue
            perl only




                           Chisel Wright   Going Postal
Motivation
                            Our Solution
                                           Talking To Strangers
                                 Issues
                              Summary


Not quite so long ago
When There Were Options




        TheSchwartz
            resolved a slightly different issue
            first step in the right direction
            didn’t help with far away issue
            perl only




                           Chisel Wright   Going Postal
Motivation
                            Our Solution
                                           Talking To Strangers
                                 Issues
                              Summary


Not quite so long ago
When There Were Options




        TheSchwartz
            resolved a slightly different issue
            first step in the right direction
            didn’t help with far away issue
            perl only




                           Chisel Wright   Going Postal
Motivation
                            Our Solution
                                           Talking To Strangers
                                 Issues
                              Summary


Not quite so long ago
When There Were Options




        TheSchwartz
            resolved a slightly different issue
            first step in the right direction
            didn’t help with far away issue
            perl only




                           Chisel Wright   Going Postal
Motivation
                  ActiveMQ
  Our Solution
                  Net::Stomp
       Issues
                  Net::ActiveMQ
    Summary




Our Solution



  Chisel Wright   Going Postal
Motivation
                ActiveMQ
Our Solution
                Net::Stomp
     Issues
                Net::ActiveMQ
  Summary




ActiveMQ



Chisel Wright   Going Postal
Motivation
                                        ActiveMQ
                        Our Solution
                                        Net::Stomp
                             Issues
                                        Net::ActiveMQ
                          Summary


ActiveMQ




    Java guys like it
    Perl guys can interact with it
    Reliable, well-used solution




                        Chisel Wright   Going Postal
Motivation
                                        ActiveMQ
                        Our Solution
                                        Net::Stomp
                             Issues
                                        Net::ActiveMQ
                          Summary


ActiveMQ




    Java guys like it
    Perl guys can interact with it
    Reliable, well-used solution




                        Chisel Wright   Going Postal
Motivation
                                        ActiveMQ
                        Our Solution
                                        Net::Stomp
                             Issues
                                        Net::ActiveMQ
                          Summary


ActiveMQ




    Java guys like it
    Perl guys can interact with it
    Reliable, well-used solution




                        Chisel Wright   Going Postal
Motivation
                                       ActiveMQ
                       Our Solution
                                       Net::Stomp
                            Issues
                                       Net::ActiveMQ
                         Summary


Net::Stomp




     STOMP is great for talking to ActiveMQ
     Net::Stomp excellent for quickly interacting with ActiveMQ




                       Chisel Wright   Going Postal
Motivation
                                       ActiveMQ
                       Our Solution
                                       Net::Stomp
                            Issues
                                       Net::ActiveMQ
                         Summary


Net::Stomp




     STOMP is great for talking to ActiveMQ
     Net::Stomp excellent for quickly interacting with ActiveMQ




                       Chisel Wright   Going Postal
Motivation
                                         ActiveMQ
                          Our Solution
                                         Net::Stomp
                               Issues
                                         Net::ActiveMQ
                            Summary


Sending with Net::Stomp
Talking to a Queue



   # send a message to the queue ’foo’
   use Net::Stomp;
   my $stomp = Net::Stomp->new({
       hostname    => ’localhost’,
       port        => ’61613’,
   });
   $stomp->connect({
       login       => ’hello’,
       passcode    => ’there’,
   });
   $stomp->send({
       destination => ’/queue/foo’,
       body        => ’test message’,
   });
   $stomp->disconnect;




                         Chisel Wright   Going Postal
Motivation
                                         ActiveMQ
                          Our Solution
                                         Net::Stomp
                               Issues
                                         Net::ActiveMQ
                            Summary


Receiving with Net::Stomp
Subscribing to a Queue



   # subscribe to messages from the queue ’foo’
   use Net::Stomp;
   my $stomp = Net::Stomp->new({
       hostname    => ’localhost’,
       port        => ’61613’,
   });
   $stomp->connect({
       login       => ’hello’,
       passcode    => ’there’,
   });
   $stomp->subscribe({
       destination             => ’/queue/foo’,
       ’ack’                   => ’client’,
       ’activemq.prefetchSize’ => 1,
   });




                         Chisel Wright   Going Postal
Motivation
                                          ActiveMQ
                          Our Solution
                                          Net::Stomp
                               Issues
                                          Net::ActiveMQ
                            Summary


Receiving with Net::Stomp
Plucking from the Queue




   while (1) {
     my $frame = $stomp->receive_frame;
     warn $frame->body; # do something here
     $stomp->ack( { frame => $frame } );
   }
   $stomp->disconnect;




                          Chisel Wright   Going Postal
Motivation
                                                  ActiveMQ
                                   Our Solution
                                                  Net::Stomp
                                        Issues
                                                  Net::ActiveMQ
                                     Summary


Net::Stomp
Thoughts




           Quickly and easily talk to ActiveMQ
           Does what it promises


           Low-level
           Copy-and-paste coding
           Error-handling, . . .




                               Chisel Wright      Going Postal
Motivation
                                                  ActiveMQ
                                   Our Solution
                                                  Net::Stomp
                                        Issues
                                                  Net::ActiveMQ
                                     Summary


Net::Stomp
Thoughts




           Quickly and easily talk to ActiveMQ
           Does what it promises


           Low-level
           Copy-and-paste coding
           Error-handling, . . .




                               Chisel Wright      Going Postal
Motivation
                                                  ActiveMQ
                                   Our Solution
                                                  Net::Stomp
                                        Issues
                                                  Net::ActiveMQ
                                     Summary


Net::Stomp
Thoughts




           Quickly and easily talk to ActiveMQ
           Does what it promises


           Low-level
           Copy-and-paste coding
           Error-handling, . . .




                               Chisel Wright      Going Postal
Motivation
                                                  ActiveMQ
                                   Our Solution
                                                  Net::Stomp
                                        Issues
                                                  Net::ActiveMQ
                                     Summary


Net::Stomp
Thoughts




           Quickly and easily talk to ActiveMQ
           Does what it promises


           Low-level
           Copy-and-paste coding
           Error-handling, . . .




                               Chisel Wright      Going Postal
Motivation
                                                  ActiveMQ
                                   Our Solution
                                                  Net::Stomp
                                        Issues
                                                  Net::ActiveMQ
                                     Summary


Net::Stomp
Thoughts




           Quickly and easily talk to ActiveMQ
           Does what it promises


           Low-level
           Copy-and-paste coding
           Error-handling, . . .




                               Chisel Wright      Going Postal
Motivation
                  ActiveMQ
   Our Solution
                  Net::Stomp
        Issues
                  Net::ActiveMQ
     Summary




Net::ActiveMQ



  Chisel Wright   Going Postal
Motivation
                                       ActiveMQ
                       Our Solution
                                       Net::Stomp
                            Issues
                                       Net::ActiveMQ
                         Summary


Net::ActiveMQ




     Standardise our AMQ solution across apps
     Lower barrier to entry




                       Chisel Wright   Going Postal
Motivation
                                       ActiveMQ
                       Our Solution
                                       Net::Stomp
                            Issues
                                       Net::ActiveMQ
                         Summary


Net::ActiveMQ




     Standardise our AMQ solution across apps
     Lower barrier to entry




                       Chisel Wright   Going Postal
Motivation
                                        ActiveMQ
                         Our Solution
                                        Net::Stomp
                              Issues
                                        Net::ActiveMQ
                           Summary


What Is It?


  Essentially:
      Net::Stomp
      Catalyst::Engine::Stomp
  with a lovely ribbon and bow around it.

      Message producers
      Message consumers
  all in one place.



                        Chisel Wright   Going Postal
Motivation
                                         ActiveMQ
                          Our Solution
                                         Net::Stomp
                               Issues
                                         Net::ActiveMQ
                            Summary


Sending with Net::ActiveMQ
Talking to a Queue


   use Net::ActiveMQ::Producer;

   my $producer = Net::ActiveMQ::Producer->new({
       hostname => ’localhost’,
       port      => 61613
   });

   $producer->send(
       ’Some::Message’,
       { message => ’data’, goes => ’here’ }
   );


   Net::ActiveMQ::Producer - message type does not exist -
     Some::Message
     at /path/to/.../Class/MOP/Method/Wrapped.pm line 159



                         Chisel Wright   Going Postal
Motivation
                                          ActiveMQ
                           Our Solution
                                          Net::Stomp
                                Issues
                                          Net::ActiveMQ
                             Summary


Sending with Net::ActiveMQ
A Producer

   package Net::ActiveMQ::Producer::Some::Message;
   use Moose;
       with ’Net::ActiveMQ::Role::Producer’;

   sub transform {
       my ($self, $header, $data) = @_;
       # make sure it goes somewhere
       $header->{destination} ||= ’/queue/some-message’;

        # the desired action from the consumer
        $data->{’@type’}   ||= ’action_method’;

        # "transform" the data
        $data->{process_time} = scalar localtime;

        return ($header, $data);
   }

   1;

                          Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Validate What You Send


   # This is completely optional!
   sub message_spec {
     # Data::Rx format
     return {
       type => ’//rec’,

        required => {
          message         => ’//str’,
        },

         optional => {
           ’@type’        => ’//str’,
           goes           => ’//str’,
           process_time   => ’//str’,
         },
       };
   }


                            Chisel Wright   Going Postal
Motivation
                                         ActiveMQ
                          Our Solution
                                         Net::Stomp
                               Issues
                                         Net::ActiveMQ
                            Summary


Sending with Net::ActiveMQ
Catalyst Model



   # create your model class
   ./script/myapp_create.pl model 
       MyMQ 
       Net::ActiveMQ 
       localhost 
       61613 
       YES


   # in your controller
   $c->model(’MyMQ’)->send(
       ’Some::Message’,
       { message => { a => ’shiny’, hash => ’reference’ } }
   );




                         Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                            ActiveMQ
                             Our Solution
                                            Net::Stomp
                                  Issues
                                            Net::ActiveMQ
                               Summary


Sending with Net::ActiveMQ
Why did you do that?




        sub message_spec
              Used by proof-of-concept
              Can catch your own mistakes
              No compelling reason to remove it
        Data::Rx
              Nicer error messages
              Slightly more agnostic




                            Chisel Wright   Going Postal
Motivation
                                           ActiveMQ
                           Our Solution
                                           Net::Stomp
                                Issues
                                           Net::ActiveMQ
                             Summary


Receiving with Net::ActiveMQ
Quick But Boring

   $ CATALYST_DEBUG=1 
   > net_activemq_consumer_server.pl


   [debug] Loaded engine "Catalyst::Engine::Stomp"
   ...
   [debug] Loaded components:
   .--------------------------------+----------.
   | Class                          | Type     |
   +--------------------------------+----------+
   | ...::Controller::Root          | instance |
   ’--------------------------------+----------’
   ...
   [info] Application powered by Catalyst 5.80016


        Not very useful in this state
        Fairly easy to add something useful
                           Chisel Wright   Going Postal
Motivation
                                           ActiveMQ
                           Our Solution
                                           Net::Stomp
                                Issues
                                           Net::ActiveMQ
                             Summary


Receiving with Net::ActiveMQ
Quick But Boring

   $ CATALYST_DEBUG=1 
   > net_activemq_consumer_server.pl


   [debug] Loaded engine "Catalyst::Engine::Stomp"
   ...
   [debug] Loaded components:
   .--------------------------------+----------.
   | Class                          | Type     |
   +--------------------------------+----------+
   | ...::Controller::Root          | instance |
   ’--------------------------------+----------’
   ...
   [info] Application powered by Catalyst 5.80016


        Not very useful in this state
        Fairly easy to add something useful
                           Chisel Wright   Going Postal
Motivation
                                          ActiveMQ
                          Our Solution
                                          Net::Stomp
                               Issues
                                          Net::ActiveMQ
                            Summary


Receiving with Net::ActiveMQ
Consuming Some::Message




   $ net_activemq_consumer_create.pl controller Some::Message
       ActiveMQ
   created "lib/Net/ActiveMQ/Consumer/Controller/Some"
   created "t"
   created "lib/Net/ActiveMQ/Consumer/Controller/Some/Message.pm"
   created "t/controller_Some-Message.t"


       Catalyst::Helper to do the hard work




                          Chisel Wright   Going Postal
Motivation
                                          ActiveMQ
                          Our Solution
                                          Net::Stomp
                               Issues
                                          Net::ActiveMQ
                            Summary


Receiving with Net::ActiveMQ
Consuming Some::Message


   $ CATALYST_DEBUG=1 
   > PERL5LIB=$PWD/lib 
   > net_activemq_consumer_server.pl


   [debug] Loaded engine "Catalyst::Engine::Stomp"
   ...
   [debug] Loaded components:
   .--------------------------------+----------.
   | Class                          | Type     |
   +--------------------------------+----------+
   | ...::Controller::Root          | instance |
   | ...::Controller::Some::Message | instance |
   ’--------------------------------+----------’
   ...
   [info] Application powered by Catalyst 5.80016



                          Chisel Wright   Going Postal
Motivation
                                           ActiveMQ
                           Our Solution
                                           Net::Stomp
                                Issues
                                           Net::ActiveMQ
                             Summary


Receiving with Net::ActiveMQ
Controller Actions


    package Net::ActiveMQ::Consumer::Controller::Some::Message;
    use Moose;
    BEGIN {
       extends
         ’Net::ActiveMQ::Consumer::ControllerBase::MessageDriven’
    }
    __PACKAGE__->config(
         action_namespace => ’some-message’
    );
    # this will handle ’@type’ of ’action_method’ in
    # the ’some-message’ queue
    sub action_method :Local {
       my ($self, $c, $message) = @_;
       $c->log->warn(’Some::Message / some-message / action_method’);
    }
    __PACKAGE__->meta->make_immutable;
    1;


                           Chisel Wright   Going Postal
Motivation
                                         ActiveMQ
                          Our Solution
                                         Net::Stomp
                               Issues
                                         Net::ActiveMQ
                            Summary


Receiving with Net::ActiveMQ
Queue::Spec




   package Net::ActiveMQ::Consumer::Queue::Spec::Some::Message;
   use Moose;

   sub action_method {
       return { type => ’//any’ };
   }

   1;




                         Chisel Wright   Going Postal
Motivation
Our Solution    Peer Review
     Issues     Implementation
  Summary




   Issues



Chisel Wright   Going Postal
Motivation
                         Our Solution   Peer Review
                              Issues    Implementation
                           Summary


Peer Review



     Only recently been used by the rest of the team
         Bugs
         Handling errors
     Lack of clear documentation
         POD
         How-To / “How do I. . . ?”




                        Chisel Wright   Going Postal
Motivation
                         Our Solution   Peer Review
                              Issues    Implementation
                           Summary


Peer Review



     Only recently been used by the rest of the team
         Bugs
         Handling errors
     Lack of clear documentation
         POD
         How-To / “How do I. . . ?”




                        Chisel Wright   Going Postal
Motivation
                         Our Solution   Peer Review
                              Issues    Implementation
                           Summary


Peer Review



     Only recently been used by the rest of the team
         Bugs
         Handling errors
     Lack of clear documentation
         POD
         How-To / “How do I. . . ?”




                        Chisel Wright   Going Postal
Motivation
                         Our Solution   Peer Review
                              Issues    Implementation
                           Summary


Peer Review



     Only recently been used by the rest of the team
         Bugs
         Handling errors
     Lack of clear documentation
         POD
         How-To / “How do I. . . ?”




                        Chisel Wright   Going Postal
Motivation
                         Our Solution   Peer Review
                              Issues    Implementation
                           Summary


Peer Review



     Only recently been used by the rest of the team
         Bugs
         Handling errors
     Lack of clear documentation
         POD
         How-To / “How do I. . . ?”




                        Chisel Wright   Going Postal
Motivation
                         Our Solution   Peer Review
                              Issues    Implementation
                           Summary


Peer Review



     Only recently been used by the rest of the team
         Bugs
         Handling errors
     Lack of clear documentation
         POD
         How-To / “How do I. . . ?”




                        Chisel Wright   Going Postal
Motivation
                            Our Solution   Peer Review
                                 Issues    Implementation
                              Summary


Implementation
General




          Some early features not fully phased out
              @type => ’...’
              JMSType




                           Chisel Wright   Going Postal
Motivation
                            Our Solution   Peer Review
                                 Issues    Implementation
                              Summary


Implementation
General




          Some early features not fully phased out
              @type => ’...’
              JMSType




                           Chisel Wright   Going Postal
Motivation
                            Our Solution   Peer Review
                                 Issues    Implementation
                              Summary


Implementation
General




          Some early features not fully phased out
              @type => ’...’
              JMSType




                           Chisel Wright   Going Postal
Motivation
                          Our Solution   Peer Review
                               Issues    Implementation
                            Summary


Implementation
Producers




        Shared spec files implementation not complete
            Still living in the ::Consumer:: namespace
            Not easily used by ::Producer:: classes
            message_spec vs build_message_spec




                         Chisel Wright   Going Postal
Motivation
                          Our Solution   Peer Review
                               Issues    Implementation
                            Summary


Implementation
Producers




        Shared spec files implementation not complete
            Still living in the ::Consumer:: namespace
            Not easily used by ::Producer:: classes
            message_spec vs build_message_spec




                         Chisel Wright   Going Postal
Motivation
                          Our Solution   Peer Review
                               Issues    Implementation
                            Summary


Implementation
Producers




        Shared spec files implementation not complete
            Still living in the ::Consumer:: namespace
            Not easily used by ::Producer:: classes
            message_spec vs build_message_spec




                         Chisel Wright   Going Postal
Motivation
                          Our Solution   Peer Review
                               Issues    Implementation
                            Summary


Implementation
Producers




        Shared spec files implementation not complete
            Still living in the ::Consumer:: namespace
            Not easily used by ::Producer:: classes
            message_spec vs build_message_spec




                         Chisel Wright   Going Postal
Motivation
                          Our Solution    Peer Review
                               Issues     Implementation
                            Summary


Implementation
Consumers




       Consumers limited to Net::ActiveMQ namespace
       Error-Handling still evolving




                          Chisel Wright   Going Postal
Motivation
                          Our Solution    Peer Review
                               Issues     Implementation
                            Summary


Implementation
Consumers




       Consumers limited to Net::ActiveMQ namespace
       Error-Handling still evolving




                          Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
                       Our Solution
                            Issues
                         Summary


Summary


    Avoid direct database interaction
    Use message queues
    DRY


    The Future
        Evolution - final stages
        We’re starting to use it in production
        We hope to release to the CPAN soon




                      Chisel Wright   Going Postal
Motivation
  Our Solution
       Issues
    Summary




QUESTIONS?



  Chisel Wright   Going Postal
Motivation
                    Our Solution
                         Issues
                      Summary


Obligatory LOLCAT
LOL-Rilla?




             chisel.wright@net-a-porter.com

                    Chisel Wright   Going Postal

More Related Content

Recently uploaded

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 

Recently uploaded (20)

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

YAPC::EU 2010 - Going Postal

  • 1. Motivation Our Solution Issues Summary Going Postal Chisel Wright NET-A-PORTER YAPC::EU 2010 Chisel Wright Going Postal
  • 2. Motivation Our Solution Talking To Strangers Issues Summary Motivation Why Bother? Chisel Wright Going Postal
  • 3. Motivation Our Solution Talking To Strangers Issues Summary A Long Time Ago When There Weren’t Any Better Solutions Direct, far away database writes Need to know their dialect They can’t easily change their schema Tightly coupled Chisel Wright Going Postal
  • 4. Motivation Our Solution Talking To Strangers Issues Summary A Long Time Ago When There Weren’t Any Better Solutions Direct, far away database writes Need to know their dialect They can’t easily change their schema Tightly coupled Chisel Wright Going Postal
  • 5. Motivation Our Solution Talking To Strangers Issues Summary A Long Time Ago When There Weren’t Any Better Solutions Direct, far away database writes Need to know their dialect They can’t easily change their schema Tightly coupled Chisel Wright Going Postal
  • 6. Motivation Our Solution Talking To Strangers Issues Summary A Long Time Ago When There Weren’t Any Better Solutions Direct, far away database writes Need to know their dialect They can’t easily change their schema Tightly coupled Chisel Wright Going Postal
  • 7. Motivation Our Solution Talking To Strangers Issues Summary Not quite so long ago When There Were Options TheSchwartz resolved a slightly different issue first step in the right direction didn’t help with far away issue perl only Chisel Wright Going Postal
  • 8. Motivation Our Solution Talking To Strangers Issues Summary Not quite so long ago When There Were Options TheSchwartz resolved a slightly different issue first step in the right direction didn’t help with far away issue perl only Chisel Wright Going Postal
  • 9. Motivation Our Solution Talking To Strangers Issues Summary Not quite so long ago When There Were Options TheSchwartz resolved a slightly different issue first step in the right direction didn’t help with far away issue perl only Chisel Wright Going Postal
  • 10. Motivation Our Solution Talking To Strangers Issues Summary Not quite so long ago When There Were Options TheSchwartz resolved a slightly different issue first step in the right direction didn’t help with far away issue perl only Chisel Wright Going Postal
  • 11. Motivation Our Solution Talking To Strangers Issues Summary Not quite so long ago When There Were Options TheSchwartz resolved a slightly different issue first step in the right direction didn’t help with far away issue perl only Chisel Wright Going Postal
  • 12. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Our Solution Chisel Wright Going Postal
  • 13. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary ActiveMQ Chisel Wright Going Postal
  • 14. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary ActiveMQ Java guys like it Perl guys can interact with it Reliable, well-used solution Chisel Wright Going Postal
  • 15. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary ActiveMQ Java guys like it Perl guys can interact with it Reliable, well-used solution Chisel Wright Going Postal
  • 16. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary ActiveMQ Java guys like it Perl guys can interact with it Reliable, well-used solution Chisel Wright Going Postal
  • 17. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp STOMP is great for talking to ActiveMQ Net::Stomp excellent for quickly interacting with ActiveMQ Chisel Wright Going Postal
  • 18. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp STOMP is great for talking to ActiveMQ Net::Stomp excellent for quickly interacting with ActiveMQ Chisel Wright Going Postal
  • 19. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::Stomp Talking to a Queue # send a message to the queue ’foo’ use Net::Stomp; my $stomp = Net::Stomp->new({ hostname => ’localhost’, port => ’61613’, }); $stomp->connect({ login => ’hello’, passcode => ’there’, }); $stomp->send({ destination => ’/queue/foo’, body => ’test message’, }); $stomp->disconnect; Chisel Wright Going Postal
  • 20. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::Stomp Subscribing to a Queue # subscribe to messages from the queue ’foo’ use Net::Stomp; my $stomp = Net::Stomp->new({ hostname => ’localhost’, port => ’61613’, }); $stomp->connect({ login => ’hello’, passcode => ’there’, }); $stomp->subscribe({ destination => ’/queue/foo’, ’ack’ => ’client’, ’activemq.prefetchSize’ => 1, }); Chisel Wright Going Postal
  • 21. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::Stomp Plucking from the Queue while (1) { my $frame = $stomp->receive_frame; warn $frame->body; # do something here $stomp->ack( { frame => $frame } ); } $stomp->disconnect; Chisel Wright Going Postal
  • 22. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp Thoughts Quickly and easily talk to ActiveMQ Does what it promises Low-level Copy-and-paste coding Error-handling, . . . Chisel Wright Going Postal
  • 23. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp Thoughts Quickly and easily talk to ActiveMQ Does what it promises Low-level Copy-and-paste coding Error-handling, . . . Chisel Wright Going Postal
  • 24. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp Thoughts Quickly and easily talk to ActiveMQ Does what it promises Low-level Copy-and-paste coding Error-handling, . . . Chisel Wright Going Postal
  • 25. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp Thoughts Quickly and easily talk to ActiveMQ Does what it promises Low-level Copy-and-paste coding Error-handling, . . . Chisel Wright Going Postal
  • 26. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::Stomp Thoughts Quickly and easily talk to ActiveMQ Does what it promises Low-level Copy-and-paste coding Error-handling, . . . Chisel Wright Going Postal
  • 27. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::ActiveMQ Chisel Wright Going Postal
  • 28. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::ActiveMQ Standardise our AMQ solution across apps Lower barrier to entry Chisel Wright Going Postal
  • 29. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Net::ActiveMQ Standardise our AMQ solution across apps Lower barrier to entry Chisel Wright Going Postal
  • 30. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary What Is It? Essentially: Net::Stomp Catalyst::Engine::Stomp with a lovely ribbon and bow around it. Message producers Message consumers all in one place. Chisel Wright Going Postal
  • 31. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Talking to a Queue use Net::ActiveMQ::Producer; my $producer = Net::ActiveMQ::Producer->new({ hostname => ’localhost’, port => 61613 }); $producer->send( ’Some::Message’, { message => ’data’, goes => ’here’ } ); Net::ActiveMQ::Producer - message type does not exist - Some::Message at /path/to/.../Class/MOP/Method/Wrapped.pm line 159 Chisel Wright Going Postal
  • 32. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ A Producer package Net::ActiveMQ::Producer::Some::Message; use Moose; with ’Net::ActiveMQ::Role::Producer’; sub transform { my ($self, $header, $data) = @_; # make sure it goes somewhere $header->{destination} ||= ’/queue/some-message’; # the desired action from the consumer $data->{’@type’} ||= ’action_method’; # "transform" the data $data->{process_time} = scalar localtime; return ($header, $data); } 1; Chisel Wright Going Postal
  • 33. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Validate What You Send # This is completely optional! sub message_spec { # Data::Rx format return { type => ’//rec’, required => { message => ’//str’, }, optional => { ’@type’ => ’//str’, goes => ’//str’, process_time => ’//str’, }, }; } Chisel Wright Going Postal
  • 34. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Catalyst Model # create your model class ./script/myapp_create.pl model MyMQ Net::ActiveMQ localhost 61613 YES # in your controller $c->model(’MyMQ’)->send( ’Some::Message’, { message => { a => ’shiny’, hash => ’reference’ } } ); Chisel Wright Going Postal
  • 35. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 36. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 37. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 38. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 39. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 40. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 41. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Sending with Net::ActiveMQ Why did you do that? sub message_spec Used by proof-of-concept Can catch your own mistakes No compelling reason to remove it Data::Rx Nicer error messages Slightly more agnostic Chisel Wright Going Postal
  • 42. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::ActiveMQ Quick But Boring $ CATALYST_DEBUG=1 > net_activemq_consumer_server.pl [debug] Loaded engine "Catalyst::Engine::Stomp" ... [debug] Loaded components: .--------------------------------+----------. | Class | Type | +--------------------------------+----------+ | ...::Controller::Root | instance | ’--------------------------------+----------’ ... [info] Application powered by Catalyst 5.80016 Not very useful in this state Fairly easy to add something useful Chisel Wright Going Postal
  • 43. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::ActiveMQ Quick But Boring $ CATALYST_DEBUG=1 > net_activemq_consumer_server.pl [debug] Loaded engine "Catalyst::Engine::Stomp" ... [debug] Loaded components: .--------------------------------+----------. | Class | Type | +--------------------------------+----------+ | ...::Controller::Root | instance | ’--------------------------------+----------’ ... [info] Application powered by Catalyst 5.80016 Not very useful in this state Fairly easy to add something useful Chisel Wright Going Postal
  • 44. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::ActiveMQ Consuming Some::Message $ net_activemq_consumer_create.pl controller Some::Message ActiveMQ created "lib/Net/ActiveMQ/Consumer/Controller/Some" created "t" created "lib/Net/ActiveMQ/Consumer/Controller/Some/Message.pm" created "t/controller_Some-Message.t" Catalyst::Helper to do the hard work Chisel Wright Going Postal
  • 45. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::ActiveMQ Consuming Some::Message $ CATALYST_DEBUG=1 > PERL5LIB=$PWD/lib > net_activemq_consumer_server.pl [debug] Loaded engine "Catalyst::Engine::Stomp" ... [debug] Loaded components: .--------------------------------+----------. | Class | Type | +--------------------------------+----------+ | ...::Controller::Root | instance | | ...::Controller::Some::Message | instance | ’--------------------------------+----------’ ... [info] Application powered by Catalyst 5.80016 Chisel Wright Going Postal
  • 46. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::ActiveMQ Controller Actions package Net::ActiveMQ::Consumer::Controller::Some::Message; use Moose; BEGIN { extends ’Net::ActiveMQ::Consumer::ControllerBase::MessageDriven’ } __PACKAGE__->config( action_namespace => ’some-message’ ); # this will handle ’@type’ of ’action_method’ in # the ’some-message’ queue sub action_method :Local { my ($self, $c, $message) = @_; $c->log->warn(’Some::Message / some-message / action_method’); } __PACKAGE__->meta->make_immutable; 1; Chisel Wright Going Postal
  • 47. Motivation ActiveMQ Our Solution Net::Stomp Issues Net::ActiveMQ Summary Receiving with Net::ActiveMQ Queue::Spec package Net::ActiveMQ::Consumer::Queue::Spec::Some::Message; use Moose; sub action_method { return { type => ’//any’ }; } 1; Chisel Wright Going Postal
  • 48. Motivation Our Solution Peer Review Issues Implementation Summary Issues Chisel Wright Going Postal
  • 49. Motivation Our Solution Peer Review Issues Implementation Summary Peer Review Only recently been used by the rest of the team Bugs Handling errors Lack of clear documentation POD How-To / “How do I. . . ?” Chisel Wright Going Postal
  • 50. Motivation Our Solution Peer Review Issues Implementation Summary Peer Review Only recently been used by the rest of the team Bugs Handling errors Lack of clear documentation POD How-To / “How do I. . . ?” Chisel Wright Going Postal
  • 51. Motivation Our Solution Peer Review Issues Implementation Summary Peer Review Only recently been used by the rest of the team Bugs Handling errors Lack of clear documentation POD How-To / “How do I. . . ?” Chisel Wright Going Postal
  • 52. Motivation Our Solution Peer Review Issues Implementation Summary Peer Review Only recently been used by the rest of the team Bugs Handling errors Lack of clear documentation POD How-To / “How do I. . . ?” Chisel Wright Going Postal
  • 53. Motivation Our Solution Peer Review Issues Implementation Summary Peer Review Only recently been used by the rest of the team Bugs Handling errors Lack of clear documentation POD How-To / “How do I. . . ?” Chisel Wright Going Postal
  • 54. Motivation Our Solution Peer Review Issues Implementation Summary Peer Review Only recently been used by the rest of the team Bugs Handling errors Lack of clear documentation POD How-To / “How do I. . . ?” Chisel Wright Going Postal
  • 55. Motivation Our Solution Peer Review Issues Implementation Summary Implementation General Some early features not fully phased out @type => ’...’ JMSType Chisel Wright Going Postal
  • 56. Motivation Our Solution Peer Review Issues Implementation Summary Implementation General Some early features not fully phased out @type => ’...’ JMSType Chisel Wright Going Postal
  • 57. Motivation Our Solution Peer Review Issues Implementation Summary Implementation General Some early features not fully phased out @type => ’...’ JMSType Chisel Wright Going Postal
  • 58. Motivation Our Solution Peer Review Issues Implementation Summary Implementation Producers Shared spec files implementation not complete Still living in the ::Consumer:: namespace Not easily used by ::Producer:: classes message_spec vs build_message_spec Chisel Wright Going Postal
  • 59. Motivation Our Solution Peer Review Issues Implementation Summary Implementation Producers Shared spec files implementation not complete Still living in the ::Consumer:: namespace Not easily used by ::Producer:: classes message_spec vs build_message_spec Chisel Wright Going Postal
  • 60. Motivation Our Solution Peer Review Issues Implementation Summary Implementation Producers Shared spec files implementation not complete Still living in the ::Consumer:: namespace Not easily used by ::Producer:: classes message_spec vs build_message_spec Chisel Wright Going Postal
  • 61. Motivation Our Solution Peer Review Issues Implementation Summary Implementation Producers Shared spec files implementation not complete Still living in the ::Consumer:: namespace Not easily used by ::Producer:: classes message_spec vs build_message_spec Chisel Wright Going Postal
  • 62. Motivation Our Solution Peer Review Issues Implementation Summary Implementation Consumers Consumers limited to Net::ActiveMQ namespace Error-Handling still evolving Chisel Wright Going Postal
  • 63. Motivation Our Solution Peer Review Issues Implementation Summary Implementation Consumers Consumers limited to Net::ActiveMQ namespace Error-Handling still evolving Chisel Wright Going Postal
  • 64. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 65. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 66. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 67. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 68. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 69. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 70. Motivation Our Solution Issues Summary Summary Avoid direct database interaction Use message queues DRY The Future Evolution - final stages We’re starting to use it in production We hope to release to the CPAN soon Chisel Wright Going Postal
  • 71. Motivation Our Solution Issues Summary QUESTIONS? Chisel Wright Going Postal
  • 72. Motivation Our Solution Issues Summary Obligatory LOLCAT LOL-Rilla? chisel.wright@net-a-porter.com Chisel Wright Going Postal