Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

Polling


Today, real-time features are an integral part of the Internet as we know it. However, their implementation has not always been optimal. Especially during its early stages, real-time data communication was almost always implemented by using polling, a technique where the client regularly contacts the server in order to check whether its state has changed. If it had (say, if a new message had been made available), the server responded by sending the updated state back. Needless to say, polling is a recipe for wasted resource usage. Moreover, it leads to rather choppy programming, since we find ourselves just repeatedly asking for updates rather than waiting and taking action on them when they are actually sent.