Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
deploy legacy web on the cloud
Search
Ching Yi Chan
November 14, 2014
Programming
2
1.8k
deploy legacy web on the cloud
2014 JCCONF 快講:老舊 Web 上雲端
talk from
http://jcconf.tw/legacy-web-to-cloud.html
Ching Yi Chan
November 14, 2014
Tweet
Share
More Decks by Ching Yi Chan
See All by Ching Yi Chan
[coscup] Reading and modifying the source code of the dbt adapter
qrtt1
0
93
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
66
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.1k
寫個好懂的程式
qrtt1
1
560
OAuth 2.0 Authorization Code Flow
qrtt1
0
240
types of knowledge
qrtt1
1
1.2k
twjug 小活動
qrtt1
0
400
TWJUG 2019
qrtt1
0
180
Learning Concepts
qrtt1
0
170
Other Decks in Programming
See All in Programming
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Click-free releases & the making of a CLI app
oheyadam
2
120
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
cmp.Or に感動した
otakakot
3
200
C++でシェーダを書く
fadis
6
4.1k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
最新TCAキャッチアップ
0si43
0
190
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
What's new in Ruby 2.0
geeforr
343
31k
Building Applications with DynamoDB
mza
90
6.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Thoughts on Productivity
jonyablonski
67
4.3k
Gamification - CAS2011
davidbonilla
80
5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Transcript
老舊 Web 上雲端 qrtt1 #JCConf
ϼᔚ8FCɪථ၌ɽၤ $BDIF $%/ "DUJWF$BDIF ০࿁வϣਪᕚה፯ٙ˴ࠅ˙ج
$BDIF $%/ "DUJWF$BDIF ০࿁வϣਪᕚה፯ٙ˴ࠅ˙ج ྼ᜕ሯٙ˴ਗόҞ՟ ڢ੬ెพ ࠠอܠϽҞ՟ٙ࿁ၾഄଫ ϼᔚ8FCɪථ၌ɽၤ
$BDIF $%/ "DUJWF$BDIF ০࿁வϣਪᕚה፯ٙ˴ࠅ˙ج ྼ᜕ሯٙ˴ਗόҞ՟ ڢ੬ెพ ࠠอܠϽҞ՟ٙ࿁ၾഄଫ ਕٜՑ˰ޢٙး᎘ ϼᔚ8FCɪථ၌ɽၤ
老舊 Web 上雲端 ݊ɓ၇࿁ೌجၪᚐٙ8FCਖ਼ࣩٙయ၈
老舊 Web 上雲端 CBETNFMMɽණΥ όᅵٙEVQMJDBUFEDPEF όᅵٙMPOHNFUIPE DMBTT όᅵٙVOUFTUBCMFDPEF
老舊 Web 上雲端 ͟MFHBDZDPEF˄̙ə ɪථ၌ࠇྌdϞࡈɽۃlll ʔҷ݅Ϟό
老舊 Web + 老舊機器 *5ɛ⨈ٙ Ѣྤ Linux www.iradiopop.com 2.6.26.8-57.fc8
#1 SMP Thu Dec 18 18:59:49 EST 2008 x86_64 x86_64 x86_6
S1 S2 LB Պۨٙ8FCݖ ̨-PBEJOH#BMBODFS ߰ʍࡈܝ၌4FSWFS Ѣྤ
S1 S2 LB Դ͜ඎ တ̈Ըࣛn Ѣྤ
S1 S2 LB ೌجਕeϥዚeஹʔɪeࠠක ᑋٙ-# ึኬΣᒔঐਗٙዚኜ
S1 S2 LB ೌجਕeϥዚeஹʔɪeࠠක ᑋٙ-# ึኬΣᒔঐਗٙዚኜ
S1 S2 LB Ѣྤ Ϥɗ $SBTIᔔᔔؐ ߮༻ٙ4ZT"ENJO
S1 S2 LB ථ၌ Դ͜ඎ တ̈Ըࣛn
S1 S2 LB ථ၌ S3 S4 ఱ̋һεዚኜᱍϞ፺ॆλ
S1 S2 LB ථ၌ ᄳΎᒛٙ8FCேϞ፬ج 4DBMF0VU 4DBMF*O ̥݊ࠢɽ፩Ԅλணࠇٙϓۜ TUJDLZTFTTJPO
ν؈ЫܘϞ፺
貴、順、爽 貴、順、爽 LB ̙˸൯ܘ൮ٙዚኜ
窮 窮 LB ̙݊ɭ ɓছٙʃʮ̡ ε̒͟ک֝ٙዚኜක༊
輕 Ꮸী ཫၑϞࠢd ൯ʔՑԑ1PXFSٙዚኜࣛ ࡡ͉Ҟٙή˙ᜊ࿔ə$16 ࿔ٙή˙ᜊҞə*0
Ꮸী request business logic db query
Ꮸী request business logic cache db query
Ꮸী request business logic cache db query ᔚዚኜٙ*0ˢථ၌ᒔ࿔d ה˸ࡡ͉࿔ٙᜊҞə
Ꮸী request business logic cache db query ᔚዚኜٙ$16ˢථ၌ᒔҞd ה˸ࡡ͉Ҟٙᜊ࿔ə for(…)
{ for(…) { for(…) { /* 很暴⼒力地過濾資料 */ } } }
Ꮸী request cache db query business logic ৎԸ݊ࡈ һ࠽Ҟ՟ٙ࿁ Active
Cache
ܠ༩ Active Cache request cache heavy business logic ϞҞ՟dఱ݊න
ܠ༩ Active Cache request expired cache heavy business logic ӚҞ՟dఱഃ
ഃܙ
ܠ༩ Active Cache request heavy business logic active cache ٝ༸νОһอІʉٙҞ՟
"DUJWF$BDIF ʔഃܙ
ెพ Active Cache Active Cache ༟ࣘཀಂۃ ࣛ d˴ਗࠠҴ༟ࣘ ତϞٙ-JCSBSZ HVBWB$BDIF-PBEFS
BUTMFHBDZDPEF˄ᗭҷd Ӕ֛˸ʔҷDPEFމͦᅺ
ెพ Active Cache Դ͜"01ౢɝ"EWJDF ᜫCVTJOFTTMPHJD˕౪"DUJWF$BDIF ਗ਼NFUIPEDBMMᔷϓDBDIFLFZ ൗ̅NFUIPEDBMMЇDBDIFSFGSFTITDIFEVMFS
active cache ెพ Active Cache request business logic KEY Cached
Refresh Scheduler business logic method call to cache key register key + method call to scheduler
active cache ెพ Active Cache request business logic Cached Refresh
Scheduler cache storage auto refresh business logic Դ͜٫Ցٙ CVTJOFTTMPHJD ॆ͍ٙ CVTJOFTTMPHJD
ెพ Active Cache "DUJWF$BDIF͉Ը݊މəಯˇഃܙࣛගணࠇ ׳ίථ၌ɪdܦ̷ಯˇə#VTZ+PCว༟๕ٙਪᕚ ͟DBDIFSFGSFTITDIFEVMFSࠢՓ-PBEJOH
ྼЪ Active Cache ٙ฿ׂܘᔊఊ Դ͜"01"EWJDFᘗ࿚NFUIPEDBMM ,&:NFUIPE BSHVNFOUT
ྼЪ Active Cache NFUIPE" VTFS*OGP TUS JOU NBQ PUIFS1PKP
LFZTJHOBUVSF@ BSHT<> BSHT<> BSHT<n> NFUIPE"@6TFS!BBBB@TUS@@\B C^@ NFUIPE"@VTFS@TUS@@\B C^@ ϞԬيUP4USJOHܝٙഐ؈ʔΥ͜d౬ϓՉ˼तᅄ˾ಁ
ྼЪ Active Cache ϞԬيdӚϞHFUUFSঐ՟तᅄl ͜"01ᘗ࿚ܔɿਞᅰdႡЪᗆй༟ࣘ NFUIPE# VTFS-JTU DPNQBSBUPS NFUIPE#@VTFS@VTFS@n@DPNQBSBUPS!BC
NFUIPE#@VTFS@VTFS@n@DNQ!4PSU#Z%BUF
ྼЪ Active Cache "DUJWF$BDIFνОٝ༸༈һอək ݊6TFSխ̣ٙఱΟ$BDIF ݊4DIFEVMFSխ̣ٙఱ3FGSFTI javax.servlet.http.HttpServlet.service(HttpServlet.java:641) stacktrace 看到 HttpServlet.service
就當他是 User 唄
Ⴣ˙ ආɝථ၌ࣛ˾d 8FC"QQԱᔚ݊τༀί4FSWFSɪٙ ࠅνОਕᕎዚג༰Ⴣٙ܄˒݊ࡈਪᕚ
Ⴣ˙ ܄˒௰ɽdШ܄˒ٙЗໄܘᏇ҄lll ڛזЬeڶᖯeΙܓeࡾʿen ᕎ7.ዚגܘჃd Шᕎ$%/&EHF-PDBUJPOӚԟჿჃf
Ⴣ˙ л͜$%/ෂਗ࿒༟ࣘdቇΥᔊఊٙ3&45'6-4FSWJDF request / response λჃ˅ྪჃ
Ⴣ˙ λჃ˅ྪჃ filter CDN )551 ࡡԸҢࡁவჿڐ request / response ਕٜՑ˰ޢٙး᎘
л͜$%/ෂਗ࿒༟ࣘdቇΥᔊఊٙ3&45'6-4FSWJDF DBDIFEVSM
Ⴣ˙ਕٜՑ˰ޢٙး᎘ νОԴ$BDIF&YQJSF $%/JOWBMJEBUJPOܘ࿔d౬༩ࢰܘҞ IUUQDEOUJNFXJOEPXUPLFOSDBDIFLFZ IUUQDEOUJNFXJOEPXUPLFOHDBDIFLFZ IUUQDEOUJNFXJOEPXUPLFOCDBDIFLFZ ⼩小⼼心安全問題,不要放敏感資料
$BDIF $%/ "DUJWF$BDIF ০࿁வϣਪᕚה፯ٙ˴ࠅ˙ج ྼ᜕ሯٙ˴ਗόҞ՟ ڢ੬ెพ ࠠอܠϽҞ՟ٙ࿁ၾഄଫ ਕٜՑ˰ޢٙး᎘ 2" ϼᔚ8FCɪථ၌