SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
cgi programs
rise from ash then burn again
upon each request
Continuity
A continuation based web application
            library for perl.


   Brock Wilcox (awwaiid@thelackthereof.org)

        Pittsburgh Perl Workshop 2007

           http://continuity.tlt42.org/
Talk Overview
●   Traditional Web Apps
●   Continuation Based Web Apps
●   Seaside
●   Continuity
Memento
Memento
●   Do an action
●   What did I just do? Ask the requestor
●   What did I just do? Look for a sticky note
    (cookie)
CGI Applications
●   Restart on each request
●   Start with a switch statement
●   GOTO based on input
●   Control flow logic spread out
●   Switch statement is state machine
Run Lola Run
Run Lola Run
●   Capture a moment in time
●   Put it in a variable
●   Execute it later
●   Execute it again?
●   Welcome to Continuations
Continuation Conshminuation
●   Program state in a variable
    –   Not just data! Control flow too!
●   One-shot vs Multi-shot
●   Coroutines
●   Cooperative Multithreading
Continuations in Web Apps
●   Don't restart app
●   Continue on source next line
●   Keep program state (local vars)
●   Centralize control flow logic
Other Efforts
●   ViaWeb (Lisp, Paul Grahm 1999)
●   Seaside (Smalltalk)
●   UnCommon Web, SISCweb (Scheme)
●   RIFE (Java)
●   ... AJAX Turns Things Inside Out Too ...
Seaside
Overview of Seaside
●   Continuations
●   No templates
●   Components
●   Generated HTML with callbacks
Seaside Demo
●   Counter example
●   Halos
●   In-page code browser
●   Inline link-press callbacks
This is

SWEET
I want this in

 Perl
Continuations in Perl5
●   Nothing built-in
●   High-level trickery (Contize)
●   Low-level trickery (Coro)
●   Other trickery?
●   use v6;
use Coro;
Coro
●   Written by Marc Lehmann
●   Coroutines for Perl
●   Saves
    –   callchain
    –   lexical variables
    –   @_ $_ $@ $/
    –   C stack
●   Effectively one-shot continuations
●   Plus other goodies!
Continuity
Continuity
●   Keep a list of continuations
●   Accept incoming HTTP requests
●   Map to a continuation
●   Repeat
Continuity Design
●   Library Not Framework
●   Unobtrusive
●   TMTOWTDI
●   Foundation for higher abstraction
●   Modular
    –   Plugable Adaptors: HttpDaemon, FastCGI, ...
    –   Session Mapper
What is it Good For
●   High interaction
●   Shared state - games
●   Command line conversions
●   Clean, organized code
Continuation Mapping
●   Incoming request to continuation
    –   Cookie
    –   IP
    –   Path
    –   Query
●   Path + Cookie is fun
●   Query is my favorite
Counter Example
●   Demonstrates:
    –   Server setup
    –   Cookie sessions
    –   Query sessions
    –   Parameters
    –   Input loop
    –   Subroutines if we make a prompt
Chat Example
●   Demonstrates
    –   All things as Counter Example
    –   AJAX and COMET
    –   Multi-Continuation Sessions
Issues
●   Back Button
●   Bookmarks
●   Security
●   Scalability
Back Buttons and Bookmarks
●   URLs should be pretty
●   Many techniques to choose from
●   Continuity doesn't decide for you
●   Seaside mostly gives up, uses Request ID
Detect the Back Button
●   Send a unique Request ID
●   Duplicates imply Back, Reload, or Fork
●   Set flag, raise exception, ignore
Bookmarks
●   Bring back the CASE statement
●   Goto the right spot :)
●   Continue from there
●   URLs for major parts of application
Security
●   Easy to centralize Input and Output
●   Guessing a ContinuationID is bad
Scalability
●   Difficult to scale?
●   Serve dynamic data (not static stuff)
●   Session Affinity
●   Don't fix it if it ain't broke
Advanced Techniques
●   Subref callbacks
●   Multiple continuations per session
●   Event.pm timers and watchers
Future Work
●   Get people using it
●   Feedback!
Future Work
●   High-level layer(s) on top
●   Continuity + Moose + DBIx::Class
●   Steal from Seaside
●   Steal from Magritte
●   Steal from everyone
Future Work
●   Easy DBI interface
    –   Coro::Util::eval_fork
●   Other languages, keep similar minimal
    API
Get it on CPAN.
The End

Weitere ähnliche Inhalte

Was ist angesagt?

Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorialoscon2007
 
Hands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestHands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestPatrick Meenan
 
Indexing BackPAN
Indexing BackPANIndexing BackPAN
Indexing BackPANbrian d foy
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...VMware Tanzu
 
