Documentation Release Notes - May 2024
PubNub Developer Relations
Posted on July 8, 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*"'
})
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)
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.
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.
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.
(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.
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.
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.
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.
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.
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! ๐
Posted on July 8, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.