2012-04-26 よもやま話

909 views

Published on

  • Be the first to comment

  • Be the first to like this

2012-04-26 よもやま話

  1. 1. よもやま話 KISAKA Toshihiroktoshihiro@gmail.com 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  2. 2. お前、誰よ?木坂寿宏 (KISAKA Toshihiro) @ktoshihiro_ http://gplus.to/ktoshihiro太古: Fortran大昔: 漢字 Talk中昔: BeOS最近: Android, Windows Phone 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  3. 3. 今日のお品書き最近 (?) の Topic の Overview● 細かいことは話しません● Web まわり中心● 踏み込んで聞きたいことある?● もしあれば、別途「勉強会」しましょう 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  4. 4. 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  5. 5. 今日のお品書きすべて話している時間はない 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  6. 6. Server Side● Cloud ○ インターネットを介して分散したコンピューティング環境 ○ アプリケーション / サービスがどこでどのようにサーブさ れているかは気にしない。 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  7. 7. Server Side● Cloud ○ 計算能力 ○ ストレージ ○ ネットワーク ○ データベース ○ CMS ○ etc. 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  8. 8. Server Side● Cloud ○ SaaS ■ Software as a Service ○ PaaS ■ Platform as a Service ○ IaaS ■ Infrastructure as a Service 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  9. 9. http://itpro.nikkeibp.co.jp/article/Keyword/20110216/357282/ 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  10. 10. Server Side● Cloud ○ Amazon ○ Google App Engine ○ Windows Azure ○ DotCloud ○ Heroku ○ Salesforce ○ etc. 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  11. 11. Amazon Web Services (AWS)● Amazon Web Services ○ Simple Storage Service (S3) ○ Elastic Compute Cloud (EC2) ○ Route 53 ○ etc. 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  12. 12. AWS Free Usage Tier (per month)● 750 hours of Amazon EC2 Linux Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) – enough hours to run continuously each month*● 750 hours of Amazon EC2 Microsoft Windows Server Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) – enough hours to run continuously each month*● 750 hours of an Elastic Load Balancer plus 15 GB data processing*● 30 GB of Amazon Elastic Block Storage, plus 2 million I/Os and 1 GB of snapshot storage*● 5 GB of Amazon S3 standard storage, 20,000 Get Requests, and 2,000 Put Requests*● 100 MB of storage, 5 units of write capacity, and 10 units of read capacity for Amazon DynamoDB.**● 25 Amazon SimpleDB Machine Hours and 1 GB of Storage**● 1,000 Amazon SWF workflow executions can be initiated for free. A total of 10,000 activity tasks, signals, timers and markers, and 30,000 workflow-days can also be used for free**● 100,000 Requests of Amazon Simple Queue Service**● 100,000 Requests, 100,000 HTTP notifications and 1,000 email notifications for Amazon Simple Notification Service**● 10 Amazon Cloudwatch metrics, 10 alarms, and 1,000,000 API requests**● 15 GB of bandwidth out aggregated across all AWS services* 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  13. 13. Server Side● Web Server ○ Apache httpd ○ nginx (2012-04-23 ver. 1.2 release) ○ node.js 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  14. 14. Server Side● Frameworks ○ Ruby on Rails ○ Django ○ Symfony2 ○ Silex 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  15. 15. Silex とは● MicroFramework● Symfony2 の component を利用● ファイルはたった一つ (silex.phar) ○ phar = PHP archive 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  16. 16. Silex で "Hello, World!"require_once __DIR__./silex.phar;$app = new SilexApplication();$app->get(/hello/{name}, function ($name) use ($app) { return Hello .$app->escape($name);});$app->run(); 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  17. 17. Client Side● Client Side ○ Mobile ■ Android ■ Windows Phone / Windows 8 Slate ■ iOS 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  18. 18. C10k 問題● 同時接続 10,000 ○ SNS および SNS 関連サービス ■ 動画や写真共有 ○ スマートフォン ○ マルチメディア (動画 / 音声) ファイル ○ 接続時間の増大 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  19. 19. C10k 問題● 同時接続 10,000 ○ hardware の問題ではない ■ いまどきのサーバー ● Memory 数G ● CPU GHz ● Gigabits Ethernet 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  20. 20. C10k 問題● Multi-Thread ○ Blocking I/O● Single-Thread ○ Non-Blocking I/O ○ Event Loop 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  21. 21. node.js の特徴● JavaScript● Non-Blocking I/O● Single Thread● Event Loop● libev / libeio / libuv 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  22. 22. node.js の周辺● NPM (node package manager) ○ Express (Web App Framework) ○ Railway (MVC Framework) ○ Mongoose (MongDB への ORM-like な機能) ○ Socket.IO (WebSocket)● Cloud9IED 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  23. 23. node.js で "Hello, World!"var http = require(http);http.createServer(function (req, res) { res.writeHead(200, {Content-Type: text/plain}); res.end(Hello Worldn);}).listen(1337, 127.0.0.1);console.log(Server running at http://127.0.0.1:1337/); 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  24. 24. node.js で "Hello, World!" #2var express = require(express);var app = express.createServer();app.get(/, function(req, res){ res.send(Hello World);});app.listen(3000); 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  25. 25. node.js を hosting● Windows Azure● Heroku● DotCloud● etc. 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  26. 26. node.js● Frontend の技術 (JavaScript) で Backend も● PaaS を使えば、安価に簡単に● IDE も WebApplicationぜひ、やってみましょう!!Google Web Toolkit (Java) というのもあるけど 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  27. 27. おまけ  2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>
  28. 28. http://blogs.msdn.com/b/malaysia/archive/2012/02/13/windows-8-and-the-future-of-xaml-the-windows-runtime-winrt.aspx 2012-04-26 KISAKA Toshihiro <ktoshihiro@gmail.com>

×