Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS + nginx + Node.js + Android ~Android アプリ開発...
Search
Pine Mizune
August 23, 2014
Programming
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS + nginx + Node.js + Android ~Android アプリ開発してみた~
『 JAWS-UG高知 第4回勉強会 - 微妙にネジが飛んでる活用術編 』 で発表した資料
https://jawsug-tosa.doorkeeper.jp/events/14063
Pine Mizune
August 23, 2014
More Decks by Pine Mizune
See All by Pine Mizune
多言語対応と絵文字ジェネレーター / i18n of Emoji Generator
pine
0
900
C++ 製グラフィックライブラリ Skia の紹介 / Introduction to the graphics library Skia written by C++
pine
0
2k
asyncio + aiohttp で作るウェブサービス / How to develop a web service with asyncio and aiohttp
pine
0
710
Lerna による明示的疎結合アーキテクチャ
pine
1
690
CircleCI 2.0 x JavaScript
pine
3
580
Perl 卒業式
pine
0
380
Android Studio の気になる warnings を抑制する方法まとめ
pine
0
540
Emoji Generator meets Browser Extensions
pine
1
3k
近年の OSS 開発における CI 選択のベストプラクティス
pine
3
4.5k
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
600
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
150
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
150
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
530
Security issues being discussed on Web Platforms
petamoriken
0
980
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
730
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
490
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.8k
スマート反転とウェブアクセシビリティ
camiha
0
210
Java 27新機能 / Java 27 new features
kishida
2
150
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Between Models and Reality
mayunak
4
460
Typedesign – Prime Four
hannesfritz
42
3.2k
For a Future-Friendly Web
brad_frost
183
10k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
700
What's in a price? How to price your products and services
michaelherold
247
13k
Test your architecture with Archunit
thirion
2
2.4k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Making Projects Easy
brettharned
120
6.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Transcript
AWS + nginx + Node.js + Android ~Android アプリ開発してみた~ 水音
氷音
自己紹介
自己紹介 (1/3) - 概要 • 静岡県浜松市 出身 • 工業高校 情報技術科
卒 • 高知工科大学 情報学群 • 趣味 – 麻雀、日本酒、アニメ
自己紹介 (2/3) - 何系の人 ? • PC アプリ系 – Web
系 – ソーシャル系 – 雑食プログラマー • 好きな言語 – JavaScript (and TypeScript), C# • よく使う言語 – C/C++, PHP, Ruby, Python
自己紹介 (3/3) - クラウド系は ? • 利用経験 – Google Apps
(SaaS) – Google App Engine (PaaS) [Python] – Heroku (PaaS) [JavaScript] – Amazon EC2 (IaaS) [VPN] • 利用してみたい – Dropbox Datastore API (SaaS)
つくったもの
つくったもの
つくったもの
技術的な話
目次 • Android アプリ開発 概要 • Android 側 プログラム •
サーバー側 プログラム • サーバー • ベンチマーク – Heroku vs AWS EC2
Android アプリ開発 概要 (1/4) • 作らないといけないもの – Android アプリ プログラム
– Android アプリ デザイン – サーバーサイド プログラム • 場合による
Android アプリ開発 概要 (2/4) • 必要な技術 – Android 側 …
Java, C++, C#, JavaScript など • 今回: Java (最も一般的) – サーバー側 … PHP, Perl, Ruby, JavaScript など • 今回: JavaScript (Node.js)
Android アプリ開発 概要 (3/4) • 必要な機材 – 開発用マシン (Windows or
Mac) • iOS アプリの場合: Mac only – デバッグ用マシン (Android) • エミュレーターは遅いため必須 • 複数あったら嬉しい
Android アプリ開発 概要 (4/4) • 必要なソフトウェア – Android Developer Tools
(ADT) – Android Studio • 必要なお金 – 端末代 (持っていれば不要) – サーバー代 (場合による) – Google 開発者登録料 ($25) • Google Play に公開する際に必要
Android 側 プログラム (1/3) • プログラミング言語: Java を採用 – Android
標準 – (Android 問わず) 最も使われている – オブジェクト指向 – 静的型付け、硬派
Android 側 プログラム (2/3) Android Developer Tools
Android 側 プログラム (3/3) • Android のバージョンに注意 Android 4.x 以前
14.3 %
サーバー側 プログラム (1/4) • クライアントとサーバー側の連携図 Android 端末 サーバー Web ページ
スクレイピング Web ページを解析 データベースに保存
サーバー側 プログラム (2/4) • 選択肢は無限大 – Web サービス開発技術 流用可能 –
得意な言語で • プログラミング言語: JavaScript を採用 – Java ≠ JavaScript – オーストラリアとオーストリアぐらい違う – サーバーサイド JavaScript (Node.js)
サーバー側 プログラム (3/4) • サーバーサイド JavaScript (Node.js) – Google Chrome
の JS エンジンを使用 (V8) – 低負荷, 低遅延, 高速 – ソーシャルゲームのサーバー向け • Node.js 単独でサーバーとして動作 – 実環境ではリバースプロキシを利用
サーバー側 プログラム (4/4) • Node.js フレームワーク Sails.js – MVC フレームワーク
• Ruby における Ruby on Rails • PHP における CakePHP • Python における Django – WebSocket が楽 • フレームワークレベルで組み込み – O/RM (Object-relational mapping) • 主要なものに対応: MySQL, PostgreSQL, MongoDB
サーバー - 概要 (1/3) • Heroku (PaaS) – 独自の管理コマンド –
デプロイが楽 (git push) – 無料~有料 – 自動スケーリング • AWS EC2 (IaaS) – nginx リバースプロキシ 構成可能
サーバー - nginx (2/3) • 高速・軽量 • 静的ファイル配信 • リバースプロキシ
サーバー - nginx (3/3)
ベンチマーク (1/2) • Heroku – 1X Standard Dynos • 512
MB $0.05/dyno hour – Add-ons: MongoHQ Sandbox free – 無料枠内 • AWS EC2 – t2.micro – 12ヶ月無料体験枠内
ベンチマーク (2/2) ※ 6ヶ国のロード時間の平均 http://internetsupervision.com 0.00 0.10 0.20 0.30 0.40
0.50 0.60 0.70 0.80 0.90 Heroku AWS EC2 ベンチマーク結果
まとめ
まとめ • Android 開発は面倒 – Web の技術を流用する手法もあり • Cordva /
PhoneGap • 古い OS のサポートも面倒 – 旧 Ver は遅い, API (機能) が少ない, バグが多い – ターゲット層によって対象を絞る
参考文献 • InternetSupervision http://internetsupervision.com/ • 高速・軽量・高機能……Nginxの基礎知識 (1/2) http://www.atmarkit.co.jp/ait/articles/1406/17/news013.html • Dashboards
| Android Developers http://developer.android.com/about/dashboards/index.html