This chapter is from the book
Workshop
This workshop contains quiz questions and exercises to help cement your learning in this hour.
Quiz
- What is different about a streaming API?
- What is OAuth?
- Why is Node.js a good fit for working with streaming APIs?
Quiz Answers
- A streaming API keeps the connection between client and server open and is able to push new data to the client when it becomes available. This enables applications to become real-time as data is pushed to the client as soon as it is available.
- OAuth is a way for applications to grant access to data without exposing user credentials. Authorization is granted on a per-application basis and can be revoked at any time. If you have connected your Twitter account with any other services, you may be familiar with allowing other services to access your data. OAuth is used to achieve this.
- As Node.js is designed around evented I/O, it can respond very well to new data being received from a streaming API. It can handle large amounts of data without needing huge amounts of memory. Because Node.js is JavaScript, it is easy to communicate with clients like browsers that understand JSON. Node.js is able to receive, process, and transmit large numbers of data events without needing many machines to process it on.