BackPAN Archeology
BackPAN ArcheologyBackPAN Archeology
BackPAN Archeologybrian d foy
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perlnohuhu
 
MyCPAN ( LA.pm, September 2007 )
MyCPAN ( LA.pm, September 2007 )MyCPAN ( LA.pm, September 2007 )
MyCPAN ( LA.pm, September 2007 )brian d foy
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...VMware Tanzu
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppLailani Fitria
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptnohuhu
 
The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)danwrong
 
The Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With RubyThe Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With Rubymattmatt
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsersjeresig
 
JAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronizedJAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronizedjazoon13
 
All Aboard The Stateful Train
All Aboard The Stateful TrainAll Aboard The Stateful Train
All Aboard The Stateful TrainSmartLogic
 
Brief Introduction to Concurrent Programming
Brief Introduction to Concurrent ProgrammingBrief Introduction to Concurrent Programming
Brief Introduction to Concurrent ProgrammingRob Keefer
 
Varnish to the rescue
Varnish to the rescueVarnish to the rescue
Varnish to the rescueleafnode
 
Asynchronous Processing with Ruby on Rails (RailsConf 2008)
Asynchronous Processing with Ruby on Rails (RailsConf 2008)Asynchronous Processing with Ruby on Rails (RailsConf 2008)
Asynchronous Processing with Ruby on Rails (RailsConf 2008)Jonathan Dahl
 

Was ist angesagt? (20)

Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
Ruby и TestComplete
Ruby и TestCompleteRuby и TestComplete
Ruby и TestComplete
 
Hands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestHands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetest
 
Indexing BackPAN
Indexing BackPANIndexing BackPAN
Indexing BackPAN
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
 
BackPAN Archeology
BackPAN ArcheologyBackPAN Archeology
BackPAN Archeology
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
 
MyCPAN ( LA.pm, September 2007 )
MyCPAN ( LA.pm, September 2007 )MyCPAN ( LA.pm, September 2007 )
MyCPAN ( LA.pm, September 2007 )
 
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
Benefits of Reactive Programming with Reactor and Spring Boot 2 - Violeta Geo...
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xampp
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScript
 
Reintroducing Web Technology
Reintroducing Web TechnologyReintroducing Web Technology
Reintroducing Web Technology
 
The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)
 
The Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With RubyThe Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With Ruby
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
 
JAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronizedJAZOON'13 - Andrej Vckovski - Go synchronized
JAZOON'13 - Andrej Vckovski - Go synchronized
 
All Aboard The Stateful Train
All Aboard The Stateful TrainAll Aboard The Stateful Train
All Aboard The Stateful Train
 
Brief Introduction to Concurrent Programming
Brief Introduction to Concurrent ProgrammingBrief Introduction to Concurrent Programming
Brief Introduction to Concurrent Programming
 
Varnish to the rescue
Varnish to the rescueVarnish to the rescue
Varnish to the rescue
 
Asynchronous Processing with Ruby on Rails (RailsConf 2008)
Asynchronous Processing with Ruby on Rails (RailsConf 2008)Asynchronous Processing with Ruby on Rails (RailsConf 2008)
Asynchronous Processing with Ruby on Rails (RailsConf 2008)
 

Andere mochten auch

Andere mochten auch (14)

Consumer Math Slides October 15, 2007
Consumer Math Slides October 15, 2007Consumer Math Slides October 15, 2007
Consumer Math Slides October 15, 2007
 
Felicitació
FelicitacióFelicitació
Felicitació
 
Etichette per costruire significato
Etichette per costruire significatoEtichette per costruire significato
Etichette per costruire significato
 
Slides Elearning Plenary 1
Slides Elearning Plenary 1Slides Elearning Plenary 1
Slides Elearning Plenary 1
 
Como Los Arboles Sil
Como Los Arboles SilComo Los Arboles Sil
Como Los Arboles Sil
 
Imbus
ImbusImbus
Imbus
 
math lesson
math lessonmath lesson
math lesson
 
Encuadre Primer Bimestre
Encuadre Primer BimestreEncuadre Primer Bimestre
Encuadre Primer Bimestre
 
Realmachupicchu
RealmachupicchuRealmachupicchu
Realmachupicchu
 
Presentazione E Lis
Presentazione E LisPresentazione E Lis
Presentazione E Lis
 
Cell Organelles Complete 2
Cell Organelles Complete 2Cell Organelles Complete 2
Cell Organelles Complete 2
 
Exercici 3
Exercici 3Exercici 3
Exercici 3
 
Precentacion Compo
Precentacion CompoPrecentacion Compo
Precentacion Compo
 
Tema 1
Tema 1Tema 1
Tema 1
 

Ähnlich wie PPW2007 - Continuity Project

