SlideShare ist ein Scribd-Unternehmen logo
1 von 19
ISUCON
Python
  2011.09.06   #4 LT
•   HN:

    •                    id:memememomo

    •   Twitter (@memememomo)

    •   github (memememomo)

•   ISUCON
    •
•
    •   perl   PHP
ISUCON
• ruby
 •   Sinatra

• perl
 •   Kossy

• node.js
 •   express
ISUCON
• ruby         use Kossy;
 •   Sinatra
               get '/article/:articleid' => sub {
• perl            my ( $self, $c ) = @_;
 •   Kossy        $c->render('article.tx', { article =>
• node.js      $article, comments => $comments });
               };
 •   express
ISUCON
• ruby         use Kossy;
 •   Sinatra
               get '/article/:articleid' => sub {
• perl            my ( $self, $c ) = @_;
 •   Kossy        $c->render('article.tx', { article =>
• node.js      $article, comments => $comments });
               };
 •   express
ISUCON
• ruby         use Kossy;
 •   Sinatra
               get '/article/:articleid' => sub {
• perl            my ( $self, $c ) = @_;
 •   Kossy        $c->render('article.tx', { article =>
• node.js      $article, comments => $comments });
               };
 •   express
ISUCON
• ruby         use Kossy;
 •   Sinatra
               get '/article/:articleid' => sub {
• perl            my ( $self, $c ) = @_;
 •   Kossy        $c->render('article.tx', { article =>
• node.js      $article, comments => $comments });
               };
 •   express
ISUCON
• ruby            use Kossy;
 •   Sinatra
                  get '/article/:articleid' => sub {
• perl               my ( $self, $c ) = @_;
 •   Kossy           $c->render('article.tx', { article =>
• node.js         $article, comments => $comments });
                  };
 •   express



               Python          Flask
Flask
 from flask import Flask

 app = Flask(__name__)


 @app.route('/')
 def index():
    .....
     return render_template('index.html', articles=articles,
 sidebaritems=g.sidebaritems)

 @app.route('/post', methods=['GET'])
 def get_post():
     return render_template('post.html')

 @app.route('/post', methods=['POST'])
 def post_post():
     .....
     return redirect(url_for('index'))

 if __name__ == '__main__':
     app.run(host='0.0.0.0')



https://github.com/memememomo/python-isucon
Flask
 from flask import Flask

 app = Flask(__name__)


 @app.route('/')
 def index():
    .....
     return render_template('index.html', articles=articles,
 sidebaritems=g.sidebaritems)

 @app.route('/post', methods=['GET'])
 def get_post():
     return render_template('post.html')

 @app.route('/post', methods=['POST'])
 def post_post():
     .....
     return redirect(url_for('index'))

 if __name__ == '__main__':
     app.run(host='0.0.0.0')



https://github.com/memememomo/python-isucon
Flask
 from flask import Flask

 app = Flask(__name__)


 @app.route('/')
 def index():
    .....
     return render_template('index.html', articles=articles,
 sidebaritems=g.sidebaritems)

 @app.route('/post', methods=['GET'])
 def get_post():
     return render_template('post.html')

 @app.route('/post', methods=['POST'])
 def post_post():
     .....
     return redirect(url_for('index'))

 if __name__ == '__main__':
     app.run(host='0.0.0.0')



https://github.com/memememomo/python-isucon
Flask
 from flask import Flask

 app = Flask(__name__)


 @app.route('/')
 def index():
    .....
     return render_template('index.html', articles=articles,
 sidebaritems=g.sidebaritems)

 @app.route('/post', methods=['GET'])
 def get_post():
     return render_template('post.html')

 @app.route('/post', methods=['POST'])
 def post_post():
     .....
     return redirect(url_for('index'))

 if __name__ == '__main__':
     app.run(host='0.0.0.0')



https://github.com/memememomo/python-isucon
Flask
 from flask import Flask

 app = Flask(__name__)


 @app.route('/')
 def index():
    .....
     return render_template('index.html', articles=articles,
 sidebaritems=g.sidebaritems)

 @app.route('/post', methods=['GET'])
 def get_post():
     return render_template('post.html')

 @app.route('/post', methods=['POST'])
 def post_post():
     .....
     return redirect(url_for('index'))

 if __name__ == '__main__':
     app.run(host='0.0.0.0')



https://github.com/memememomo/python-isucon
Flask
 from flask import Flask

 app = Flask(__name__)


 @app.route('/')
 def index():
    .....
     return render_template('index.html', articles=articles,
 sidebaritems=g.sidebaritems)

 @app.route('/post', methods=['GET'])
 def get_post():
     return render_template('post.html')

 @app.route('/post', methods=['POST'])
 def post_post():
     .....
     return redirect(url_for('index'))

 if __name__ == '__main__':
     app.run(host='0.0.0.0')



https://github.com/memememomo/python-isucon
•       App

•
•       http_load           2

•       App
    •    app1 (perl + starman)
    •    app2 (ruby + apache + passenger)
    •    app3 (node.js)
    •    app4 (python + apache + mod_wsgi)
