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

3,193 views

Published on

バレンタインまでに最速で彼女をつくる方法

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,193
On SlideShare
0
From Embeds
0
Number of Embeds
318
Actions
Shares
0
Downloads
36
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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

  1. 1. Google App Engine for Java
  2. 2. • Clojure
  3. 3. • Clojure • Clojure JavaVM Lisp
  4. 4. • Clojure • Clojure JavaVM Lisp •
  5. 5. • Clojure • Clojure JavaVM Lisp • • AppEngine
  6. 6. • Clojure • Clojure JavaVM Lisp • • AppEngine •
  7. 7. • Google App Engine
  8. 8. • Google App Engine • Google App Engine
  9. 9. • Google App Engine • Google App Engine • Google Web Application Platform
  10. 10. • Google App Engine • Google App Engine • Google Web Application Platform • GAE
  11. 11. • Google App Engine • Google App Engine • Google Web Application Platform • GAE •
  12. 12. Google App Engine
  13. 13. Google App Engine • Web
  14. 14. Google App Engine • Web • (500 PV/ 500MB )
  15. 15. Google App Engine • Web • (500 PV/ 500MB ) • Python Java
  16. 16. Google App Engine • Web • (500 PV/ 500MB ) • Python Java • JVM JRuby, Clojure, Scala, Groovy, Rhino, Quercus...
  17. 17. 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
  18. 18.
  19. 19. • •
  20. 20. • • •
  21. 21. ...
  22. 22. ... •
  23. 23. ... • • ...
  24. 24. ... • • ... • ...
  25. 25. ... • • ... • ... • ...
  26. 26. ... • • ... • ... • ... •
  27. 27. ... • • ... • ... • ... •
  28. 28.
  29. 29. • •
  30. 30. • • •
  31. 31. • • • •
  32. 32. • • • • •
  33. 33. • • • • • •
  34. 34. @kunitada_bot
  35. 35. @kunitada_bot • :
  36. 36. @kunitada_bot • : • : (kunitadize)
  37. 37. @kunitada_bot • : • : (kunitadize) • :
  38. 38. @kunitada_bot • : • : (kunitadize) • : • :
  39. 39. • JRuby
  40. 40. • JRuby • RubyGems (v1.3.5)
  41. 41. • JRuby • RubyGems (v1.3.5) • sudo gem install google-appengine
  42. 42. • JRuby • RubyGems (v1.3.5) • sudo gem install google-appengine • mkdir kunitada-bot
  43. 43. • JRuby • RubyGems (v1.3.5) • sudo gem install google-appengine • mkdir kunitada-bot • cd kunitada-bot
  44. 44. • vi Gemfile
  45. 45. • vi Gemfile • vi config.ru
  46. 46. • vi Gemfile • vi config.ru • vi main.rb
  47. 47. • vi Gemfile • vi config.ru • vi main.rb • appcfg.rb bundle .
  48. 48. • vi Gemfile • vi config.ru • vi main.rb • appcfg.rb bundle . • JRuby Sinatra Gem DL
  49. 49. • GAE/J
  50. 50. • GAE/J • URL
  51. 51. • GAE/J • URL • Sinatra
  52. 52. (main.rb) • GAE/J require 'rubygems' require 'sinatra' get '/' do • URL 'Hello World!!' end get ‘/kunitadize’ do • Sinatra # end
  53. 53. Twitter API TL
  54. 54. Twitter API TL • GAE/J Web
  55. 55. Twitter API TL • GAE/J Web • URL Fetch API
  56. 56. Twitter API TL • GAE/J Web • URL Fetch API • res = AppEngine::URLFetch.fetch(url, params)
  57. 57. Twitter API TL • GAE/J Web • URL Fetch API • res = AppEngine::URLFetch.fetch(url, params) • tweets = JSON.parse(res)
  58. 58. Twitter API TL • GAE/J Web • URL Fetch API • res = AppEngine::URLFetch.fetch(url, params) • tweets = JSON.parse(res) • tweets.shuffle.shift
  59. 59. kunitadize
  60. 60. kunitadize •
  61. 61. kunitadize • • Yahoo!
  62. 62. kunitadize • • Yahoo! • bot
  63. 63. kunitadize • • Yahoo! • bot • bot (@sugyan++)
  64. 64. Twitter
  65. 65. Twitter • URL Fetch API Twitter Update API
  66. 66. Twitter • URL Fetch API Twitter Update API •
  67. 67. Twitter • URL Fetch API Twitter Update API • •$ dev_appserver.rb .
  68. 68. Twitter • URL Fetch API Twitter Update API • •$ dev_appserver.rb . • http://localhost:8080/kunitadize
  69. 69. kunitadize
  70. 70. kunitadize • kunitadize
  71. 71. kunitadize • kunitadize • GAE Cron
  72. 72. kunitadize • kunitadize • GAE Cron • WEB-INF/cron.xml
  73. 73. 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
  74. 74. • GAE
  75. 75. • GAE •
  76. 76. • GAE • •$ appcfg.rb update .
  77. 77. • GAE • •$ appcfg.rb update . • E-mail
  78. 78. • GAE • •$ appcfg.rb update . • E-mail • https://appengine.google.com/
  79. 79. AppEngine API
  80. 80. AppEngine API
  81. 81. AppEngine API • Datastore
  82. 82. AppEngine API • Datastore • Memcache
  83. 83. AppEngine API • Datastore • Memcache • URL Fetch
  84. 84. AppEngine API • Datastore • Memcache • URL Fetch • Mail ( )
  85. 85. AppEngine API • Datastore • Memcache • URL Fetch • Mail ( ) • XMPP
  86. 86. AppEngine API • Datastore • Image • Memcache • URL Fetch • Mail ( ) • XMPP
  87. 87. AppEngine API • Datastore • Image • Memcache • Google Account • URL Fetch • Mail ( ) • XMPP
  88. 88. AppEngine API • Datastore • Image • Memcache • Google Account • URL Fetch • Task Queue • Mail ( ) • XMPP
  89. 89. AppEngine API • Datastore • Image • Memcache • Google Account • URL Fetch • Task Queue • Mail ( ) • Cron • XMPP
  90. 90. AppEngine
  91. 91. AppEngine
  92. 92. AppEngine •
  93. 93. AppEngine • •
  94. 94. AppEngine • • • ffmpeg Flash Compiler
  95. 95. AppEngine • • • ffmpeg Flash Compiler • Datastore
  96. 96. AppEngine • • • ffmpeg Flash Compiler • Datastore • frontend backend
  97. 97. AppEngine
  98. 98. AppEngine • 30 kill
  99. 99. AppEngine • 30 kill • JRuby on Rails + ActiveRecord
  100. 100. AppEngine • 30 kill • JRuby on Rails + ActiveRecord • Sinatra + DataMapper
  101. 101. AppEngine
  102. 102. AppEngine •
  103. 103. AppEngine • •
  104. 104. AppEngine • • • cron URL
  105. 105. AppEngine • • • cron URL • RDBMS ( Datastore)
  106. 106. Datastore
  107. 107. Datastore
  108. 108. Datastore • DB
  109. 109. Datastore • DB • Table Column
  110. 110. Datastore • DB • Table Column • Entity kind property
  111. 111. Datastore • DB • Table Column • Entity kind property • kind
  112. 112. Datastore • DB • Table Column • Entity kind property • kind • property
  113. 113. Datastore
  114. 114. Datastore •
  115. 115. Datastore • • kind property
  116. 116. Datastore • • kind property •1 property
  117. 117. Datastore • • kind property •1 property • “
  118. 118. Datastore
  119. 119. Datastore • Datastore Key-Value-Store
  120. 120. Datastore • Datastore Key-Value-Store • Entity Key
  121. 121. Datastore • Datastore Key-Value-Store • Entity Key • Key
  122. 122. Datastore • Datastore Key-Value-Store • Entity Key • Key • Entity
  123. 123. Datastore • Datastore Key-Value-Store • Entity Key • Key • Entity •
  124. 124. Datastore
  125. 125. Datastore • Java Datastore API GQL
  126. 126. Datastore • Java Datastore API GQL •
  127. 127. Datastore • Java Datastore API GQL • • DataMapper &
  128. 128. Datastore • Java Datastore API GQL • • DataMapper & •
  129. 129. • 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

×