iPhone Development For Experienced Web Developers
iPhone Development For Experienced Web DevelopersiPhone Development For Experienced Web Developers
iPhone Development For Experienced Web Developerslisab517
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnetrsnarayanan
 
Comet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called JabbifyComet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called JabbifyBrian Moschel
 
Web Development: The Next Five Years
Web Development: The Next Five YearsWeb Development: The Next Five Years
Web Development: The Next Five Yearssneeu
 
Galaxy
GalaxyGalaxy
Galaxybosc
 
Skype Development Techniques and Tools
Skype Development Techniques and ToolsSkype Development Techniques and Tools
Skype Development Techniques and ToolsPhil Wolff
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackCellarTracker
 
Performance Improvements In Browsers
Performance Improvements In BrowsersPerformance Improvements In Browsers
Performance Improvements In BrowsersGoogleTecTalks
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsersjeresig
 
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019Viktor Todorov
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And MavenPerconaPerformance
 
Whats New In Silverlight 3
Whats New In Silverlight 3Whats New In Silverlight 3
Whats New In Silverlight 3Bruce Johnson
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"LogeekNightUkraine
 

Ähnlich wie PPW2007 - Continuity Project (20)

Capistrano
CapistranoCapistrano
Capistrano
 
iPhone Development For Experienced Web Developers
iPhone Development For Experienced Web DevelopersiPhone Development For Experienced Web Developers
iPhone Development For Experienced Web Developers
 
Qcon
QconQcon
Qcon
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
 
Comet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called JabbifyComet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called Jabbify
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
 
JCatapult
JCatapultJCatapult
JCatapult
 
Web Development: The Next Five Years
Web Development: The Next Five YearsWeb Development: The Next Five Years
Web Development: The Next Five Years
 
Galaxy
GalaxyGalaxy
Galaxy
 
Skype Development Techniques and Tools
Skype Development Techniques and ToolsSkype Development Techniques and Tools
Skype Development Techniques and Tools
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
Performance Improvements In Browsers
Performance Improvements In BrowsersPerformance Improvements In Browsers
Performance Improvements In Browsers
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
 
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
 
Django 101
Django 101Django 101
Django 101
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Whats New In Silverlight 3
Whats New In Silverlight 3Whats New In Silverlight 3
Whats New In Silverlight 3
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
Kostiantyn Yelisavenko "Mastering Macro Benchmarking in .NET"
 

Mehr von awwaiid

2015-10-07 PPDC HTTP Adapters
2015-10-07 PPDC HTTP Adapters2015-10-07 PPDC HTTP Adapters
2015-10-07 PPDC HTTP Adaptersawwaiid
 
2016-05-12 DCRUG React.rb
2016-05-12 DCRUG React.rb2016-05-12 DCRUG React.rb
2016-05-12 DCRUG React.rbawwaiid
 
Random. Kinda.
Random. Kinda.Random. Kinda.
Random. Kinda.awwaiid
 
Mad Science: Polyglot Bridges
Mad Science: Polyglot BridgesMad Science: Polyglot Bridges
Mad Science: Polyglot Bridgesawwaiid
 
A Partial Multiverse Model of Time Travel for Debugging
A Partial Multiverse Model of Time Travel for DebuggingA Partial Multiverse Model of Time Travel for Debugging
A Partial Multiverse Model of Time Travel for Debuggingawwaiid
 
RailsGirls DC 2012 - Debugging
RailsGirls DC 2012 - DebuggingRailsGirls DC 2012 - Debugging
RailsGirls DC 2012 - Debuggingawwaiid
 
NoiseGen at Arlington Ruby 2012
NoiseGen at Arlington Ruby 2012NoiseGen at Arlington Ruby 2012
NoiseGen at Arlington Ruby 2012awwaiid
 

Mehr von awwaiid (8)

2015-10-07 PPDC HTTP Adapters
2015-10-07 PPDC HTTP Adapters2015-10-07 PPDC HTTP Adapters
2015-10-07 PPDC HTTP Adapters
 
2016-05-12 DCRUG React.rb
2016-05-12 DCRUG React.rb2016-05-12 DCRUG React.rb
2016-05-12 DCRUG React.rb
 
Random. Kinda.
Random. Kinda.Random. Kinda.
Random. Kinda.
 
Mad Science: Polyglot Bridges
Mad Science: Polyglot BridgesMad Science: Polyglot Bridges
Mad Science: Polyglot Bridges
 
A Partial Multiverse Model of Time Travel for Debugging
A Partial Multiverse Model of Time Travel for DebuggingA Partial Multiverse Model of Time Travel for Debugging
A Partial Multiverse Model of Time Travel for Debugging
 
Rakudo
RakudoRakudo
Rakudo
 
