Presented by Tom Schreiber, Senior Consulting Engineer, MongoDB
MongoDB supports a wide range of indexing options to enable fast querying of your data, but what are the right strategies for your application? In this talk we’ll cover how indexing works, the various indexing options, and cover use cases where each might be useful. We'll dive into common pitfalls using real-world examples to ensure that you're ready for scale. We'll show you the tools and techniques for diagnosing and tuning the performance of your MongoDB deployment. Whether you're running into problems or just want to optimize your performance, these skills will be useful.
Presented by Tom Schreiber, Senior Consulting Engineer, MongoDB
MongoDB supports a wide range of indexing options to enable fast querying of your data, but what are the right strategies for your application? In this talk we’ll cover how indexing works, the various indexing options, and cover use cases where each might be useful. We'll dive into common pitfalls using real-world examples to ensure that you're ready for scale. We'll show you the tools and techniques for diagnosing and tuning the performance of your MongoDB deployment. Whether you're running into problems or just want to optimize your performance, these skills will be useful.
모티브 :
웹 페이지에서 일어나는 사용자의 단일 액션에 대응하는 일련의 프로세스를 하나의 클래스에서 구현한다. 일련의 프로세스는 사용자가 서버에 요청을 하기 위해서 클릭을 한다거나 입력을 하고 요청을 하고 그에 따른 서버 측에서 처리가 이루어지고 처리 결과를 다시 사용자의 브라우저에 통보를 하고 브라우저는 결과를 통해 사용자에게 결과를 인식 시키는 일련의 작업을 말합니다.
목적 및 장점 :
1. CRUD(Create, Read, Update, Delete) 인터랙션에 대한 처리와 시스템 장애에 대한 빠른 문제 파악과 대응
조건 :
1. XHR Wrapped클래스가 존재하여야 한다. (prototype.js, dojo, jQuery, etc)
2. XHR 오브젝트를 이용한 데이터 처리가 있어야 한다.
3. 요청을 위한 단계와 응답에 대한 처리 단계가 간단하고 명료해야 한다.
제약 :
1. 복잡한 UI 처리 및 CRUD이외의 처리가 다소 병행되어 진다면 클래스 혹은 객체가 무거워질 수 있다.
단점 :
1. 특정한 인터랙션 위한 패턴으로 확장(extend) 및 소스 재사용 면에서 용이하지 못함
모티브 :
웹 페이지에서 일어나는 사용자의 단일 액션에 대응하는 일련의 프로세스를 하나의 클래스에서 구현한다. 일련의 프로세스는 사용자가 서버에 요청을 하기 위해서 클릭을 한다거나 입력을 하고 요청을 하고 그에 따른 서버 측에서 처리가 이루어지고 처리 결과를 다시 사용자의 브라우저에 통보를 하고 브라우저는 결과를 통해 사용자에게 결과를 인식 시키는 일련의 작업을 말합니다.
목적 및 장점 :
1. CRUD(Create, Read, Update, Delete) 인터랙션에 대한 처리와 시스템 장애에 대한 빠른 문제 파악과 대응
조건 :
1. XHR Wrapped클래스가 존재하여야 한다. (prototype.js, dojo, jQuery, etc)
2. XHR 오브젝트를 이용한 데이터 처리가 있어야 한다.
3. 요청을 위한 단계와 응답에 대한 처리 단계가 간단하고 명료해야 한다.
제약 :
1. 복잡한 UI 처리 및 CRUD이외의 처리가 다소 병행되어 진다면 클래스 혹은 객체가 무거워질 수 있다.
단점 :
1. 특정한 인터랙션 위한 패턴으로 확장(extend) 및 소스 재사용 면에서 용이하지 못함
3. Worker를 이용한 병렬 처리 개념 1 출처 : http://dev.opera.com/articles/view/web-workers-rise-up/
4. Worker를 이용한 병렬 처리 개념 2 DOM UI Thread Worker new UI 변경 postMessage() postMessage() Worker로 DOM을 조작할 수 없음 메시지를 통해 데이터를 주고 받음
5. DOM 조작 불가능 (it’s not thread-safe) Window object 조작 불가능 Document object 조작 불가능 Parent object 조작 불가능 Page의 script, functions, globals조작 불가능 postMessage() 제외 Web Worker 제약
6. Object, Array, Date, Math, String 등의 Javascript객체 사용 navigator object location object(read only) setTimeout()/clearTimeout()/setInterval()/clearInternal() XMLHttpRequest Application Cache http://www.html5rocks.com/tutorials/appcache/beginner/ importScripts() 를 이용하면 외부 script 임포트(같은 도메인에 있는 script files만 가능) Web Worker에서 사용 가능한 것
7. 긴 시간이 걸리는 스크립트 매우 복잡한 수학적 계산작업 원격지에 있는 소스에 대한 Access 작업 (WebSocket) 로컬 스토리지 Access 작업 Background에서 조용히 오랜시간 해야하는 작업 UI Thread에 방해 없이 지속적으로 수행해야하는 작업 Web Worker 활용
8. //Web Worker를 지원하는가 체크 function getWebWorkerSupport() { return (typeof(Worker) !== "undefined") ? true : false; } if (getWebWorkerSupport() ) { alert(“이 브라우져는 Web Worker를 지원합니다”); } else { alert(“이 브라우져는 Web Worker를 지원안해요!”); } Web Worker 지원 브라우저 체크
9. Web Worker 지원 브라우져(2011.05) 출처 : caniuse.com 참고 : 아이폰 사파리는 지원 안함
10. 어떤 Javascript파일이든 Worker가 될 수 있다. Web Worker 사용법 1 그림출처 : http://wearehugh.com/public/2010/08/html5-web-workers/
15. Worker Worker 객체와 백그라운드 프로세스가 일대일로 대응하는 간단한 모델 var worker = new Worker(‘worker.js’); SharedWorker 여러개의 Worker 객체가 하나의 백그라운드 프로세스를 공유하는 모델 var worker1 = new SharedWorker(‘worker.js’, ‘wk’); var worker2 = new SharedWorker(‘worker.js’, ‘wk’); SharedWorker에 대해
17. Web Worker Specification http://www.whatwg.org/specs/web-workers/current-work/ The Basics of Web Workers http://www.html5rocks.com/tutorials/workers/basics/ Using web worker http://developer.mozilla.org/en/Using_web_workers Web Worker rise up! http://dev.opera.com/articles/view/web-workers-rise-up/ HTML5 Web Workers http://www.tutorialspoint.com/html5/html5_web_workers.htm (동영상)HTML5 Web Sockets, Web Workers and Geolocation Unleashed http://video.disruptivecode.com/video/840617/html5-web-sockets-web-workers References