Going Serverless with PubNub Functions

Announcing PubNub Functions — a globally distributed, low latency, serverless microservices infrastructure

At PubNub, we’ve spent years building and scaling our battle-tested APIs and robust network to power realtime apps across 1000 different industries.

We’re constantly working to improve PubNub, and today we’re pleased to announce one of our most innovative and powerful new features yet, PubNub Functions.

What is PubNub Functions?

PubNub Functions is serverless compute at the edge of the network, allowing you to execute business logic on your data in-motion.

Functions is immensely powerful, yet easy to use. With the click of a button, each Function is deployed globally to every Point-of-Presence (POP) in the PubNub network (15 global data centers to be exact!) with a guaranteed < 10ms time-to-execute.

Unlike other serverless infrastructures, PubNub Functions is specifically designed for short-running, low-latency computation that’s required for today’s realtime apps.

Here’s our CEO Todd’s perspective on it (in press release lingo):

“Realtime software requires rethinking aspects of your application stack. PubNub Functions delivers a top-to-bottom global stack for collaboration, IoT, and other realtime applications. Now developers can focus on building apps, not infrastructure. PubNub Functions brings unprecedented levels of productivity to developers, while being the fastest and most scalable serverless environment in the world.”

What Do You Get with Functions?

Functions are deployed globally to each edge node within the PubNub network, not to a single datacenter. Backed by PubNub’s 99.999% uptime service level agreements, it scales as needed and you only pay per execution.

Unlike many stateless compute environments, it comes complete with a global Key/Value store for keeping application state in high performance, globally-scaled environments. With Functions, developers and businesses can set their sights on building and enhancing the application experience instead of focusing on the web infrastructure required to run it.

With the ability to deploy secure Functions and REST endpoints in the network through a click of a button, developers can quickly:

  • Transform, filter, aggregate, and re-route data with custom business logic
  • Deploy secure REST endpoints instantly
  • Develop chatbots and advanced chat functionality such as @mentions and language translation in a few lines of code
  • Integrate 3rd party services for things like sentiment analysis, geolocation, and machine learning

Already in Action at HubSpot

HubSpot, who have taking marketing automation by storm, uses the PubNub Data Stream Network to power realtime experiences for customers and employees including chat, real-time notifications and alerts, collaboration, dynamic dashboards and syncing of changes across all users and devices.

And Hubspot now utilizes Functions to make external requests to HubSpot’s internal systems for analytics purposes.

“PubNub is our platform of choice for building highly reliable realtime experiences — it is secure, delivers unprecedented global scale and lets developers focus on code, not infrastructure.
PubNub Functions provides a serverless environment to quickly build your code, deploy globally and get to production faster. Functions gives you the capability to perform realtime computation on data streams close to the edge of the network, reducing latency and overhead costs for developers.
With PubNub we can create the best possible experience for our users.”
- Kerry Munz, Director of Engineering, Platform Infrastructure

Functions at DeveloperWeek NY

PubNub Functions was also put to the test at the NY Dev Week Hackathon, where developers were challenged to build chatbots to solve a civic issue.

The winning app — Smart Grocer — built by Nicholas Murray, a student at Washington University, enabled people living in low income areas to locate the closest store to find nutritious food at the lowest price.

“With PubNub and Functions, I was able to build the entire chatbot app without the need of any other infrastructure and get a quality MVP done in hours,” said Nicholas Murray.

Learning More

We just had a webinar (that people seemed to like) yesterday, and you can check out the recording here.

You can also try Functions for free (in our generous sandbox tier).