Slide materi seminar opensource programming with node.js and mongoDB.
Slide for opensource programming seminar (with node.js and mongoDB)
in CodeLabs UNIKOM (Indonesian Computer University) Bandung
2. What is NodeJS?
“Node.js is a platform built on Chrome’s JavaScript runtime
for easily building fast, scalable network applications.
Node.js uses an event-driven, non-blocking I/O model
that makes it lightweight and efficient, perfect for dataintensive real-time applications that run across
distributed devices.”
3. How Fast
Against Python3, JavaScript V8 Engine has
a median benchmark 13 times as fast with
a roughly similar code size. 3 Against
Ruby 1.9, the median benchmark is eight
times as fast
13. Tantangan
• Asynchronizing I/O
• Debugging
• CPU-Intensive Tasks
– Harus berhati-hati terhadap penggunaan
thread untuk setiap tasks
• Perkembangan versi platform sangat
cepat
14. Keuntungan
•
•
•
Multiplatform
Lightweight
Deadlock free
– single thread, simplifies concurency
•
Monoglot Programming
– dari mulai back-end hingga front end dapat hanya menggunakan
javascript
•
•
•
Popular
Fast
Community and NPM (8,465 packages)
*2012-03-21
•
•
Small core
Short Learning Curve
19. Kenapa NoSQL (MongoDB)
•
•
•
•
•
Database non relasional
Terdistribusi dan scale out (secara horisontal)
Tanpa skema atau dengan skema yang longgar
Sederhana dalam pemakaian (API)
Kemudahan replikasi
20. Document-Oriented
• Notion of a Document
• Enkapsulasi dokumen dan enkoding
dalam format standard (XML, JSON,
YAML, PDF, dll)
• Mirip relational DB, tetapi setiap ‘row’ tidak
harus memiliki struktur yang sama.