DEV Community

Cover image for Documentation Release Notes - May 2024
PubNub Developer Relations for PubNub

Posted on

Documentation Release Notes - May 2024

Welcome to this month's release notes! PubNub is bringing you a bundle of updates designed to streamline your work and add a dash of convenience.

What's in the package?

We've unified App Context data filtering docs, revamped the event listener architecture for Python and Asyncio, and added new tools aiming to help you get started with secure chat moderation.

On the Admin Portal front, we've upped our game with detailed device metrics, improved event management with batching and enveloping options, and rolled out spiffy new stacked bar charts and variable features in Illuminate.

Plus, our docs and website now have a new search engine with an AI sidekick to help you find exactly what you need.

Dive right in and explore the goodies!

General 🛠️

Unified info on filtering App Context data

Type: Enhancement

Description: Based on the feedback, we've reviewed and unified information from various SDKs on filtering user, channel, and membership data using PubNub's App Context API. As a result, we've created one App Context Filtering document (backed up by numerous examples) that serves as an entry point for any data filtering queries.

Learn:

  • Which user, channel, and membership data you can filter.
  • Which filtering operators to use.
  • How you can filter the data through practical examples.
   pubnub.objects.getAllChannelMetadata({
       filter: '["description"] LIKE "*support*"'
   })
Enter fullscreen mode Exit fullscreen mode

SDKs 📦

Updated event listeners architecture for Python & Asyncio

Type: New feature

Description: The new event listeners architecture for Python and Asyncio SDKs introduces more narrowly scoped ways of managing subscriptions and listening to events compared to the previous monolithic PubNub object.

While the PubNub object still serves as a global scope and remains backward compatible, the new architecture offers "entity" objects such as channels, channel groups, user metadata, and channel metadata that return Subscription objects.

These Subscriptions allow for subscribe/unsubscribe methods and addListener/removeListener methods specific to single entities, offering a more flexible and independent way to manage real-time events and reducing the need for global state management.

# entity-based, local-scoped
subscription = pubnub.channel(f'{channel}').subscription(with_presence: bool = False)
Enter fullscreen mode Exit fullscreen mode

Chat 💬

Sample for secure moderation in Chat SDK

Type: New feature

Description: Our chat team has created a simple Access Manager API service to help you understand the end-to-end scenario for securing Chat SDK apps with Access Manager. This service mocks a simple endpoint and includes a sample permission set that you can use to set up server-side authorization for your Chat SDK apps with Access Manager enabled.

Go through the whole test scenario using our React Native Chat App (for user interaction), Channel Monitor (for user moderation, like muting and banning), and Access Manager API (for generating authorization tokens).

For the detailed steps, refer to the How to Securely Moderate Chat and Users with BizOps Workspace blog.

Muted user

Insights 📊

Device metrics dashboard

Type: Enhancement

Description: We've extended the User Behavior dashboard in Insights to include device type metrics. This lets you dive deep into your users' behavior per device type. From now on, you can observe where your app users publish or subscribe most often (iOS, Android, and Windows) and check the number of unique users per device type.

This insight can help you build custom features by device and, thus, improve customer experience.

User behavior & devices

Events & Actions ⚡

Webhook action now supports batching

Type: Enhancement

Description: The Batching feature in Events & Action lets you manage a large volume of events by sending them in a single request rather than sending each event individually. This feature is also available for the Webhook action type as of May.

Batching feature

(Un)enveloping

Type: Enhancement

Description: You can now wrap the payload of every action in an envelope, i.e., choose whether the payload schema should contain detailed Events & Actions JSON metadata. It might be helpful in cases when you want to use metadata outside of the payload, like info on the channel where the payload was sent to or the listener that triggered it.

Envelope feature

Illuminate 💡

Stacked bar charts

Type: New feature

Description: In addition to the bar and line charts, Illuminate Dashboards now offer a new stacked bar type of chart that improves data readability when there are many dimensions and values on a single chart.

Stacked bar chart

Variables

Type: Enhancement

Description: When you create actions in Decisions (stating what you want to do with the collected metrics), you can add variables in the action configuration tables to control and dynamically change what they refer to. You can use variables more flexibly - either by referring to the predefined conditions (type ${) and choosing from the list) or setting up new variables (${variable}) as you go. Variables are now available for most action fields, not only in actions' Payload or Body.

Variables

Improved data mapping fields

Type: Enhancement

Description: When you create a Business Object and define measures (what data you want to track) or dimensions (to segment what you're tracking), you must map field names to the actual fields in your payload to let Illuminate know where this data should be looked for. Until now, you have had to manually enter the exact mapping of the specific payload field. As of May, Illuminate offers more user-friendly drop-down menus to locate the exact Publish and App Context data location.

JSON menu

Other 🌟

New search and AI assistant

Type: New feature

Description: Last but definitely not least, we've swapped the Algolia search in our docs for the new combined search and AI assistant experience to make the PubNub learning adventure more accurate and interactive.

Search and AI Assistant

Time to level up your coding game and make friends with our new AI assistant and search feature. We’ll refine it based on your feedback, so if something is missing, we'll make sure to update it. Happy coding! 🚀

Top comments (0)