SlideShare une entreprise Scribd logo
1  sur  146
Télécharger pour lire hors ligne
Google
App Engine
   for Java
•   Clojure
•     Clojure

• Clojure   JavaVM   Lisp
•     Clojure

• Clojure   JavaVM   Lisp

•
•     Clojure

• Clojure    JavaVM     Lisp

•


•           AppEngine
•     Clojure

• Clojure    JavaVM     Lisp

•


•           AppEngine

•
• Google App   Engine
• Google App   Engine

• Google App   Engine
• Google App   Engine

• Google App   Engine

 • Google               Web Application Platform
• Google App    Engine

• Google App    Engine

    • Google             Web Application Platform

•         GAE
• Google App    Engine

• Google App    Engine

    • Google             Web Application Platform

•         GAE

•
Google App Engine
Google App Engine
• Web
Google App Engine
• Web


•       (500   PV/   500MB   )
Google App Engine
• Web


•          (500    PV/   500MB   )

• Python    Java
Google App Engine
• Web


•             (500     PV/      500MB       )

• Python       Java

    •                JVM     JRuby, Clojure, Scala, Groovy, Rhino,
        Quercus...
Google App Engine
• Web


•             (500     PV/       500MB       )

• Python       Java

    •                JVM      JRuby, Clojure, Scala, Groovy, Rhino,
        Quercus...

    • http://en.wikipedia.org/wiki/List_of_JVM_languages
•
•


•
•


•


•
...
...

•
...

•


•   ...
...

•


•         ...

•   ...
...

•


•               ...

•         ...

•   ...
...

•


•               ...

•         ...

•   ...

•
...

•


•               ...

•         ...

•   ...

•
•
•


•
•


•


    •
•


•


    •


    •
•


•


    •


    •


    •
•


•


    •


    •


    •


    •
@kunitada_bot
@kunitada_bot

•   :
@kunitada_bot

•   :

•   :   (kunitadize)
@kunitada_bot

•   :

•   :       (kunitadize)

•       :
@kunitada_bot

•   :

•   :       (kunitadize)

•       :

•       :
•   JRuby
•      JRuby

• RubyGems   (v1.3.5)
•          JRuby

• RubyGems    (v1.3.5)

• sudo   gem install google-appengine
•          JRuby

• RubyGems     (v1.3.5)

• sudo   gem install google-appengine

• mkdir   kunitada-bot
•          JRuby

• RubyGems     (v1.3.5)

• sudo   gem install google-appengine

• mkdir   kunitada-bot

• cd   kunitada-bot
• vi   Gemfile
• vi   Gemfile

• vi   config.ru
• vi   Gemfile

• vi   config.ru

• vi   main.rb
• vi   Gemfile

• vi   config.ru

• vi   main.rb

• appcfg.rb      bundle .
• vi   Gemfile

• vi   config.ru

• vi   main.rb

• appcfg.rb      bundle .

  • JRuby        Sinatra    Gem   DL
• GAE/J
• GAE/J




 • URL
• GAE/J




 • URL




 • Sinatra
(main.rb)
• GAE/J
              require 'rubygems'
              require 'sinatra'

              get '/' do
 • URL          'Hello World!!'
              end

              get ‘/kunitadize’ do
 • Sinatra      #
              end
Twitter API TL
Twitter API TL

• GAE/J    Web
Twitter API TL

• GAE/J         Web

 • URL    Fetch API
Twitter API TL

• GAE/J          Web

  • URL    Fetch API

• res   = AppEngine::URLFetch.fetch(url, params)
Twitter API TL

• GAE/J          Web

  • URL    Fetch API

• res   = AppEngine::URLFetch.fetch(url, params)

• tweets   = JSON.parse(res)
Twitter API TL

• GAE/J          Web

  • URL    Fetch API

• res   = AppEngine::URLFetch.fetch(url, params)

• tweets   = JSON.parse(res)

• tweets.shuffle.shift
kunitadize
kunitadize

•
kunitadize

•


    • Yahoo!
kunitadize

•


    • Yahoo!


    •     bot
kunitadize

•


    • Yahoo!


    •     bot

    •     bot            (@sugyan++)
Twitter
Twitter

• URL   Fetch API   Twitter Update API
Twitter

• URL   Fetch API   Twitter Update API

•
Twitter

• URL   Fetch API   Twitter Update API

•


•$   dev_appserver.rb .
Twitter

• URL   Fetch API   Twitter Update API

•


•$   dev_appserver.rb .

• http://localhost:8080/kunitadize
kunitadize
kunitadize

•   kunitadize
kunitadize

•          kunitadize



• GAE

    Cron
kunitadize

•               kunitadize



• GAE

    Cron

• WEB-INF/cron.xml
kunitadize

•               kunitadize (WEB-INF/cron.xml)
                          <?xml version="1.0" encoding="UTF-8"?>

                          <cronentries>
                            <cron>
                              <url>/kunitadize</url>
• GAE                         <description>kunitadize a random
                          tweet</description>

    Cron                      <schedule>every 30 minutes</
                          schedule>
                            </cron>
                          </cronentries>

• WEB-INF/cron.xml
•   GAE
•   GAE

•
•              GAE

•


•$   appcfg.rb update .
•              GAE

•


