SlideShare una empresa de Scribd logo
1 de 84
Descargar para leer sin conexión
Sustainable Agile
  Development
 a case study with chess




                 gabriele.lana@gmail.com
               federico.galassi@gmail.com
We have
an Idea
We want to
make it work
We know that
Agile works in a
corporate world
Can Agile work
for us/you too?
Eric Ries:
  “a startup is a human
  institution designed to
 deliver a new product or
service under conditions
 of extreme uncertainty”
Traditional Product Development
    (Progress: Advance To Next Stage)

                                                 Solution: Known
     Requirements



                    Design



                             Implementation



                                              Verification



                                                             Manteinance



 Problem: Known

            Eric Ries @ http://startuplessonslearned.blogspot.com/
Agile Development
(Progress: Running Tested Features)

                                    Solution: Unknown



quot;Product Ownerquot; or
 in-house customer




Problem: Known

       Eric Ries @ http://startuplessonslearned.blogspot.com/
we should be able to
                 Embrace Change
Cost of Change




                 Traditional Development
                 Agile Development




                                     Time
we should be able to
         Embrace Change
•   Refactoring
•   Simple Design
•   Test-Driven Development
•   Continuous Integration
•   Collective Code Ownership
•   Incremental Design
•   Emergent Design
•   Pair Programming
•   Project Automation
•   Definition of Done
•   Exploratory Testing
We know how
to do it, But...
Do you really
   know what
customers want?
Do you really
think customers
know what they
      need?
Do you think
implementing
   features is
 real progress?
Use of Requested Features

           7%
     13%

                           45%
   16%


           19%




     The biggest source of waste is
implementation of features nobody wants
                 Standish Group, CHAOS Report 2006
They could
   even
hate some
“features”
Steve Blank:
     “software
development is a
  discovery and a
learning process”
Lean Startup Development
(Progress:Validated Learning about Customers)

     Customer Development
                                           Solution: Unknown




    Problem: Unknown
            Eric Ries @ http://startuplessonslearned.blogspot.com/
Agile in a Waterfall world



                 Agile         Test       Maintenance
Concept
              Development   Alpha/Beta   and Marketing




                            Debug, Fix
                            and Patch
Agile in a Waterfall world



                 Agile         Test       Maintenance
Concept
              Development   Alpha/Beta   and Marketing




                            Debug, Fix
                            and Patch
Agile in a Waterfall world



                 Agile         Test       Maintenance
Concept
              Development   Alpha/Beta   and Marketing




                            Debug, Fix
                            and Patch
Lean Startup Development
(Progress:Validated Learning about Customers)

                   IDEAS


                                                        •   Reduce the
LEARN                                        BUILD
                                                             cycle time
               Minimum
                                                        • Eliminate waste
               Marketable
                Feature
                                                        • Optimize the
        DATA                          CODE
                                                               whole
                                                        • Amplify learning
                   MEASURE




                 Eric Ries @ http://startuplessonslearned.blogspot.com/
How can we
  support the
learning process?
Domain Composability:
 the Domain Model
      should be
  extremely flexible
   and “exposed”
web applications
   Information Flow

                  RDB
HTTP
         OOP      MS
Impedance Mismatch
 can slow you down

                  RDB
HTTP
        OOP       MS




Accidental Complexity
Resource Oriented
    Architectures

HTTP     ROA      DATA




 Essential Complexity
Resource Oriented Architectures

 Identify Resources
  in your Domain
Resource Oriented Architectures

      Pawn   Move   Bishop
  Game Player
  Rank
        Board Rook
             File
   Knight
          Position
         Queen    Square
Resource Oriented Architectures
    Design the URIs
      (Ubiquitous
       Language)
Resource Oriented Architectures

  GET /position/wqd3,wkd2,bke8 HTTP/1.1
  Accept: text/plain


  HTTP/1.1 200 OK
  Content-Type: text/plain;format=fen
  n
  5k2/8/8/8/8/3Q4/8/3K4
Resource Oriented Architectures

  GET /position/wqd3,wkd2,bke8 HTTP/1.1
  Accept: image/png;q=0.8, text/plain;q=0.2

  HTTP/1.1 200 OK
  Content-Type: image/png
  n
  PNG...
Resource Oriented Architectures

  GET /board/4815162342 HTTP/1.1

  HTTP/1.1 200 OK
  n
  ...
  /position/wqd3,wkd1,bke7
  /position/wqd3,wkd1,bke8
Resource Oriented Architectures

  POST /board/4815162342 HTTP/1.1
  n
  move = d3-e8

  HTTP/1.1 201 Created
  n
  ...
  /position/wqd3,wkd1,bke8
  /position/wqe8,wkd1,bke8
Resource Oriented Architectures

  GET /game/42 HTTP/1.1

  HTTP/1.1 200 OK
  n
  board = /board/4815162342
  white = /player/50298
  black = /player/48192
Resource Oriented Architectures
          no Web Services
         but how the web
             should be
Resource Oriented Architectures


 Tim Berners-Lee
  on Linked Data
“... almost 20 years ago I wanted to reframe the
way we use informations ... I invented the Word
Wide Web ... now is time for a new reframing...”



                  Tim Berners-Lee @ http://linkeddata.org
Resource Oriented Architectures


   for each Resource
       design the
     Representations
  from and to the Client
