September 2016 Summaries
9 posts from PubNub
Filter
Month:
Year:
Post Summaries
Back to Blog
A new Chat Resource Center has been launched, offering overviews, tutorials, and design patterns for building and deploying mobile and web chat applications. It highlights the ease of creating chat apps today, thanks to technologies supporting low-latency messaging and user authentication. For Android developers, the Twitter Fabric platform is recommended for scalable app development, while PubNub provides essential messaging, presence monitoring, and chat history features. Digits is suggested for user authentication, enhancing security and engagement by using mobile phone numbers instead of email validation. The guide includes two parts: one focusing on getting started with Fabric and PubNub for real-time messaging and user presence, and the other on setting up Digits for user authentication. Additionally, the PubNub BLOCKS catalog offers advanced features like chat translation and spam filtering, allowing developers to incorporate complex application logic into their chat apps.
Sep 28, 2016
723 words in the original blog post.
This article expands on a previous guide by demonstrating how to create a real-time user interface for controlling garage doors using LiftMaster, PubNub, and AngularJS, highlighting the growing synergy between Smart Home and Smart Car technologies. The tutorial outlines the integration of a UI with 120 lines of HTML and JavaScript code that connects to PubNub's Data Stream Network, which ensures high availability, performance, and security through its publish-subscribe messaging model. It explains how to adapt the UI for use with other devices beyond LiftMaster by leveraging PubNub's robust JavaScript SDK. The piece emphasizes the importance of having the necessary prerequisites like a PubNub account and LiftMaster setup, while also detailing the code dependencies and the logic for communicating with connected garage doors. The integration pattern can be generalized for other smart home applications, illustrating the potential for scalable solutions in this rapidly advancing field.
Sep 27, 2016
6,274 words in the original blog post.
Creating a programming language, traditionally a complex task requiring specialized knowledge, is made accessible through Ohm, a compact parser toolkit from HARC that simplifies the process using JavaScript. This four-part series guides readers in designing a complete language named Meow with less than 200 lines of code, covering topics like parsing numbers, arithmetic with abstract syntax trees, boolean expressions, conditionals, loops, comments, and function calls. The series is designed for those with basic JavaScript knowledge, offering a step-by-step approach to teach each concept necessary for building a language without requiring prior experience with parsers.
Sep 26, 2016
411 words in the original blog post.
The final installment in the Ohm series introduces the completion of the Meow programming language by adding looping constructs and real function calls, achieving a full language implementation in 180 lines of code. Building on previous posts that covered parsing numbers, constructing expression trees, and handling conditionals, this entry explains how to implement a "while" loop, line-based comments, string literals, and function calls, including user-defined functions, using Ohm's grammar and semantic actions. The blog illustrates the process of creating a "while" loop and function calls, showing how Meow can now execute real code with conditionals, loops, and functions. It discusses the intricacies of scope management for user-defined functions and suggests further possibilities for expanding the language, such as experimenting with new syntax or embedding Meow in webpages, highlighting the flexibility and power of Ohm in language creation.
Sep 15, 2016
3,776 words in the original blog post.
In the continuation of developing a new programming language named Meow, the focus is on enhancing its functionality by introducing code blocks and conditionals. The language, which previously supported basic arithmetic operations, is refined through code restructuring, including moving AST classes to a separate file and aligning with Smalltalk precedence for simpler expression evaluation. Meow's grammar is expanded to support boolean expressions and if statements, enabling conditional execution of code blocks. The article details the creation of new grammar rules and semantic operations for these features, illustrating the process with test cases to ensure functionality. This structured approach to language development highlights the importance of methodically adding features, testing, and maintaining clarity to manage complexity effectively.
Sep 14, 2016
3,045 words in the original blog post.
PubNub has introduced Functions, a new feature in their Data Stream Network that enables serverless computing by allowing code execution within the network itself, distributing it globally for efficiency and maintaining low-latency responses. Functions are built on Node.js virtual machines with the V8 JavaScript engine, ensuring security through restricted APIs and isolation using cgroups, which protect resources and data integrity. This feature includes a distributed key-value store for storing JSON-like objects with an eventually consistent data model, enabling continuous computation without synchronization delays. The system is designed to handle real-time messages efficiently by deploying code to multiple edge nodes worldwide, ensuring that messages are processed at the nearest data center, thereby reducing latency. Security is further enhanced with end-to-end encryption of sensitive payloads and the use of Access Manager APIs for channel-level access control, making Functions a robust tool for building real-time applications and services.
Sep 13, 2016
1,244 words in the original blog post.
PubNub Functions is a new serverless computing solution that allows real-time data processing and execution of business logic at scale without relying on user-owned servers, thereby minimizing latency and potential points of failure. This feature enhances the PubNub Data Stream Network (DSN) by enabling developers to create event handlers in JavaScript, which can perform computations, log messages, update data, or interact with external web services directly within the network. By doing so, Functions eliminates the need for roundabout data processing methods that traditionally increased latency and infrastructure complexity. This capability simplifies application development, such as creating a voting app, by allowing users to focus on the core functionality rather than infrastructure management. Functions are easily set up through the PubNub dashboard, where developers can initiate blocks of code that run across the network simultaneously, ensuring secure, reliable, and low-latency computation.
Sep 12, 2016
1,830 words in the original blog post.
The blog post delves into extending an existing number format parser using the Ohm meta language to create a basic arithmetic calculator, eventually evolving it into a primitive programming language. The text explains the process of building a parser to handle arithmetic expressions by defining grammar rules and operator precedence, followed by implementing semantics for performing arithmetic operations. It introduces the concept of expression trees for deferred arithmetic evaluation, enabling more complex operations like function calls within loops. The post further discusses adding symbols, assignments, and a scope to manage variable values, thereby establishing the groundwork for more advanced language features such as conditionals and loops. The article emphasizes the importance of breaking down the language-building process into smaller, manageable steps and highlights the use of expression trees and symbol management as crucial elements for future language development.
Sep 08, 2016
4,558 words in the original blog post.
Brain Drain is an application designed to enhance productivity through real-time collaboration by providing a virtual whiteboard where users can interact as if they were in the same room. Utilizing PubNub's Data Stream Network for real-time updates, Firebase for storage, authentication, and configuration, and Google services for identity verification, the app creates a seamless collaborative experience. The first part of the tutorial series focuses on setting up the necessary environment and infrastructure, including configuring authentication and defining a data stream protocol to support real-time collaboration. The setup involves integrating several third-party libraries and configuring dependencies to ensure smooth interaction between Firebase and PubNub. The application structure includes a main activity for drawing and a sign-in activity for authentication, with Firebase AuthListener managing user sessions. Future enhancements plan to add graphical elements, social features, and the capability to cast the board to a nearby screen, further expanding the app's collaborative potential.
Sep 01, 2016
2,592 words in the original blog post.