Your SlideShare is downloading. ×
0
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Realtime webapp with node.js
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Realtime webapp with node.js

3,032

Published on

My presentation on bancakan

My presentation on bancakan

Published in: Education, Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,032
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
113
Comments
0
Likes
9
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. TECHNOLOGY TRENDS Realtime web application
    • 2. TECHNOLOGY TRENDS Realtime web application Muqorrobien Marufi r@nosql.asia
    • 3. PASTSearching....
    • 4. NOW?
    • 5. Subscribing
    • 6. Subscribing
    • 7. Subscribing
    • 8. Subscribing
    • 9. Subscribing
    • 10. Subscribing
    • 11. PUBSUBPUBLISHER-SUBSCRIBER
    • 12. PUBSUB PUBLISHER-SUBSCRIBERInformation Provider
    • 13. PUBSUB PUBLISHER-SUBSCRIBERInformation Information Provider Consumer
    • 14. PUBSUB PUBLISHER-SUBSCRIBER PUBSUB MIDDLEWAREInformation Information Provider Consumer
    • 15. PUBSUB PUBLISHER-SUBSCRIBER PUBSUB MIDDLEWARE PublishInformation Information Provider Consumer
    • 16. PUBSUB PUBLISHER-SUBSCRIBER PUBSUB MIDDLEWARE Publish SubscribeInformation Information Provider Consumer
    • 17. PUBSUB PUBLISHER-SUBSCRIBER PUBSUB MIDDLEWARE Publish Receive SubscribeInformation Information Provider Consumer
    • 18. THE PROBLEM IS...
    • 19. THE CHALLENGE IS...
    • 20. CHALLENGE
    • 21. CHALLENGE1.Realtime service.
    • 22. CHALLENGE1.Realtime service.2.Concurrent user.
    • 23. CHALLENGE1.Realtime service.2.Concurrent user.3.Big Data & Scalability.
    • 24. CHALLENGE1.Realtime service.2.Concurrent user.3.Big Data & Scalability.4.Security.
    • 25. SOLUTIONS
    • 26. 1. NON BLOCKING I/O
    • 27. 1. NON BLOCKING I/O MULTI THREADED IO LOOP / EVENT BASED
    • 28. 1. NON BLOCKING I/O MULTI THREADED IO LOOP / EVENT BASED
    • 29. 1. NON BLOCKING I/O MULTI THREADED IO LOOP / EVENT BASED
    • 30. 1. NON BLOCKING I/O
    • 31. 1. NON BLOCKING I/O• Event-based I/O.
    • 32. 1. NON BLOCKING I/O• Event-based I/O. • Tornado, Twisted, Gevent (Python).
    • 33. 1. NON BLOCKING I/O• Event-based I/O. • Tornado, Twisted, Gevent (Python). • EventMachine (Ruby).
    • 34. 1. NON BLOCKING I/O• Event-based I/O. • Tornado, Twisted, Gevent (Python). • EventMachine (Ruby). • Node.JS (Javascript).
    • 35. 1. NON BLOCKING I/O• Event-based I/O. • Tornado, Twisted, Gevent (Python). • EventMachine (Ruby). • Node.JS (Javascript).
    • 36. WHY NODE.JS?
    • 37. WHY NODE.JS?
    • 38. WHY NODE.JS?JAVASCRIPT IS FASTEST SCRIPTING LANGUAGE
    • 39. WHY NODE.JS?JAVASCRIPT IS FASTEST SCRIPTING LANGUAGE WHEN USING V8
    • 40. WHY NODE.JS? GOOGLE V8
    • 41. WHY NODE.JS?
    • 42. WHY NODE.JS? Dynamic Machine Code Generationpoint.x
    • 43. WHY NODE.JS? Dynamic Machine Code Generationpoint.xcmp ebx, [cached_hidden_class]jne cache_missmov eax, ebx
    • 44. WHY NODE.JS?
    • 45. WHY NODE.JS? ASYNCHRONOUSNON-BLOCKING BY DEFAULT
    • 46. WHY NODE.JS? OPEN SOURCE &COMMUNITY SUPPORTED
    • 47. WHY NODE.JS?WEB DEVELOPER FRIENDLY
    • 48. WHY NODE.JS?HAS PACKAGE MANAGER$ npm install antigravity
    • 49. WHY NODE.JS?
    • 50. WHY NODE.JS?LONG POLLING IS HARD
    • 51. WHY NODE.JS?LONG POLLING IS EASY
    • 52. WHY NODE.JS?
    • 53. WHY NODE.JS?CODE EXAMPLE:client.open(function(err, db){ db.query("select * from users", function(err, result){ // do with result });});
    • 54. WHY NODE.JS?
    • 55. WHY NODE.JS?CODE EXAMPLE: SIMPLE HTTP SERVERvar net = require(net);var server = net.createServer(function (stream) { stream.write(hellorn); stream.on(data, function (data) { stream.write(data); }); stream.on(end, function () { stream.end(goodbyern); });});server.listen(80, localhost);
    • 56. WHY NODE.JS?
    • 57. WHY NODE.JS?CREATE PUB/SUB SERVERJUST IN 3 LINE OF CODE!SERIOUS!?
    • 58. WHY NODE.JS?CREATE PUB/SUB SERVERJUST IN 3 LINE OF CODE!SERIOUS!?var Faye = require(faye), server = new Faye.NodeAdapter({mount: /});server.listen(8000);
    • 59. 2. NOSQL DB
    • 60. 2. NOSQL DB
    • 61. 2. NOSQL DBWHY REDIS?
    • 62. 2. NOSQL DBWHY REDIS? Async SEMI PERSISTENT
    • 63. 2. NOSQL DB WHY REDIS? DECR, DECRBY, DEL, EXISTS, GET, GETSET, HDEL, HEXISTS, HGET, HGETALL, HINCRBY, HKEYS, HLEN,HMSET, HSET, HVALS, INCR, INCRBY, KEYS, LINDEX, LLEN, LPOP, LPUSH, LRANGE, LREM, LSET, LTRIM, MGET, MSET, RICHER THAN MEMCACHED MSETNX, RENAME, RENAMENX, RPOP, RPOPLPUSH, RPUSH, SADD, SCARD, SDIFF, SDIFFSTORE, SET, SETNX,SINTER, SINTERSTORE, SISMEMBER, SMEMBERS, SMOVE, SORT, SPOP, SRANDMEMBER, SREM, SUNION, SUNIONSTORE, TTL, TYPE, ZADD, ZCARD, ZINCRBY, ZRANGE, ZRANGEBYSCORE, ZREM, ZREMRANGEBYSCORE, ZREVRANGE, ZSCORE
    • 64. 2. NOSQL DB
    • 65. 2. NOSQL DBWHO’S USING REDIS?
    • 66. 2. NOSQL DBWHO’S USING REDIS?
    • 67. 2. NOSQL DB
    • 68. 2. NOSQL DBNODE.JS + REDIS: $ npm install redis
    • 69. 2. NOSQL DB
    • 70. 2. NOSQL DBCODE EXAMPLE:var redis = require("redis"), client = redis.createClient();client.set("user.id:1", "robin", redis.print);client.get("user.id:1",function(err, replies){ console.log(replies); client.quit();});
    • 71. 3. THROTTLING
    • 72. 3. THROTTLING• Prevent flooding attack.
    • 73. 3. THROTTLING• Prevent flooding attack.• Limit input/request per minute/hour/day.
    • 74. 3. THROTTLING• Prevent flooding attack.• Limit input/request per minute/hour/day.• goog.async.Throttle() -- Google Closure Library.
    • 75. Thanks!r@nosql.asia

    ×