Resource Oriented Architectures

  GET /game/42 HTTP/1.1
  Accept: application/xhtml+xml

  <html>
   ... <a rel=”owner” href=”/player/1001”>...</a> ...
   <ul class=”moves”>
     <li><image src=”/position/initial.png”/></li>
   </ul>
  </html>
now we have a
Good Domain
    but an
Ugly Interface
Ajax to rescue
       // Interface can have its state
       // but actually consumes many serverside
       // resources in background

       var game = {
           quot;gamequot;: quot;/game/42quot;,
           quot;boardquot;: quot;/board/4815162342quot;,
           quot;positionquot;: quot;/position/” +
               “rnbqkbnr-pppp1ppp-8-4p3-4P3-8-PPPP1PPP-RNBQKBNRquot;
       }

       var req = YAHOO.util.Connect.asyncRequest;

       req('GET', position + '/piece/g1/moves', callback);
       // 200 OK; moves = g1-e2, g1-f3, g1-h3
       board.highlightSquares(quot;g1quot;, quot;e2quot;, quot;f3quot;, quot;h3quot;);

       req('POST', '/board/4815162342', callback, quot;move=g1-f3quot;);
       // 200 OK; position =
       //    rnbqkbnr-pppp1ppp-8-4p3-4P3-5N2-PPPP1PPP-RNBQKB1R
John Maeda’s
Laws of Simplicity
             Law 3: TIME
 Savings in time feels like simplicity.




           ...ok, we need real-time
                 John Maeda @ http://lawsofsimplicity.com
Comet to rescue
• “Reverse Ajax”
• Push over Pull
• Long-lived HTTP
But which Comet way?
         Transport                                  API
         Long polling                               Socket
         Forever Frame                              Publish/Subscribe
         Script tags                                API based
         WebSockets                                 Data sync
         Htmlfile                                    REST?
         Mime Messaging
         Flash Remoting


Joe Walker @ http://www.slideshare.net/joewalker/comet-and-the-rise-of-highly-interactive-websites-presentation
HTTP Channels
                   is RESTful Comet
                  “The primary purpose of HTTP Channels
Kris Zyp:          is to provide an application-level Comet
                  protocol for live data synchronization that
                 leverages the widely understood semantics
                        and vocabulary of HTTP/REST.”




      Kris Zyp @ http://cometdaily.com/2008/06/05/intended-usage-of-http-channels/
Http Channels 2
POST /channels HTTP/1.1
Accept: application/http
X-Create-Client-Id: 123123


