ãã¯ãã¯ããããã®ãã®ã¥ããã»ããã¼ã«è¡ã£ã¦ããã¾ã¨ã
æ¨æ¥ãã¦ã§ããã£ãªã¢ããã主å¬ãã月間524万人が利用する食のインフラ、「クックパッド」のものづくりセミナーã«è¡ã£ã¦ãã¾ããã
ã¯ãã¯ãããã¨è¨ãã°Rails ã§ã®å¤§è¦æ¨¡ãªãã¥ã¼ã¢ã«ããã¥ã¼ã¹ã«ãªãã¾ãããã¾ãã大è¦æ¨¡éçºã«ã¯åããªãã¨è¨ããããã¨ãããRails ã§ããã»ã©å¤§è¦æ¨¡ãªãµã¤ããéçºãããã¦ãã¦ã«èå³ããããåå ãã¾ããã
ãã¡ããã¡ãè¯ãæ
å ±ãå¾ããã¨ãã§ãã¾ãããããã¯ãããã»ããã¼ã§ããã以ä¸ãã¾ã¨ãã§ããã¡ã¢ä¸è¶³ã ã£ãã®ã§ãä¸é¨ä»ã®ãµã¤ãã®æ
å ±ãå
ã«ã¾ã¨ãã¦ãã¾ãã
CookPad æ¦è¦
æ§æ
- Rails 2.0ï¼ç¾å¨2.1 ã«ç§»è¡ä¸ï¼
- Mongrel 1.1.5
- mongrel_cluster 1.0.5
- MySQL 5.0.45
- Apache(2.2.3) 8å°
- mod_proxy_balancer
- App ãµã¼ã44å°
- DB Slave ãµã¼ã22å°
- ä»®æ³ãµã¼ãã使ã£ã¦ã1ã¤ã®ãã¼ãã«App 2å°ãDB Slaveï¼å°
- ãã° DB ãµã¼ã 16å°
- ãã°ãMySQL ã§ç®¡ç
- ã¬ã·ãå
¨ææ¤ç´¢ç¨
- Tritonn
- MySQL ã¯ã©ã¤ã¢ã³ãã使ã£ã¦å ¨ææ¤ç´¢ã§ãã
ãµã¼ãã®å°æ°ãèµ°ãæ¸ãã§æªããã§ã
éç¨ãã¼ã«
- god
- mongrel ã¯åããã£ã±ã«ããã¨ã¡ã¢ãªã使ãåãåé¡ããã
- ã¡ã¢ãªï¼CPU 使ç¨çã®ãããå¤ãè¨å®ãã¦åèµ·åãã¦ããããã¼ã«
- ãã¡ã¦ããmongrel ãåèµ·åãã¦ãããæ©è½ãããããã
- Munin
- ãµã¼ãã¢ãã¿ãªã³ã°
- FiveRuns Manage
ããã©ã¼ãã³ã¹æ¹å
- 1. ãã£ãã·ã¥
- 2. ã¯ã¨ãªãã¥ã¼ãã³ã°
- 3. DB åå²
1. ãã£ãã·ã¥
- Mongrel ã¯éã
- ãã¼ã¸ãã£ãã·ã¥ãã¡ã¤ã³ã§å®è£
ãã¦ãã
- Apache ã§ãã£ãã·ã¥ãè¿ã
- ãã¼ã¸ãã£ãã·ã¥ã ã¨ã次ã®3ã¤ãã§ããªã
- ãããããââãããçã®ã¦ã¼ã¶æ¯ã®ç°ãªã表示
- ã¢ã¯ã»ã¹ãã°ã®åéããã£ãã·ã¥ã ã¨App ãµã¼ãã¾ã§æ¥ãªãã§ãã°DB ã«æ¸ãè¾¼ããªã
- ãªã¯ã¨ã¹ãæ¯ã«ãã¨ãªãåºåã®è¡¨ç¤º
- ããã3ã¤ã¯é常ã®ãªã¯ã¨ã¹ãã¨ã¯å¥ã®AJAX ã®1ãªã¯ã¨ã¹ãã§è¡ã
2. ã¯ã¨ãªãã¥ã¼ãã³ã°
- Five Runs TuneUp
- ãã®ãã¼ã¸ã®MVC ã§ã©ãã«æéãããã£ã¦ãããåãã
- éçºç°å¢ã§ã¤ãã
- ãã®M ãã©ããªSQL ã¯ã¨ãªãçºè¡ããã©ã®ãããã®æéãããã£ã¦ãããåãã
- デモã«ããããã«ãâ¼ã§ã©ãã©ãåæã§ããããããæåãã®ã§ããï¼ï¼
3. DB åå²
- 08å¹´7æã«ãªãã¥ã¼ã¢ã«ããæã«ã¯ã1å°ã®ãµã¼ãã«2å°ã®App ãµã¼ãã1å°ã®Slaveã1å°ã®æ¤ç´¢ç¨DB ãä»®æ³ãµã¼ãã¨ãã¦ã®ãã¦ãã
- ããã©ã¼ãã³ã¹ãå ¨ç¶ã§ãªãã£ã
- æ¤ç´¢ç¨DB ãSlave ã«çµ±å
- æ¤ç´¢ç¨DB ãµã¼ãããªãåãSlave ã«å½ã¦ãããã¡ã¢ãªãå¢ãã¦ããã©ã¼ãã³ã¹æ¹å
- DB ãµã¼ãã¯ãã¡ã¢ãªå®¹é > DB ãã¼ãã«ã®ãã¡ã¤ã«ã®å®¹éãã大å
- ã¡ã¢ãªï¼ãã¼ã¸ãã£ãã·ã¥ï¼ã«ã®ããããªãã¨ãSwap ãçºçãããã®åéããªã
- DB èµ·åå¾ã¯DB ã®ãã¡ã¤ã«ãcat ãã¦/dev/null ã«æãã¦ããã£ã¦ããã¢ã¬ã
éçºãã¦ãã¦
- DB ã¬ããªã±ã¼ã·ã§ã³
- acs_as_readonlyable ã使ç¨
- æ´æ°ç´å¾ã®SELECT ã¯ãã¹ã¿ãè¦ã«è¡ãããã«å·¥å¤«
- ã¬ã·ãå
¨ææ¤ç´¢
- Tritonn ã使ç¨
- MySQL ãæ¡å¼µãããã®
- MySQL ã®ãã¼ãã«ã¨JOIN ã§ãã
- 2ã¤ã³ããã¯ã¹
- MySQL ã¯ä¸åã®SELECT ã«1ã¤ã®ã¤ã³ããã¯ã¹ã®å¶éããã
- ãããæ¡å¼µãã¦2ã¤ã®ã¤ã³ããã¯ã¹ã使ããããã«ãã¦ãã
- ä¸åçµãè¾¼ãã§ããã®ä¸ã§å ¨ææ¤ç´¢ããã£ã¦ãã¨ãã§ãã
- ã¤ã³ããã¯ã¹è²¼ã£ããã¡ã¤ã«ãscp ãã¦ããã¨ããã«Triconn ã§ä½¿ããï¼?ããåãããªãã£ãï¼
- åºåã®ããã®ãã¬ãã¥ã¼
- æªæ¥ã®æ¥ä»ã«é ä¿¡ãããåºåã®ãã¬ãã¥ã¼æ©è½
- ãã®åºåãããã¦ãã¼ã¸ãå´©ãããããªããåãã£ã¦ç¢ºèªãããã
- å
¨ã¦ã®ãã¼ã¸ã§ä½¿ããæ©è½
- http://..../?2008-11-12 ã¨ããã¨ããã®ãã¼ã¸ã®æå®ããæ¥ã®ç¶æ ã表示
- 誰ã§ã使ããªãããã«ã¢ã¯ã»ã¹å¶éãããã¦ãã
- Time.now ã®ä¸æ¸ãã§å®ç¾
ãã®ã¥ãããã¦ãã¦
- 1. ã¤ãããã®ã決ãã
- 2. è¨ç»ãã
- 3. ãã®ã¥ãã3åå
- 4. è¨è¨ãã
- 5. éçºããï¼éçº3ååï¼
- 6. 質ãé«ãã
1. ã¤ãããã®ã決ãã
- A. Best ã«éä¸ãã
- ãBetter ãªãã¨ããã£ãã»ãããããã¨ãã¯ãããªã
- Best ãªãã¨ã¨ã¯ã以ä¸ã®3ã¤ã®æ¡ä»¶ãæºãã
- æ ç±ããã£ã¦ããããï¼ã£ã¦æãããã¨
- å¾æãªãã¨ãããã«é¢ãã¦ã¯ä¸çä¸ã«ãªããã»ã©å¾æ
- ããã¹ãã㨠= åçåã«ã¤ãªããã¨ãããã¨
- B. ã¦ã¼ã¶ã®æ¬²æ±ã«ãã¨ã¥ã
- EOGS ã¨ããåææ¹æ³ã使ã
- ãã®ãµã¼ãã¹ã«é¢ããã¦ã¼ã¶ãè¨å®
- ãã®ã¦ã¼ã¶ã®æ¬²æ±ãåæ
- å欲æ±ãã©ããã£ããæºãããããèãã
- ãã®å ¨ã¦ã解決ã§ããæ¹æ³ãæ¢ã
- ãããæåãã¦ããã¤ã¡ã¼ã¸ãè¡ã
- ãã®ã¤ã¡ã¼ã¸ã«å¯¾ãã¦æ°åã§ã®åæãè¡ããæ¬å½ã«æ¬²æ±ãæºããã¦ããããæ¤ç®ãè¡ã
- EOGS ã¨ããåææ¹æ³ã使ã
2. è¨ç»ãã
- ã¹ã±ã¸ã¥ã¼ã«ã®æ±ºãæ¹
- ã¹ã±ã¸ã¥ã¼ã«ã®3åå²ã®æ³å
- ãµã¼ãã¹ãä½ãä¸ã§è¡ããã¨ã«ãªãã以ä¸ã3ã¤å
¨ã¦ã«åãæéãããããç¨ã«ã¹ã±ã¸ã¥ã¼ãªã³ã°ãã
- è¨è¨
- éçº
- 質ãé«ãã
- ãã¤ã³ãã¯ãéçºæéã3é±éã ã¨ããã¨ã1é±é以å ã«è¨è¨ã§ããæ©è½ããéçºãããã¨ããªããã¨ãBest ã«éä¸ãã
3. ãã®ã¥ãã3åå
- A. ç¡è¨å®è¡
- å ¬éåã«ãµã¼ãã¹ã«é¢ãã¦ä¸åå ¬è¨ããªã
- ã¦ã¼ã¶ã®ä¸å®ãããããã¨ã«ãªã
- åç¥ããã¡ãªããããªã
- B. ç¡è¨èªå
- æ©è½ãè¨èã§èª¬æããªãã説æããªãã¦ãåããããã«ãã
- ããã®ãã¿ã³ãæ¼ãã¨ââã§ãã¾ããï¼ãã¨ã説æããªãã¨ããããªãUI ã¯ä½¿ãããªã
- åºæºã¨ãã¦ã2ç§ä»¥å ãã§ç解ã§ããªãUI ã¯ä½¿ããããã¦ã¼ã¶ã¯ä»ã®é¨åãã¯ãªãã¯ãã¦ãã¾ãã¨èããï¼2ç§ã ã¨è¨èã§ã®èª¬æã¯ç¡çãªã®ã§ãç¡è¨èªåããï¼
- ãã«ããFAQ ãèªã¾ããã®ã¯ã¦ã¼ã¶ã«è² æ ãããããã¨ãããèªã¾ããªã
- æ©è½ãè¨èã§èª¬æããªãã説æããªãã¦ãåããããã«ãã
- C. ãµã¼ãã¹ã«å¤ãã¤ãã
- 常ã«ãããã®ãµã¼ãã¹ã¯ãããã ãããã¨èãã
- ãç¡æã ãããã®ãããã®æ©è½ã§ã使ããããããã¯ãã¡
- ãéãæã£ã¦ãããã£ã¦æããããã®ãç¡æã§æä¾ããã¦åãã¦ä½¿ããã
4. è¨è¨ãã
- A. è¨è¨ã®é çª
- åºåãªè¨è¨ããå§ãã詳細ãªè¨è¨ã¸ã¨è½ã¨ã
- è¦ä»¶å®ç¾©ï¼ãµã¤ããããï¼ãã¼ã¸é·ç§»ï¼ãã¼ã¸è©³ç´°ï¼DBæ§é
- ã¨ã³ã¸ãã¢ã好ããªè©³ç´°è¨è¨ããå§ããã¨ãæ©è½ã«ã¨ãããã
- ã¦ã¼ã¶ã«æä¾ããã®ã¯æ©è½ã§ã¯ãªãã価å¤
- B. è¨è¨ã«æä½éå¿
è¦ãªãã®
- a. æä½éã®ããã¥ã¡ã³ã
- ãããã¥ã¡ã³ãããåãã½ããã!=ãããã¥ã¡ã³ãä¸è¦ã
- æä½éã®ããã¥ã¡ã³ããããæ¹ãã¢ã¸ã£ã¤ã«ã«éçºã§ãã
- b. ãã¼ã¸é·ç§»
- 大è¦æ¨¡ãªéçºãªãããã®åã«ãµã¤ããããèãã
- ããã§ã¯åã ã®ãã¼ã¸è©³ç´°ã¯èããªããã¨
- ãããããã£ã¦ãï¼ãæ¤ç´¢ç»é¢ãã£ã¦ãï¼ãçµæãã¼ã¸ãã¨ãããããã·ã³ãã«ãªãã®ã§OK
- c. ãã¼ã¸è©³ç´°
- ææ¸ãã®å³ã§OK
- ä½ããªãããã©ãã©ãã¡ã¢ããããã«ã大ããã®ç´ã«ããã¦ä½ç½ãããã¨ãã¨ãã
- d. DBæ§é
- è¨è¨ã®éã«ãããã¿ã¤ããä½ã£ãããããããããã¿ã¤ãä½æã¯éçºã§ãªããè¨è¨æ®µéã«è¡ã
- a. æä½éã®ããã¥ã¡ã³ã
5. éçºããï¼éçº3ååï¼
- A. Rail ã«ä¹ãç¶ãã
- B. ãªãã¡ã¯ã¿ãªã³ã°ãç¶ããããããã³ã¼ãã®è³ªãä¿ã¤
- TDD
- 2006å¹´ã«ä¸åRails ã§ãªãã¥ã¼ã¢ã«ãããã¨ããããããã®ã³ã¼ãã¯2å¹´ã§æ¡å¼µä¸è½ã«ãªã£ã
- çµå±ã¾ã1ããä½ããã¨ã«ãªã£ã
- ãªãã¡ã¯ã¿ãªã³ã°ãè¡ããªãã¨å¯¿å½ã¯2å¹´ã§çµãã
- C. DRY
- DRY ãããã¦YAGNï¼ãããå¿ è¦ã«ãªããªããªãï¼ ã«ãªããªãããã«
6. 質ãé«ãã
- ã¦ã¼ã¶ãã¹ããè¡ã
- ãã®éãä¸åã®è³ªåã«çããªã
- 次ã®ç¹ãè¦ã
- æ£ãã価å¤ãæä¾ã§ãã¦ããã
- ãã¡ããæ³å®ããéãã«æ©è½ã使ããã¦ããã
- æ³å®ã¨éã£ããä½ãç´ã
ææ³
ã¾ãããã£ããããå²å¦ãæã£ã¦éçºããã¦ããã¨æãã¾ãããããã¾ã§èãã¦ãããããããããã»ã©ã®ãµã¤ããã§ãããã§ããããã®å²å¦ã¯åºåã«ãåã³ãããµã¤ãã«ã®ããåºåãæçãã楽ãããªãåºåã§ãªãã¨ãããªããã¨ãã£ããã£ã¦ãã¾ããããã®è¾ºããApple ã®ã«ãããæãã¾ãã
ã¡ã³ãã¼ãããªã¨ã¼ã·ã§ã³ã«å¯ãã§ãã¦ããå¤ãUNIX ã®æè¡ãææ°ã®Rails ã«å¿ç¨ããã§ããªãããã¨ããèãã¦ãã人ãããã¨ããã¨ã¦ãé¢ç½ããã§ããï¼(*´è¸ï½)
CookPad ã ãã«ãæºè
¹ãªã»ããã¼ã§ãããç´ æ´ãããã£ãã§ãã1æéã¨ããçãæéã«ããã ãã®å
容ãã話ãã¦ä¸ãã£ããCTO の橋本さんãããã¦ãç´ æ´ãããã»ããã¼ãæä¾ãã¤ã¥ãã¦ä¸ããã¦ã§ããã£ãªã¢ããã«ã礼ç³ãä¸ãã¾ãã
æ©æ¬ããã«è³ªåããï¼
æ親ä¼ã®éã«ã以ä¸2ç¹ã質åãã¾ããï¼ä¸å¯§ã«æãã¦ãã ãããæè¬æè¬ã§ãm(_ _)m
- Q. Rails ã®ãã¼ã¸ã§ã³ã¢ããã«è¿½å¾ãã¹ãã
- A. ãã®ã¢ããªã®å¯¿å½ã«ãããã¯ãã¯ãããã¯100å¹´å ãç¶ãã¦ãããã®ã§ããã¼ã¸ã§ã³ã¢ããã«å¯¾å¿ãç¶ãããã¾ããæ°ããæ©è½ã使ããã®ãé åã ãããã¼ã¸ã§ã³ã¢ãããã¦ãããªãã¨ãä¸ã«é ãã¦è¡ã£ã¦ãã¾ããæ°ããç©ã¨åè² ã§ããªããªã£ã¦ãã¾ã