Mongodb with play

3,350 views

Published on

JCO 2011 발표 자료입니다.

0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,350
On SlideShare
0
From Embeds
0
Number of Embeds
773
Actions
Shares
0
Downloads
60
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Mongodb with play

  1. 1. MongoDB with Play! 채수원 (LG CNS) doortts@gmail.com Revision: 2011.6.17 2011 JCO 11th Conference | Track2-Session5 | Javacommunity.Org
  2. 2. Who am I Role - LG CNS 전문기술교육팀 전임강사 - LG CNS Agile Coach Specialty - 객체지향 설계 - 애자일 개발 - 팀 생산성 향상 Book -TDD실천법과 도구 (2010,한빛미디어)
  3. 3. Why am I here? 목적 웹 서비스를 개발하는 방식에 대해 되짚어 보고 ‘생산성’이라는 측면에 대해서 생각해 본다. 목표 - MongoDB와 Play 프레임워크의 컨셉을 이해한다. - 특징적인 기능들을 간략히 살펴본다. - 짧은 시간안에 서비스를 만들어 내는 어떤 방식을 살펴본다.
  4. 4. My personal dev era...PHP 개발(in my opinion)- Easy to learn and use- First 5 pages for 5 hours (exclude design works)
  5. 5. My personal dev era...Java기반 웹 개발로 전환...
  6. 6. My personal dev era...I need...
  7. 7. 여기에는 사실...
  8. 8. Front-end 기술들은 제외하고!
  9. 9. 우리의 관심을 분산시키는이런저런 기술들도 제외하고!
  10. 10. ??? ??? ??? ??? ??? ??? ??? ??? 그리고도 VVMM (...)??? ??? ??? ??? ??? ??? ??? ???
  11. 11. We are here IT Universe
  12. 12. My personal dev era...Java 기반 웹 개발(in my opinion)- NOT easy to learn and use- First 5 pages for 50 hours !!
  13. 13. Someone says… No Pain, No Gains !
  14. 14. No!!! No More Pain!!
  15. 15. 잠깐! 그런데,우리가 지금뭘 하고 싶은 거죠?
  16. 16. Developing WEB
  17. 17. over1000 projects / year
  18. 18. New kids on the street
  19. 19. In cases...
  20. 20. Idea  Time  Service
  21. 21. Productivity focused Big Hits!!
  22. 22. Productivity focused
  23. 23. Productivity focused ???
  24. 24. Productivity focused in Java http://playframework.org
  25. 25. ‘Play!’의 목표 be productive quickly and efficiently
  26. 26. GWT Rails Grails Play!http://raibledesigns.com/rd/entry/open_source_web_frameworks_mailing
  27. 27. Key features• Fix the bug and hit reload!• Stateless model (Ready for REST)• Efficient template system(based on Groovy)• Asynchronous (long polling and WebSockets)• Full stack integration with Hibernate, OpenID, OAuth, Memcached…• Pure Java• Resolve errors quickly• Fun & Productive
  28. 28. Demo Play framework 百問 不如一見
  29. 29. 생각해 볼 문제들 - 장점과 단점? - 성능은?
  30. 30. And Then...
  31. 31. We Need Box and Line!!• JPA?• JDBC?• RDBMS... MSSQL? ORACLE? MySql? PostgreSQL?Which one is easiest one to development with?
  32. 32. My personal dev era... SQL & PL/SQL (in my opinion) - Not hard, but there is need time to learn and use - and, so many spoilers...
  33. 33. AND ROWNUM = 1) AS dest_ptnr_ph, m1.consol_yn,WITH C1 AS ( TKAFXC012 B, Tracking03.sql (1/4 page) m1.pol_nation_cd, m1.consol_mbl_no, SELECT /*+ USE_NL(B A) */ TKAFXC001 A m1.fdest, ${userMail} AS send_mail A.TB_BL_MNGR_NO , WHERE A.TB_BL_MNGR_NO = B.TB_BL_MNGR_NO m1.fdest_nation_cd, FROM (SELECT Q.TB_BL_MNGR_NO, A.HBL_NO , Q.HBL_NO, AND B.REF_NO = C.VALUE (SELECT g21.nation_nm A.MBL_NO , AND A.BIZ_UNIT_CD = 300 FROM TKAFcm021 g21 A.CARRIER_CD , DECODE(Q.CU_PROD_TYPE,AP,Q.HBL_NO AND A.EXIM_TYPE = 10 WHERE g21.nation_cd = A.CARRIER_NM , ,Q.MBL_NO) MBL_NO, AND A.DEL_YN = N m1.fdest_nation_cd) AS fdest_nation_nm, A.FDEST , Q.CARRIER_CD, AND B.REF_SEQ = 1 to_char(to_date(m1.eta_dt, A.DPTR_PTNR_CD , YYYYMMDDHH24MI), MON DD, YYYY) AS AND B.DEL_YN = N DECODE(Q.CU_PROD_TYPE,AP,PANTOS, A.DEST_PTNR_CD , eta_dt, AND B.REF_NO_TYPE IN (24,4) DECODE((SELECT com_cd_nm A.POL_NATION_CD , to_char(to_date(m1.pickup_dt, ) YYYYMMDDHH24MI), MON DD, YYYY FROM TKAFXA102 WHERE GRP_CD = 014 A.FDEST_NATION_CD, SELECT M1.V_RANK, HH24:MI) AS pickup_dt, AND COM_CD = CARRIER_CD AND USE_YN A.SERVICE_TYPE, m1.TB_bl_mngr_no, = Y ),,Q.CARRIER_NM, A.CONSOL_YN, m1.STS_CD_IMAGE AS img_status, m1.hbl_no, (SELECT com_cd_nm FROM A.CONSOL_MBL_NO, FC_GET_TRACKING_LOC(m1.TB_bl_mngr_no, TKAFXA102 WHERE GRP_CD = 014 AND m1.mbl_no, m1.STS_CD_TITLE) AS location, A.CU_PROD_TYPE, COM_CD = CARRIER_CD AND USE_YN = Y m1.carrier_cd, m1.STS_CD_TITLE AS STS_CD, ))) CARRIER_NM, B.V_RANK m1.carrier_nm, (SELECT cfm281.pli_name Q.FDEST, FROM TKAFXC001 A, m1.dptr_ptnr_cd, FROM TKAFcm091 cfm281 Q.DPTR_PTNR_CD, CARRIER_CD B m1.dest_ptnr_cd, WHERE cfm281.pli_code = m1.STS_CD_TITLE Q.DEST_PTNR_CD, WHERE A.HBL_NO = B.VALUE (SELECT GTB303.pic_nm AND cfm281.code_type IN Q.POL_NATION_CD, AND A.BIZ_UNIT_CD = 300 FROM TKAFxa303 GTB303 (TRACKING_STATUS, IRRE_CODE) ) AS AND A.EXIM_TYPE = 10 Q.FDEST_NATION_CD, status, WHERE GTB303.nation_cd = Q.ETA_DT, AND A.DEL_YN = N (SELECT a01.message m1.pol_nation_cd UNION Q.PICKUP_DT, AND ROWNUM = 1) AS dptr_ptnr_nm, FROM TKAFxa501 a01 SELECT /*+ ORDERED USE_NL(C B A) */ Q.ONBOARD_DT, (SELECT GTB303.pic_nm WHERE a01.locale = ${nowLang} A.TB_BL_MNGR_NO , Q.SERVICE_TYPE, FROM TKAFxa303 GTB303 AND a01.code = m1.STS_CD_TITLE ) AS A.HBL_NO , lang_status, Q.CONSOL_YN, WHERE GTB303.nation_cd = A.MBL_NO , to_char(to_date(m1.loc_event_dt, Q.CONSOL_MBL_NO, m1.fdest_nation_cd A.CARRIER_CD , YYYYMMDDHH24MI), MON DD, YYYY MAX(Q.V_RANK) V_RANK, AND ROWNUM = 1) AS dest_ptnr_nm, A.CARRIER_NM , HH24:MI) as loc_event_dt, MAX(DECODE(Q.RANK,1,Q.STS_CD,)) (SELECT GTB303.pic_email A.FDEST , decode(m1.STS_CD_TITLE, DLV, STS_CD_TITLE, FROM TKAFxa303 GTB303 m1.event_desc, ) AS signature, MAX(DECODE(Q.RANK_1,1,Q.STS_CD,)) A.DPTR_PTNR_CD , WHERE GTB303.nation_cd = STS_CD_IMAGE, (SELECT decode(cfm281.code_type, A.DEST_PTNR_CD , m1.pol_nation_cd MAX(DECODE(Q.RANK,1,Q.LOC_EVENT_DT, TRACKING_STATUS, REG, IRRE_CODE, A.POL_NATION_CD , AND ROWNUM = 1) AS dptr_ptnr_email, IRR) )) LOC_EVENT_DT, A.FDEST_NATION_CD, (SELECT GTB303.pic_email MAX(DECODE(Q.RANK,1,Q.SORT_STD,)) FROM TKAFcm091 cfm281 A.SERVICE_TYPE, SORT_STD, FROM TKAFxa303 GTB303 WHERE cfm281.pli_code = m1.STS_CD_TITLE MAX(DECODE(Q.RANK,1,Q.EVENT_DESC,)) A.CONSOL_YN, WHERE GTB303.nation_cd = AND cfm281.code_type IN EVENT_DESC, A.CONSOL_MBL_NO, m1.fdest_nation_cd (TRACKING_STATUS, IRRE_CODE) ) AS MAX(DECODE(Q.RANK,1,Q.EVENT_PLACE,)) A.CU_PROD_TYPE, AND ROWNUM = 1) AS dest_ptnr_email, code_type, EVENT_PLACE C.V_RANK (SELECT GTB303.pic_tel_no to_char(to_date(m1.onboard_dt, FROM (SELECT R.TB_BL_MNGR_NO, FROM FROM TKAFxa303 GTB303 YYYYMMDDHH24MI), MON DD, YYYY (SELECT cfm281.pli_name HH24:MI) onboard_dt, TKAFXC012 B, WHERE GTB303.nation_cd = FROM tb_gcm091 cfm281 m1.pol_nation_cd (SELECT PLI_NAME FROM TKAFCM091 x TKAFXC001 A WHERE cfm281.pli_code = m1.STS_CD_TITLE WHERE CODE_TYPE = SERVICE_TYPE AND LOC_EVENT_DT, AND ROWNUM = 1) AS dptr_ptnr_ph, AND cfm281.code_type IN x.PLI_CODE = m1.SERVICE_TYPE) SORT_STD, (SELECT GTB303.pic_tel_no service_type, (TRACKING_STATUS, IRRE_CODE) ) AS EVENT_DESC, FROM TKAFxa303 GTB303 status,
  34. 34. One possible solution by
  35. 35. What is MongoDB?MongoDB (from "humongous") is a scalable, high-performance, open source, document-oriented database. (Written in C++)
  36. 36. Why MongoDB?• Easy to learn and use• No! SQL !!!• JavaScript• JSON-like Document• Open Source• Scalability
  37. 37. Key features• Document-oriented storage• Full Index Support• Replication & High Availability• Auto-Sharding• Querying• Fast In-Place Updates• Map/Reduce• GridFS• Commercial Support
  38. 38. And ...
  39. 39. Easy to Try on Online~!
  40. 40. Easy to run• 압축을 푼다.• mongod• 끝!
  41. 41. Drivers
  42. 42. Demo MongoDB 百問 不如一見
  43. 43. 생각해 볼 문제들 - 장점과 단점? - 간과하는 부분?
  44. 44. Real World Example Message Board 만들기 in 10min powered by Play! and mongoDB
  45. 45. CAUTIONS!!“우리는 종종 우리에게 적합한 기술이 아니라, 우리가 쓰고 싶은 기술을 사용하기 위해 욕심(desire)을 부린다. ‘욕 심’ 그 자체는 ‘악’이 아니지만, 타인을 희생하면서까지 그 욕심을 채우려 할 때 우리는 그 걸 ‘탐욕(greed)’이라 고 부른다. 탐욕보다 배려(consideration)를 먼저 기를 수 있는 엔지니어가 많아졌으면 좋겠다”
  46. 46. 마지막으로...“Don’t waste -too much- time to choose technology. Instead, turn your pc on and write some code. I swear. That is much more better!”
  47. 47. Q&A
  48. 48. References...Reference Site (recommend!) • playframework.org • mongodb.orgImages • http://hubblesite.org/gallery/album/entire/pr2007004a/large_web/ • http://www.picturesdepot.com/wallpapers/208445/system+of+a+down+band.html • http://www.imbc.com/broad/tv/drama/superrookie/ • LG CNS MTEC 2011 Workshop PicsBooks • MongoDB definitive guide (OReilly) • The little MongoDB book (http://openmymind.net/2011/3/28/The-Little-MongoDB-Book)
  49. 49. 이 저작물은 크리에이티브 커먼스 코리아 저작자표시-비영리- 동일조건변경허락 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.This work is Licensed under Creative Commons Korea Attribution 2.0 License.

×