GET /foo HTTP/1.1
Accept: */*
X-Subscribe: *
X-Client-Id: 123123


PUT /foo HTTP/1.1
n
{ data: “foobar” }


HTTP/1.1 200 OK
X-Event: PUT
Content-Location: /foo
 n
{ data: quot;foobarquot; }




                     Kris Zyp @ http://cometdaily.com/2008/05/13/http-channels-2/
Http Channels 3                           X-Client-Id: 123123

                                 POST /board/4815162342 HTTP/1.1
                                 n
                                 move = g1-f3


HTTP/1.1 200 OK
X-Event: POST
Content-Location: /board/4815162342
 n
move = g1-f3




 X-Client-Id: 124124                  X-Client-Id: 125125          X-Client-Id: 126126
How can we
  speed up the
learning process?
Continuous Deployment
reduces the time from
   code check-in to
      production
Continuous Deployment
        Testability
   tells if it’s a good
change or a bad change
 as quickly as possible
Continuous Deployment (testability)


     View             Model



            Control




            HTTP
Continuous Deployment (testability)
     too much code untested

     View             Model



            Control




            HTTP
Continuous Deployment (testability)
     too fragile and unreliable

     View             Model



            Control




            HTTP
Continuous Deployment (testability)
  Ruby with Rspec and Cucumber
             Player
     Board

                Position
        Game

               Move




                           Js
             HTTP
Continuous Deployment (testability)
 Feature: change the position on board

         Scenario: change position with a correct move
             Given board with position wqd3,wkd1,bke8
             When move to position wqd8,wkd1,bke8
             Then response should be 201
             And board should be in position wqd8,wkd1,bke8

         Scenario: change position with a correct move
             Given board with position wqd3,wkd1,bke8
             When move to position wqd7,wkd1,bke8
             Then response should be 403
             And board should be in position wqd3,wkd1,bke8
Continuous Deployment (testability)
Scenario: change position with a correct move
        Given board with position wqd3,wkd1,bke8
        When move to position wqd8,wkd1,bke8
        Then response should be 201
        And board should be in position wqd8,wkd1,bke8




  Given /^board with position (.+?)$/ do | from_position |
   response = @client.post(quot;/boardquot;, quot;position = #{from_position}quot;)
   response.status.should == 201
   @board = response.header[quot;Locationquot;]
  end
Continuous Deployment (testability)
Scenario: change position with a correct move
        Given board with position wqd3,wkd1,bke8
        When move to position wqd8,wkd1,bke8
        Then response should be 201
        And board should be in position wqd8,wkd1,bke8




  When /^move to position (.+?)$/ do | to_position |
   move_reponse = @client.post(@board, quot;position = #{to_position}quot;)
   @move_response_status = move_response.status
  end
Continuous Deployment (testability)
Scenario: change position with a correct move
        Given board with position wqd3,wkd1,bke8
        When move to position wqd8,wkd1,bke8
        Then response should be 201
        And board should be in position wqd8,wkd1,bke8




  Then /^response should be (d{3})$/ do | expected_response_status |
    @move_response_status.should == expected_response_status
  end
Continuous Deployment (testability)
Scenario: change position with a correct move
        Given board with position wqd3,wkd1,bke8
        When move to position wqd8,wkd1,bke8
        Then response should be 201
        And board should be in position wqd8,wkd1,bke8




  Then /^board should be in position (.+?)$/ do | expected_position |
    current_position = @client.get(quot;#{@board}/positionquot;)
    current_position.content.should == expected_position
  end
Continuous Deployment (testability)
 Feature: change the position on board

         Scenario: change position with a correct move
             Given board with position wqd3,wkd1,bke8
             When move to position wqd8,wkd1,bke8
             Then response should be 201
             And board should be in position wqd8,wkd1,bke8

         Scenario: change position with a correct move
             Given board with position wqd3,wkd1,bke8
             When move to position wqd7,wkd1,bke8
             Then response should be 403
             And board should be in position wqd3,wkd1,bke8
Continuous Deployment (testability)
coder@apollo ~/dev/cucumber/features $ cucumber change_position_on_board.feature
Feature: change the position on board

 Scenario: change position with a correct move   # change_position_on_board.feature:3
  Given board with position wqd3,wkd1,bke8       # step_definitions/change_position_on_board_steps.rb:5
  When move to position wqd8,wkd1,bke8           # step_definitions/change_position_on_board_steps.rb:9
  Then response should be 201                    # step_definitions/change_position_on_board_steps.rb:14
  And board should be in position wqd8,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:19

 Scenario: change position with a correct move     # change_position_on_board.feature:9
  Given board with position wqd3,wkd1,bke8         # step_definitions/change_position_on_board_steps.rb:5
  When move to position wqd7,wkd1,bke8             # step_definitions/change_position_on_board_steps.rb:9
  Then response should be 403                      # step_definitions/change_position_on_board_steps.rb:14
  And board should be in position wqd3,wkd1,bke8   # step_definitions/change_position_on_board_steps.rb:19

2 scenarios (2 passed)
8 steps (8 passed)
Continuous Deployment (testability)
       what about the view?

             Player
     Board

                Position
        Game

               Move




                           Js
             HTTP
Continuous Deployment (testability)


                 If i click to drag a
                   piece, does the
                   board highlight
                reachable squares?
Continuous Deployment (testability)


                           We don’t care of
Position on board Model is already
is context (fixture) tested (mock)
// fixture                                            // mock
var piece_square = quot;g1quot;                               var valid_moves_url = quot;/position/quot; + position +
var position =                                                               quot;/piece/quot; + piece_square +
  quot;rnbqkbnr-pppp1ppp-8-4p3-4p3-8-PPPP1PPP-RNBQKBNRquot;                          quot;/movesquot;
                                                      var YAHOO.util.Connection.asyncRequest =
                                                          Chess.test.ServerMock([{
                                                              method: quot;GETquot;,
                                                              url: valid_moves_url,
                                                              response: {
                                                                  code: 200
                                                                  body: quot;moves = g1-e2, g1-f3, g1-h3quot;
                                                              }
                                                          }])
Continuous Deployment (testability)
        new YAHOO.tool.TestCase({
            name : quot;testMovequot;,

            setUp: function() {
                this.board = Chess.board();
                this.board.setupPosition(position);
                this.board.render(quot;mydivquot;);
            },
            tearDown: function() {
                this.board.destroy();
            }

            test_highlightReachableSquares: function() {
                var whiteKnight = this.board.pieceElementAt(piece_square);
                YAHOO.util.UserAction.mousedown(whiteKnight);

                this.wait(function(){
                    // for each g1, e2, f3, h3
                    YAHOO.util.Assert.isTrue(
                        YAHOO.util.Dom.hasClass(
                            this.board.squareElementAt(quot;g1quot;), quot;highlightquot;
                        );
                    );
                }, 500);
            }
        }
Erlang
the secret weapon
Continuous Deployment (testability)

no assignment but Pattern Matching
 1> X.
 * 1: variable 'X' is unbound

 2> X = 5.
 5

 3> X.
 5

 4> X = 6.
 ** exception error: no match of right hand side value 6
Continuous Deployment (testability)


Referentially Transparent:
   if a function can be
 replaced with its value
 without changing the
         program
Continuous Deployment (testability)

the function behavior is
defined purely in terms
of its input parameters
    and return value.
Continuous Deployment (testability)


    no
 Las Vegas
  effect!
Continuous Deployment (scalability)

  processes in Erlang are very cheap
 1> processes:profileSpawnFor(1000).
 Spawned 1000 processes in 10 (4) milliseconds
 ok

 2> processes:profileSpawnFor(10000).
 Spawned 10000 processes in 96 (40) milliseconds
 ok

 3> processes:profileSpawnFor(100000).
 Spawned 100000 processes in 884 (510) milliseconds
 ok
Continuous Deployment (scalability)
profileSpawnFor(Number) ->
 Processes = for(1, Number, fun() ->
   spawn(fun() -> wait() end)
 end),
 lists:foreach(fun(Pid) ->
   Pid ! die
 end, Processes).

wait() ->
 receive
  die -> void
 end.
Continuous Deployment (scalability)
factorials(Numbers) ->
 map(fun(Number) ->
  factorial(Number)
 end, Numbers).
Continuous Deployment (scalability)
factorials(Numbers) ->
 map(fun(Number) ->
  factorial(Number)
 end, Numbers).


factorials(Numbers) ->

 pmap(fun(Number) ->     Distributed on
  factorial(Number)
                          20 different
                           processes
 end, Numbers,   20).
Continuous Deployment (scalability)
factorials(Numbers) ->
 map(fun(Number) ->
  factorial(Number)
 end, Numbers).             Distributed on 20
                         different processes for
factorials(Numbers) ->    each available nodes
                              on the cluster
 pmap(fun(Number) ->
  factorial(Number)

 end, Numbers,   20, nodes()).
Continuous Deployment (hot-swap)
player:authorize(Request, Context).      code to update

1> c(“/home/coder/upload/player.erl”).      compile
2> code:load_file(player).                   and load

player:authorize(Request, Context).      code updated
                                            without
                                           down-time
Continuous Deployment (hot-swap)
deploy(File) ->
 { ok, Module, Binary } = compile:file(File),
 foreach(fun(Node) ->
   rpc:call(Node, code, load_binary,
     [ Module, File, Binary ]
   )
   end, nodes()).               compile and deploy on
                                  every node in the
                                       cluster
Conclusion
We want to
 create products
that really satisfy
  our customers
... so we need
    a product
  development
  methodology
... so we need
     a product
implementation
   methodology
... so we need
   appropriate
technologies and
      practices
We better
get ready
because...
at the end of the day
 customer’s happiness
is the only thing that
       matters

Más contenido relacionado

La actualidad más candente

Continuous deployment
Continuous deploymentContinuous deployment
Continuous deploymentDaniel
 
Java magazine from big data to insights
Java magazine from big data to insightsJava magazine from big data to insights
Java magazine from big data to insightsmustafa sarac
 
JAVA Magazine Sep-Oct 2013
JAVA Magazine Sep-Oct 2013JAVA Magazine Sep-Oct 2013
JAVA Magazine Sep-Oct 2013Erik Gur
 
Don't screw it up: how to build durable web apis
Don't screw it up: how to build durable web apisDon't screw it up: how to build durable web apis
Don't screw it up: how to build durable web apisAlessandro Cinelli (cirpo)
 
JAVA Magazine Nov-Dec 2013
JAVA Magazine Nov-Dec 2013JAVA Magazine Nov-Dec 2013
JAVA Magazine Nov-Dec 2013Erik Gur
 
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...MeasureWorks
 
Javamagazine Julio-Agosto 2013
Javamagazine Julio-Agosto 2013Javamagazine Julio-Agosto 2013
Javamagazine Julio-Agosto 2013Erik Gur
 
Introduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on RailsIntroduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on Railspmatsinopoulos
 
JIRA Studio: Development in the Cloud - Atlassian Summit 2010
JIRA Studio: Development in the Cloud - Atlassian Summit 2010JIRA Studio: Development in the Cloud - Atlassian Summit 2010
JIRA Studio: Development in the Cloud - Atlassian Summit 2010Atlassian
 
Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016
Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016
Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016Erik Gur
 
How We Build Features
How We Build FeaturesHow We Build Features
How We Build FeaturesAsh Maurya
 
Javamagazine Mayo Junio 2013
Javamagazine Mayo Junio 2013Javamagazine Mayo Junio 2013
Javamagazine Mayo Junio 2013Erik Gur
 
JavaMagazine - Java SE 8 - 2014-03-04
JavaMagazine - Java SE 8 - 2014-03-04JavaMagazine - Java SE 8 - 2014-03-04
JavaMagazine - Java SE 8 - 2014-03-04Erik Gur
 
Java Magazine Enterprise July/August 2016
Java Magazine Enterprise  July/August 2016Java Magazine Enterprise  July/August 2016
Java Magazine Enterprise July/August 2016Erik Gur
 
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...0xdaryl
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionDave Olsen
 
Stripes RJUG March 2012
Stripes RJUG March 2012Stripes RJUG March 2012
Stripes RJUG March 2012timstone
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous DeploymentBrian Moon
 
State And Ajax Zend Con
State And Ajax   Zend ConState And Ajax   Zend Con
State And Ajax Zend ConZendCon
 

La actualidad más candente (20)

Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
 
Java magazine from big data to insights
Java magazine from big data to insightsJava magazine from big data to insights
Java magazine from big data to insights
 
JAVA Magazine Sep-Oct 2013
JAVA Magazine Sep-Oct 2013JAVA Magazine Sep-Oct 2013
JAVA Magazine Sep-Oct 2013
 
Don't screw it up: how to build durable web apis
Don't screw it up: how to build durable web apisDon't screw it up: how to build durable web apis
Don't screw it up: how to build durable web apis
 
JAVA Magazine Nov-Dec 2013
JAVA Magazine Nov-Dec 2013JAVA Magazine Nov-Dec 2013
JAVA Magazine Nov-Dec 2013
 
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
 
Javamagazine Julio-Agosto 2013
Javamagazine Julio-Agosto 2013Javamagazine Julio-Agosto 2013
Javamagazine Julio-Agosto 2013
 
Introduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on RailsIntroduction to Web Development with Ruby on Rails
Introduction to Web Development with Ruby on Rails
 
JIRA Studio: Development in the Cloud - Atlassian Summit 2010
JIRA Studio: Development in the Cloud - Atlassian Summit 2010JIRA Studio: Development in the Cloud - Atlassian Summit 2010
JIRA Studio: Development in the Cloud - Atlassian Summit 2010
 
Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016
Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016
Java Magazine JUNIT5 NOVEMBER/DECEMBER 2016
 
Ash sxsw
Ash sxswAsh sxsw
Ash sxsw
 
How We Build Features
How We Build FeaturesHow We Build Features
How We Build Features
 
Javamagazine Mayo Junio 2013
Javamagazine Mayo Junio 2013Javamagazine Mayo Junio 2013
Javamagazine Mayo Junio 2013
 
JavaMagazine - Java SE 8 - 2014-03-04
JavaMagazine - Java SE 8 - 2014-03-04JavaMagazine - Java SE 8 - 2014-03-04
JavaMagazine - Java SE 8 - 2014-03-04
 
Java Magazine Enterprise July/August 2016
Java Magazine Enterprise  July/August 2016Java Magazine Enterprise  July/August 2016
Java Magazine Enterprise July/August 2016
 
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas Version
 
Stripes RJUG March 2012
Stripes RJUG March 2012Stripes RJUG March 2012
Stripes RJUG March 2012
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
 
State And Ajax Zend Con
State And Ajax   Zend ConState And Ajax   Zend Con
State And Ajax Zend Con
 

Similar a Sustainable Agile Development

GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScalePatrick Chanezon
 
Entrepreneurship3
Entrepreneurship3Entrepreneurship3
Entrepreneurship3Yenwen Feng
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWebDave Bouwman
 
Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?cornelia davis
 
Flavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. Unconference
Flavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. UnconferenceFlavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. Unconference
Flavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. UnconferenceMozaic Works
 
Big rewrites without big risks
Big rewrites without big risksBig rewrites without big risks
Big rewrites without big risksFlavius Stef
 
DCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization StrategyDCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization StrategyDocker, Inc.
 
DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy  DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy Docker, Inc.
 
Dojo 1.0: Great Experiences For Everyone
Dojo 1.0: Great Experiences For EveryoneDojo 1.0: Great Experiences For Everyone
Dojo 1.0: Great Experiences For Everyoneslightlyoff
 

Similar a Sustainable Agile Development (20)

GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 
Entrepreneurship3
Entrepreneurship3Entrepreneurship3
Entrepreneurship3
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Delphix2
Delphix2Delphix2
Delphix2
 
Delphix2
Delphix2Delphix2
Delphix2
 
Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?Velocity NY 2016 - Devops: Who Does What?
Velocity NY 2016 - Devops: Who Does What?
 
Flavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. Unconference
Flavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. UnconferenceFlavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. Unconference
Flavius Ștef: Big Rewrites Without Big Risks at I T.A.K.E. Unconference
 
Big rewrites without big risks
Big rewrites without big risksBig rewrites without big risks
Big rewrites without big risks
 
Delphix
DelphixDelphix
Delphix
 
DCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization StrategyDCEU 18: How To Build Your Containerization Strategy
DCEU 18: How To Build Your Containerization Strategy
 
DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy  DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Delphix
DelphixDelphix
Delphix
 
Dojo 1.0: Great Experiences For Everyone
Dojo 1.0: Great Experiences For EveryoneDojo 1.0: Great Experiences For Everyone
Dojo 1.0: Great Experiences For Everyone
 

Más de Gabriele Lana

Microservice Architectures
Microservice ArchitecturesMicroservice Architectures
Microservice ArchitecturesGabriele Lana
 
Professional Programmer 2018
Professional Programmer 2018Professional Programmer 2018
Professional Programmer 2018Gabriele Lana
 
Parse Everything With Elixir
Parse Everything With ElixirParse Everything With Elixir
Parse Everything With ElixirGabriele Lana
 
Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Gabriele Lana
 
Resource Oriented Design
Resource Oriented DesignResource Oriented Design
Resource Oriented DesignGabriele Lana
 
Agileday Coderetreat 2013
Agileday Coderetreat 2013Agileday Coderetreat 2013
Agileday Coderetreat 2013Gabriele Lana
 
Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013Gabriele Lana
 
Minimum Viable Product
Minimum Viable ProductMinimum Viable Product
Minimum Viable ProductGabriele Lana
 
Professional Programmer
Professional ProgrammerProfessional Programmer
Professional ProgrammerGabriele Lana
 
It is not supposed to fly but it does
It is not supposed to fly but it doesIt is not supposed to fly but it does
It is not supposed to fly but it doesGabriele Lana
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to NodejsGabriele Lana
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with ExamplesGabriele Lana
 

Más de Gabriele Lana (20)

Microservice Architectures
Microservice ArchitecturesMicroservice Architectures
Microservice Architectures
 
Professional Programmer 2018
Professional Programmer 2018Professional Programmer 2018
Professional Programmer 2018
 
Beyond Phoenix
Beyond PhoenixBeyond Phoenix
Beyond Phoenix
 
Parse Everything With Elixir
Parse Everything With ElixirParse Everything With Elixir
Parse Everything With Elixir
 
The Magic Of Elixir
The Magic Of ElixirThe Magic Of Elixir
The Magic Of Elixir
 
Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)Professional Programmer (3 Years Later)
Professional Programmer (3 Years Later)
 
Resource Oriented Design
Resource Oriented DesignResource Oriented Design
Resource Oriented Design
 
Agileday Coderetreat 2013
Agileday Coderetreat 2013Agileday Coderetreat 2013
Agileday Coderetreat 2013
 
Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013Milano Legacy Coderetreat 2013
Milano Legacy Coderetreat 2013
 
Minimum Viable Product
Minimum Viable ProductMinimum Viable Product
Minimum Viable Product
 
API Over HTTP
API Over HTTPAPI Over HTTP
API Over HTTP
 
coderetreat
coderetreatcoderetreat
coderetreat
 
Professional Programmer
Professional ProgrammerProfessional Programmer
Professional Programmer
 
It is not supposed to fly but it does
It is not supposed to fly but it doesIt is not supposed to fly but it does
It is not supposed to fly but it does
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
 
MongoDB With Style
MongoDB With StyleMongoDB With Style
MongoDB With Style
 
Nosql
NosqlNosql
Nosql
 
Magic of Ruby
Magic of RubyMagic of Ruby
Magic of Ruby
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
 
Why couchdb is cool
Why couchdb is coolWhy couchdb is cool
Why couchdb is cool
 

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Sustainable Agile Development

  • 1. Sustainable Agile Development a case study with chess gabriele.lana@gmail.com federico.galassi@gmail.com
  • 3. We want to make it work
  • 4. We know that Agile works in a corporate world
  • 5. Can Agile work for us/you too?
  • 6. Eric Ries: “a startup is a human institution designed to deliver a new product or service under conditions of extreme uncertainty”
  • 7. Traditional Product Development (Progress: Advance To Next Stage) Solution: Known Requirements Design Implementation Verification Manteinance Problem: Known Eric Ries @ http://startuplessonslearned.blogspot.com/
  • 8. Agile Development (Progress: Running Tested Features) Solution: Unknown quot;Product Ownerquot; or in-house customer Problem: Known Eric Ries @ http://startuplessonslearned.blogspot.com/
  • 9. we should be able to Embrace Change Cost of Change Traditional Development Agile Development Time
  • 10. we should be able to Embrace Change • Refactoring • Simple Design • Test-Driven Development • Continuous Integration • Collective Code Ownership • Incremental Design • Emergent Design • Pair Programming • Project Automation • Definition of Done • Exploratory Testing
  • 11. We know how to do it, But...
  • 12. Do you really know what customers want?
  • 13. Do you really think customers know what they need?
  • 14. Do you think implementing features is real progress?
  • 15. Use of Requested Features 7% 13% 45% 16% 19% The biggest source of waste is implementation of features nobody wants Standish Group, CHAOS Report 2006
  • 16. They could even hate some “features”
  • 17. Steve Blank: “software development is a discovery and a learning process”
  • 18. Lean Startup Development (Progress:Validated Learning about Customers) Customer Development Solution: Unknown Problem: Unknown Eric Ries @ http://startuplessonslearned.blogspot.com/
  • 19. Agile in a Waterfall world Agile Test Maintenance Concept Development Alpha/Beta and Marketing Debug, Fix and Patch
  • 20. Agile in a Waterfall world Agile Test Maintenance Concept Development Alpha/Beta and Marketing Debug, Fix and Patch
  • 21. Agile in a Waterfall world Agile Test Maintenance Concept Development Alpha/Beta and Marketing Debug, Fix and Patch
  • 22. Lean Startup Development (Progress:Validated Learning about Customers) IDEAS • Reduce the LEARN BUILD cycle time Minimum • Eliminate waste Marketable Feature • Optimize the DATA CODE whole • Amplify learning MEASURE Eric Ries @ http://startuplessonslearned.blogspot.com/
  • 23. How can we support the learning process?
  • 24. Domain Composability: the Domain Model should be extremely flexible and “exposed”
  • 25. web applications Information Flow RDB HTTP OOP MS
  • 26. Impedance Mismatch can slow you down RDB HTTP OOP MS Accidental Complexity
  • 27. Resource Oriented Architectures HTTP ROA DATA Essential Complexity
  • 28. Resource Oriented Architectures Identify Resources in your Domain
  • 29. Resource Oriented Architectures Pawn Move Bishop Game Player Rank Board Rook File Knight Position Queen Square
  • 30. Resource Oriented Architectures Design the URIs (Ubiquitous Language)
  • 31. Resource Oriented Architectures GET /position/wqd3,wkd2,bke8 HTTP/1.1 Accept: text/plain HTTP/1.1 200 OK Content-Type: text/plain;format=fen n 5k2/8/8/8/8/3Q4/8/3K4
  • 32. Resource Oriented Architectures GET /position/wqd3,wkd2,bke8 HTTP/1.1 Accept: image/png;q=0.8, text/plain;q=0.2 HTTP/1.1 200 OK Content-Type: image/png n PNG...
  • 33. Resource Oriented Architectures GET /board/4815162342 HTTP/1.1 HTTP/1.1 200 OK n ... /position/wqd3,wkd1,bke7 /position/wqd3,wkd1,bke8
  • 34. Resource Oriented Architectures POST /board/4815162342 HTTP/1.1 n move = d3-e8 HTTP/1.1 201 Created n ... /position/wqd3,wkd1,bke8 /position/wqe8,wkd1,bke8
  • 35. Resource Oriented Architectures GET /game/42 HTTP/1.1 HTTP/1.1 200 OK n board = /board/4815162342 white = /player/50298 black = /player/48192
  • 36. Resource Oriented Architectures no Web Services but how the web should be
  • 37. Resource Oriented Architectures Tim Berners-Lee on Linked Data “... almost 20 years ago I wanted to reframe the way we use informations ... I invented the Word Wide Web ... now is time for a new reframing...” Tim Berners-Lee @ http://linkeddata.org
  • 38. Resource Oriented Architectures for each Resource design the Representations from and to the Client
  • 39. Resource Oriented Architectures GET /game/42 HTTP/1.1 Accept: application/xhtml+xml <html> ... <a rel=”owner” href=”/player/1001”>...</a> ... <ul class=”moves”> <li><image src=”/position/initial.png”/></li> </ul> </html>
  • 40. now we have a Good Domain but an Ugly Interface
  • 41. Ajax to rescue // Interface can have its state // but actually consumes many serverside // resources in background var game = { quot;gamequot;: quot;/game/42quot;, quot;boardquot;: quot;/board/4815162342quot;, quot;positionquot;: quot;/position/” + “rnbqkbnr-pppp1ppp-8-4p3-4P3-8-PPPP1PPP-RNBQKBNRquot; } var req = YAHOO.util.Connect.asyncRequest; req('GET', position + '/piece/g1/moves', callback); // 200 OK; moves = g1-e2, g1-f3, g1-h3 board.highlightSquares(quot;g1quot;, quot;e2quot;, quot;f3quot;, quot;h3quot;); req('POST', '/board/4815162342', callback, quot;move=g1-f3quot;); // 200 OK; position = // rnbqkbnr-pppp1ppp-8-4p3-4P3-5N2-PPPP1PPP-RNBQKB1R
  • 42. John Maeda’s Laws of Simplicity Law 3: TIME Savings in time feels like simplicity. ...ok, we need real-time John Maeda @ http://lawsofsimplicity.com
  • 43. Comet to rescue • “Reverse Ajax” • Push over Pull • Long-lived HTTP
  • 44. But which Comet way? Transport API Long polling Socket Forever Frame Publish/Subscribe Script tags API based WebSockets Data sync Htmlfile REST? Mime Messaging Flash Remoting Joe Walker @ http://www.slideshare.net/joewalker/comet-and-the-rise-of-highly-interactive-websites-presentation
  • 45. HTTP Channels is RESTful Comet “The primary purpose of HTTP Channels Kris Zyp: is to provide an application-level Comet protocol for live data synchronization that leverages the widely understood semantics and vocabulary of HTTP/REST.” Kris Zyp @ http://cometdaily.com/2008/06/05/intended-usage-of-http-channels/
  • 46. Http Channels 2 POST /channels HTTP/1.1 Accept: application/http X-Create-Client-Id: 123123 GET /foo HTTP/1.1 Accept: */* X-Subscribe: * X-Client-Id: 123123 PUT /foo HTTP/1.1 n { data: “foobar” } HTTP/1.1 200 OK X-Event: PUT Content-Location: /foo  n { data: quot;foobarquot; } Kris Zyp @ http://cometdaily.com/2008/05/13/http-channels-2/
  • 47. Http Channels 3 X-Client-Id: 123123 POST /board/4815162342 HTTP/1.1 n move = g1-f3 HTTP/1.1 200 OK X-Event: POST Content-Location: /board/4815162342  n move = g1-f3 X-Client-Id: 124124 X-Client-Id: 125125 X-Client-Id: 126126
  • 48. How can we speed up the learning process?
  • 49. Continuous Deployment reduces the time from code check-in to production
  • 50. Continuous Deployment Testability tells if it’s a good change or a bad change as quickly as possible
  • 51. Continuous Deployment (testability) View Model Control HTTP
  • 52. Continuous Deployment (testability) too much code untested View Model Control HTTP
  • 53. Continuous Deployment (testability) too fragile and unreliable View Model Control HTTP
  • 54. Continuous Deployment (testability) Ruby with Rspec and Cucumber Player Board Position Game Move Js HTTP
  • 55. Continuous Deployment (testability) Feature: change the position on board Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd8,wkd1,bke8 Then response should be 201 And board should be in position wqd8,wkd1,bke8 Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd7,wkd1,bke8 Then response should be 403 And board should be in position wqd3,wkd1,bke8
  • 56. Continuous Deployment (testability) Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd8,wkd1,bke8 Then response should be 201 And board should be in position wqd8,wkd1,bke8 Given /^board with position (.+?)$/ do | from_position | response = @client.post(quot;/boardquot;, quot;position = #{from_position}quot;) response.status.should == 201 @board = response.header[quot;Locationquot;] end
  • 57. Continuous Deployment (testability) Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd8,wkd1,bke8 Then response should be 201 And board should be in position wqd8,wkd1,bke8 When /^move to position (.+?)$/ do | to_position | move_reponse = @client.post(@board, quot;position = #{to_position}quot;) @move_response_status = move_response.status end
  • 58. Continuous Deployment (testability) Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd8,wkd1,bke8 Then response should be 201 And board should be in position wqd8,wkd1,bke8 Then /^response should be (d{3})$/ do | expected_response_status | @move_response_status.should == expected_response_status end
  • 59. Continuous Deployment (testability) Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd8,wkd1,bke8 Then response should be 201 And board should be in position wqd8,wkd1,bke8 Then /^board should be in position (.+?)$/ do | expected_position | current_position = @client.get(quot;#{@board}/positionquot;) current_position.content.should == expected_position end
  • 60. Continuous Deployment (testability) Feature: change the position on board Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd8,wkd1,bke8 Then response should be 201 And board should be in position wqd8,wkd1,bke8 Scenario: change position with a correct move Given board with position wqd3,wkd1,bke8 When move to position wqd7,wkd1,bke8 Then response should be 403 And board should be in position wqd3,wkd1,bke8
  • 61. Continuous Deployment (testability) coder@apollo ~/dev/cucumber/features $ cucumber change_position_on_board.feature Feature: change the position on board Scenario: change position with a correct move # change_position_on_board.feature:3 Given board with position wqd3,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:5 When move to position wqd8,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:9 Then response should be 201 # step_definitions/change_position_on_board_steps.rb:14 And board should be in position wqd8,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:19 Scenario: change position with a correct move # change_position_on_board.feature:9 Given board with position wqd3,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:5 When move to position wqd7,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:9 Then response should be 403 # step_definitions/change_position_on_board_steps.rb:14 And board should be in position wqd3,wkd1,bke8 # step_definitions/change_position_on_board_steps.rb:19 2 scenarios (2 passed) 8 steps (8 passed)
  • 62. Continuous Deployment (testability) what about the view? Player Board Position Game Move Js HTTP
  • 63. Continuous Deployment (testability) If i click to drag a piece, does the board highlight reachable squares?
  • 64. Continuous Deployment (testability) We don’t care of Position on board Model is already is context (fixture) tested (mock) // fixture // mock var piece_square = quot;g1quot; var valid_moves_url = quot;/position/quot; + position + var position = quot;/piece/quot; + piece_square + quot;rnbqkbnr-pppp1ppp-8-4p3-4p3-8-PPPP1PPP-RNBQKBNRquot; quot;/movesquot; var YAHOO.util.Connection.asyncRequest = Chess.test.ServerMock([{ method: quot;GETquot;, url: valid_moves_url, response: { code: 200 body: quot;moves = g1-e2, g1-f3, g1-h3quot; } }])
  • 65. Continuous Deployment (testability) new YAHOO.tool.TestCase({ name : quot;testMovequot;, setUp: function() { this.board = Chess.board(); this.board.setupPosition(position); this.board.render(quot;mydivquot;); }, tearDown: function() { this.board.destroy(); } test_highlightReachableSquares: function() { var whiteKnight = this.board.pieceElementAt(piece_square); YAHOO.util.UserAction.mousedown(whiteKnight); this.wait(function(){ // for each g1, e2, f3, h3 YAHOO.util.Assert.isTrue( YAHOO.util.Dom.hasClass( this.board.squareElementAt(quot;g1quot;), quot;highlightquot; ); ); }, 500); } }
  • 67. Continuous Deployment (testability) no assignment but Pattern Matching 1> X. * 1: variable 'X' is unbound 2> X = 5. 5 3> X. 5 4> X = 6. ** exception error: no match of right hand side value 6
  • 68. Continuous Deployment (testability) Referentially Transparent: if a function can be replaced with its value without changing the program
  • 69. Continuous Deployment (testability) the function behavior is defined purely in terms of its input parameters and return value.
  • 70. Continuous Deployment (testability) no Las Vegas effect!
  • 71. Continuous Deployment (scalability) processes in Erlang are very cheap 1> processes:profileSpawnFor(1000). Spawned 1000 processes in 10 (4) milliseconds ok 2> processes:profileSpawnFor(10000). Spawned 10000 processes in 96 (40) milliseconds ok 3> processes:profileSpawnFor(100000). Spawned 100000 processes in 884 (510) milliseconds ok
  • 72. Continuous Deployment (scalability) profileSpawnFor(Number) -> Processes = for(1, Number, fun() -> spawn(fun() -> wait() end) end), lists:foreach(fun(Pid) -> Pid ! die end, Processes). wait() -> receive die -> void end.
  • 73. Continuous Deployment (scalability) factorials(Numbers) -> map(fun(Number) -> factorial(Number) end, Numbers).
  • 74. Continuous Deployment (scalability) factorials(Numbers) -> map(fun(Number) -> factorial(Number) end, Numbers). factorials(Numbers) -> pmap(fun(Number) -> Distributed on factorial(Number) 20 different processes end, Numbers, 20).
  • 75. Continuous Deployment (scalability) factorials(Numbers) -> map(fun(Number) -> factorial(Number) end, Numbers). Distributed on 20 different processes for factorials(Numbers) -> each available nodes on the cluster pmap(fun(Number) -> factorial(Number) end, Numbers, 20, nodes()).
  • 76. Continuous Deployment (hot-swap) player:authorize(Request, Context). code to update 1> c(“/home/coder/upload/player.erl”). compile 2> code:load_file(player). and load player:authorize(Request, Context). code updated without down-time
  • 77. Continuous Deployment (hot-swap) deploy(File) -> { ok, Module, Binary } = compile:file(File), foreach(fun(Node) -> rpc:call(Node, code, load_binary, [ Module, File, Binary ] ) end, nodes()). compile and deploy on every node in the cluster
  • 79. We want to create products that really satisfy our customers
  • 80. ... so we need a product development methodology
  • 81. ... so we need a product implementation methodology
  • 82. ... so we need appropriate technologies and practices
  • 84. at the end of the day customer’s happiness is the only thing that matters