•
    •   python isucon

    •

•
    •
ISUCONアプリを Pythonで書いてみた

Weitere ähnliche Inhalte

Was ist angesagt?

優しいWAFの作り方
優しいWAFの作り方優しいWAFの作り方
優しいWAFの作り方
techmemo
 
用Tornado开发RESTful API运用
用Tornado开发RESTful API运用用Tornado开发RESTful API运用
用Tornado开发RESTful API运用
Felinx Lee
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
Jeremy Kendall
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
diego_k
 

Was ist angesagt? (20)

優しいWAFの作り方
優しいWAFの作り方優しいWAFの作り方
優しいWAFの作り方
 
Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)
 
Symfony 2.0 on PHP 5.3
Symfony 2.0 on PHP 5.3Symfony 2.0 on PHP 5.3
Symfony 2.0 on PHP 5.3
 
Cakephpstudy5 hacks
Cakephpstudy5 hacksCakephpstudy5 hacks
Cakephpstudy5 hacks
 
Your JavaScript Library
Your JavaScript LibraryYour JavaScript Library
Your JavaScript Library
 
Ruby 2.0
Ruby 2.0Ruby 2.0
Ruby 2.0
 
Play á la Rails
Play á la RailsPlay á la Rails
Play á la Rails
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
AST Rewriting Using recast and esprima
AST Rewriting Using recast and esprimaAST Rewriting Using recast and esprima
AST Rewriting Using recast and esprima
 
Perl5i
Perl5iPerl5i
Perl5i
 
用Tornado开发RESTful API运用
用Tornado开发RESTful API运用用Tornado开发RESTful API运用
用Tornado开发RESTful API运用
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
 
A Self Replicating Serverless Function
A Self Replicating Serverless FunctionA Self Replicating Serverless Function
A Self Replicating Serverless Function
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functions
 
Introduction to the Pods JSON API
Introduction to the Pods JSON APIIntroduction to the Pods JSON API
Introduction to the Pods JSON API
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 

Andere mochten auch

Cat dissection
Cat dissectionCat dissection
Cat dissection
Pam Carr
 
CPANモジュールをPHPに移植してみた話
CPANモジュールをPHPに移植してみた話CPANモジュールをPHPに移植してみた話
CPANモジュールをPHPに移植してみた話
memememomo
 

Andere mochten auch (18)

Storage device
Storage deviceStorage device
Storage device
 
Basics of computer
Basics of computerBasics of computer
Basics of computer
 
Processor
ProcessorProcessor
Processor
 
Tcp and introduction to protocol
Tcp and introduction to protocolTcp and introduction to protocol
Tcp and introduction to protocol
 
CCNA ALL IN ONE
CCNA ALL IN ONE CCNA ALL IN ONE
CCNA ALL IN ONE
 
Cat dissection
Cat dissectionCat dissection
Cat dissection
 
01.number systems
01.number systems01.number systems
01.number systems
 
Osi model with neworking overview
Osi model with neworking overviewOsi model with neworking overview
Osi model with neworking overview
 
Alchemy for Creative Loop Manipulation
Alchemy for Creative Loop ManipulationAlchemy for Creative Loop Manipulation
Alchemy for Creative Loop Manipulation
 
Mother board
Mother boardMother board
Mother board
 
Raid Levels
Raid LevelsRaid Levels
Raid Levels
 
CPANモジュールをPHPに移植してみた話
CPANモジュールをPHPに移植してみた話CPANモジュールをPHPに移植してみた話
CPANモジュールをPHPに移植してみた話
 
Subnetting
SubnettingSubnetting
Subnetting
 
Loudspeakers
LoudspeakersLoudspeakers
Loudspeakers
 
INTEGRATED CIRCUIT
INTEGRATED CIRCUITINTEGRATED CIRCUIT
INTEGRATED CIRCUIT
 
Network Security & Ethical Hacking
Network Security & Ethical HackingNetwork Security & Ethical Hacking
Network Security & Ethical Hacking
 
A Complete Guide Cloud Computing
A Complete Guide Cloud ComputingA Complete Guide Cloud Computing
A Complete Guide Cloud Computing
 
ANALOG TO DIGITAL AND DIGITAL TO ANALOG CONVERTER
ANALOG TO DIGITAL AND DIGITAL TO ANALOG CONVERTERANALOG TO DIGITAL AND DIGITAL TO ANALOG CONVERTER
ANALOG TO DIGITAL AND DIGITAL TO ANALOG CONVERTER
 

Ähnlich wie ISUCONアプリを Pythonで書いてみた

前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
Ting Lv
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
Fabien Potencier
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr Pasich
Piotr Pasich
 
News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
Fabien Potencier
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
Yehuda Katz
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
Yehuda Katz
 

Ähnlich wie ISUCONアプリを Pythonで書いてみた (20)

前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
Elegant APIs
Elegant APIsElegant APIs
Elegant APIs
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On Rails
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Introducing CakeEntity
Introducing CakeEntityIntroducing CakeEntity
Introducing CakeEntity
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr Pasich
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Silex Cheat Sheet
Silex Cheat SheetSilex Cheat Sheet
Silex Cheat Sheet
 