•$   appcfg.rb update .

•         E-mail
•              GAE

•


•$   appcfg.rb update .

•         E-mail

• https://appengine.google.com/
AppEngine API
AppEngine API
AppEngine API

• Datastore
AppEngine API

• Datastore

• Memcache
AppEngine API

• Datastore

• Memcache

• URL   Fetch
AppEngine API

• Datastore

• Memcache

• URL    Fetch

• Mail   (       )
AppEngine API

• Datastore

• Memcache

• URL    Fetch

• Mail   (       )

• XMPP
AppEngine API

• Datastore                 • Image

• Memcache

• URL    Fetch

• Mail   (       )

• XMPP
AppEngine API

• Datastore                 • Image

• Memcache                  • Google Account

• URL    Fetch

• Mail   (       )

• XMPP
AppEngine API

• Datastore                 • Image

• Memcache                  • Google Account

• URL    Fetch              • Task   Queue
• Mail   (       )

• XMPP
AppEngine API

• Datastore                 • Image

• Memcache                  • Google Account

• URL    Fetch              • Task   Queue
• Mail   (       )          • Cron

• XMPP
AppEngine
AppEngine
AppEngine

•
AppEngine

•


•
AppEngine

•


•


    • ffmpeg   Flash Compiler
AppEngine

•


•


    • ffmpeg    Flash Compiler

•              Datastore
AppEngine

•


•


    • ffmpeg      Flash Compiler

•                Datastore

    • frontend   backend
AppEngine
AppEngine


• 30      kill
AppEngine


• 30                  kill

 • JRuby   on Rails + ActiveRecord
AppEngine


• 30                  kill

 • JRuby   on Rails + ActiveRecord

   • Sinatra   + DataMapper
AppEngine
AppEngine

•
AppEngine

•




    •
AppEngine

•




    •


        •   cron   URL
AppEngine

•




    •


        •   cron   URL

• RDBMS            (     Datastore)
Datastore
Datastore
Datastore

•      DB
Datastore

•                     DB

• Table   Column
Datastore

•                     DB

• Table   Column

•            Entity        kind property
Datastore

•                        DB

• Table      Column

•               Entity        kind property

    • kind
Datastore

•                         DB

• Table      Column

•                Entity        kind property

    • kind


    • property
Datastore
Datastore

•
Datastore

•


    •   kind      property
Datastore

•


    •    kind        property

    •1    property
Datastore

•


    •       kind           property

    •1          property

        •   “
Datastore
Datastore

• Datastore   Key-Value-Store
Datastore

• Datastore   Key-Value-Store

 •   Entity              Key
Datastore

• Datastore   Key-Value-Store

 •   Entity              Key

 •      Key
Datastore

• Datastore   Key-Value-Store

 •   Entity                  Key

 •      Key

 •                  Entity
Datastore

• Datastore   Key-Value-Store

 •   Entity                  Key

 •      Key

 •                  Entity

 •
Datastore
Datastore

• Java   Datastore API   GQL
Datastore

• Java   Datastore API   GQL

  •
Datastore

• Java   Datastore API   GQL

  •


  • DataMapper                 &
Datastore

• Java   Datastore API   GQL

  •


  • DataMapper                 &

  •
• http://tech.kayac.com/archive/gae-jruby-twitter-bot.html

• http://code.google.com/p/appengine-jruby/

• http://d.hatena.ne.jp/shibason/20091018/1255866012

•      : Programming Google App Engine

Contenu connexe

Plus de fukamachi

競プロの話
競プロの話競プロの話
競プロの話fukamachi
 
Rove / Testing is a pity in Common Lisp
Rove / Testing is a pity in Common LispRove / Testing is a pity in Common Lisp
Rove / Testing is a pity in Common Lispfukamachi
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lispfukamachi
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parserfukamachi
 
Redesigning Common Lisp
Redesigning Common LispRedesigning Common Lisp
Redesigning Common Lispfukamachi
 
Integral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common LispIntegral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common Lispfukamachi
 
第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」fukamachi
 
Clack & Caveman
Clack & CavemanClack & Caveman
Clack & Cavemanfukamachi
 
Lispで仕事をするために
Lispで仕事をするためにLispで仕事をするために
Lispで仕事をするためにfukamachi
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界fukamachi
 

Plus de fukamachi (14)

競プロの話
競プロの話競プロの話
競プロの話
 
Rove / Testing is a pity in Common Lisp
Rove / Testing is a pity in Common LispRove / Testing is a pity in Common Lisp
Rove / Testing is a pity in Common Lisp
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lisp
 
SBLint
SBLintSBLint
SBLint
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
 
Redesigning Common Lisp
Redesigning Common LispRedesigning Common Lisp
Redesigning Common Lisp
 
Integral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common LispIntegral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common Lisp
 
About Clack
About ClackAbout Clack
About Clack
 
Shelly
ShellyShelly
Shelly
 
第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」
 
Clack & Caveman
Clack & CavemanClack & Caveman
Clack & Caveman
 
Lispで仕事をするために
Lispで仕事をするためにLispで仕事をするために
Lispで仕事をするために
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界
 
Lisp Poetry
Lisp PoetryLisp Poetry
Lisp Poetry
 

Google App Engine for Java (手嶋屋勉強会)