RailsGirls DC 2012 - Debugging
RailsGirls DC 2012 - DebuggingRailsGirls DC 2012 - Debugging
RailsGirls DC 2012 - Debugging
 
NoiseGen at Arlington Ruby 2012
NoiseGen at Arlington Ruby 2012NoiseGen at Arlington Ruby 2012
NoiseGen at Arlington Ruby 2012
 

Kürzlich hochgeladen

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 

Kürzlich hochgeladen (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

PPW2007 - Continuity Project

  • 1. cgi programs rise from ash then burn again upon each request
  • 2. Continuity A continuation based web application library for perl. Brock Wilcox (awwaiid@thelackthereof.org) Pittsburgh Perl Workshop 2007 http://continuity.tlt42.org/
  • 3. Talk Overview ● Traditional Web Apps ● Continuation Based Web Apps ● Seaside ● Continuity
  • 5. Memento ● Do an action ● What did I just do? Ask the requestor ● What did I just do? Look for a sticky note (cookie)
  • 6. CGI Applications ● Restart on each request ● Start with a switch statement ● GOTO based on input ● Control flow logic spread out ● Switch statement is state machine
  • 8. Run Lola Run ● Capture a moment in time ● Put it in a variable ● Execute it later ● Execute it again? ● Welcome to Continuations
  • 9. Continuation Conshminuation ● Program state in a variable – Not just data! Control flow too! ● One-shot vs Multi-shot ● Coroutines ● Cooperative Multithreading
  • 10. Continuations in Web Apps ● Don't restart app ● Continue on source next line ● Keep program state (local vars) ● Centralize control flow logic
  • 11. Other Efforts ● ViaWeb (Lisp, Paul Grahm 1999) ● Seaside (Smalltalk) ● UnCommon Web, SISCweb (Scheme) ● RIFE (Java) ● ... AJAX Turns Things Inside Out Too ...
  • 13. Overview of Seaside ● Continuations ● No templates ● Components ● Generated HTML with callbacks
  • 14. Seaside Demo ● Counter example ● Halos ● In-page code browser ● Inline link-press callbacks
  • 16. I want this in Perl
  • 17. Continuations in Perl5 ● Nothing built-in ● High-level trickery (Contize) ● Low-level trickery (Coro) ● Other trickery? ● use v6;
  • 19. Coro ● Written by Marc Lehmann ● Coroutines for Perl ● Saves – callchain – lexical variables – @_ $_ $@ $/ – C stack ● Effectively one-shot continuations ● Plus other goodies!
  • 21. Continuity ● Keep a list of continuations ● Accept incoming HTTP requests ● Map to a continuation ● Repeat
  • 22. Continuity Design ● Library Not Framework ● Unobtrusive ● TMTOWTDI ● Foundation for higher abstraction ● Modular – Plugable Adaptors: HttpDaemon, FastCGI, ... – Session Mapper
  • 23. What is it Good For ● High interaction ● Shared state - games ● Command line conversions ● Clean, organized code
  • 24. Continuation Mapping ● Incoming request to continuation – Cookie – IP – Path – Query ● Path + Cookie is fun ● Query is my favorite
  • 25. Counter Example ● Demonstrates: – Server setup – Cookie sessions – Query sessions – Parameters – Input loop – Subroutines if we make a prompt
  • 26. Chat Example ● Demonstrates – All things as Counter Example – AJAX and COMET – Multi-Continuation Sessions
  • 27. Issues ● Back Button ● Bookmarks ● Security ● Scalability
  • 28. Back Buttons and Bookmarks ● URLs should be pretty ● Many techniques to choose from ● Continuity doesn't decide for you ● Seaside mostly gives up, uses Request ID
  • 29. Detect the Back Button ● Send a unique Request ID ● Duplicates imply Back, Reload, or Fork ● Set flag, raise exception, ignore
  • 30. Bookmarks ● Bring back the CASE statement ● Goto the right spot :) ● Continue from there ● URLs for major parts of application
  • 31. Security ● Easy to centralize Input and Output ● Guessing a ContinuationID is bad
  • 32. Scalability ● Difficult to scale? ● Serve dynamic data (not static stuff) ● Session Affinity ● Don't fix it if it ain't broke
  • 33. Advanced Techniques ● Subref callbacks ● Multiple continuations per session ● Event.pm timers and watchers
  • 34. Future Work ● Get people using it ● Feedback!
  • 35. Future Work ● High-level layer(s) on top ● Continuity + Moose + DBIx::Class ● Steal from Seaside ● Steal from Magritte ● Steal from everyone
  • 36. Future Work ● Easy DBI interface – Coro::Util::eval_fork ● Other languages, keep similar minimal API
  • 37. Get it on CPAN.