Silex Cheat Sheet
Silex Cheat SheetSilex Cheat Sheet
Silex Cheat Sheet
 
DBIx::Skinnyと仲間たち
DBIx::Skinnyと仲間たちDBIx::Skinnyと仲間たち
DBIx::Skinnyと仲間たち
 
solving little problems
solving little problemssolving little problems
solving little problems
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
Building Lithium Apps
Building Lithium AppsBuilding Lithium Apps
Building Lithium Apps
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
Victor Rentea
 

Kürzlich hochgeladen (20)

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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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 ...
 
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
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

ISUCONアプリを Pythonで書いてみた

  • 2. HN: • id:memememomo • Twitter (@memememomo) • github (memememomo) • ISUCON • • • perl PHP
  • 3. ISUCON • ruby • Sinatra • perl • Kossy • node.js • express
  • 4. ISUCON • ruby use Kossy; • Sinatra get '/article/:articleid' => sub { • perl my ( $self, $c ) = @_; • Kossy $c->render('article.tx', { article => • node.js $article, comments => $comments }); }; • express
  • 5. ISUCON • ruby use Kossy; • Sinatra get '/article/:articleid' => sub { • perl my ( $self, $c ) = @_; • Kossy $c->render('article.tx', { article => • node.js $article, comments => $comments }); }; • express
  • 6. ISUCON • ruby use Kossy; • Sinatra get '/article/:articleid' => sub { • perl my ( $self, $c ) = @_; • Kossy $c->render('article.tx', { article => • node.js $article, comments => $comments }); }; • express
  • 7. ISUCON • ruby use Kossy; • Sinatra get '/article/:articleid' => sub { • perl my ( $self, $c ) = @_; • Kossy $c->render('article.tx', { article => • node.js $article, comments => $comments }); }; • express
  • 8. ISUCON • ruby use Kossy; • Sinatra get '/article/:articleid' => sub { • perl my ( $self, $c ) = @_; • Kossy $c->render('article.tx', { article => • node.js $article, comments => $comments }); }; • express Python Flask
  • 9. Flask from flask import Flask app = Flask(__name__) @app.route('/') def index(): .....     return render_template('index.html', articles=articles, sidebaritems=g.sidebaritems) @app.route('/post', methods=['GET']) def get_post():     return render_template('post.html') @app.route('/post', methods=['POST']) def post_post(): .....     return redirect(url_for('index')) if __name__ == '__main__':     app.run(host='0.0.0.0') https://github.com/memememomo/python-isucon
  • 10. Flask from flask import Flask app = Flask(__name__) @app.route('/') def index(): .....     return render_template('index.html', articles=articles, sidebaritems=g.sidebaritems) @app.route('/post', methods=['GET']) def get_post():     return render_template('post.html') @app.route('/post', methods=['POST']) def post_post(): .....     return redirect(url_for('index')) if __name__ == '__main__':     app.run(host='0.0.0.0') https://github.com/memememomo/python-isucon
  • 11. Flask from flask import Flask app = Flask(__name__) @app.route('/') def index(): .....     return render_template('index.html', articles=articles, sidebaritems=g.sidebaritems) @app.route('/post', methods=['GET']) def get_post():     return render_template('post.html') @app.route('/post', methods=['POST']) def post_post(): .....     return redirect(url_for('index')) if __name__ == '__main__':     app.run(host='0.0.0.0') https://github.com/memememomo/python-isucon
  • 12. Flask from flask import Flask app = Flask(__name__) @app.route('/') def index(): .....     return render_template('index.html', articles=articles, sidebaritems=g.sidebaritems) @app.route('/post', methods=['GET']) def get_post():     return render_template('post.html') @app.route('/post', methods=['POST']) def post_post(): .....     return redirect(url_for('index')) if __name__ == '__main__':     app.run(host='0.0.0.0') https://github.com/memememomo/python-isucon
  • 13. Flask from flask import Flask app = Flask(__name__) @app.route('/') def index(): .....     return render_template('index.html', articles=articles, sidebaritems=g.sidebaritems) @app.route('/post', methods=['GET']) def get_post():     return render_template('post.html') @app.route('/post', methods=['POST']) def post_post(): .....     return redirect(url_for('index')) if __name__ == '__main__':     app.run(host='0.0.0.0') https://github.com/memememomo/python-isucon
  • 14. Flask from flask import Flask app = Flask(__name__) @app.route('/') def index(): .....     return render_template('index.html', articles=articles, sidebaritems=g.sidebaritems) @app.route('/post', methods=['GET']) def get_post():     return render_template('post.html') @app.route('/post', methods=['POST']) def post_post(): .....     return redirect(url_for('index')) if __name__ == '__main__':     app.run(host='0.0.0.0') https://github.com/memememomo/python-isucon
  • 15.
  • 16. App • • http_load 2 • App • app1 (perl + starman) • app2 (ruby + apache + passenger) • app3 (node.js) • app4 (python + apache + mod_wsgi)
  • 17.
  • 18. • python isucon • • •

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n