IN THIS ARTICLE
Subscribe to Our Newsletter
We’re happy to announce that PubNub has released a new version of Objects that provides easy-to-use and serverless storage for user metadata, channel metadata and channel memberships. Developers can now store data that is common to their applications without having to spin up additional backend infrastructure and services. Manage your data and build innovative, reliable, and scalable applications on PubNub using the new and improved Objects.
Solving the Realtime Data Store Problem
Building chat applications shouldn’t require you to spin up backend infrastructure to support what users consider native or part of the app itself. Before Objects, developers using PubNub had to spin up their own services to store and fetch metadata for the users, channels and channel memberships that were used in their applications.
This need to requisition extra infrastructure took away from the ability to build quickly easily on PubNub. Not only does this take a developer’s time away from actually building the features, but it puts the extra costs of maintaining new services on the builder — not exactly what you expect when you think about building an app like chat on a platform like PubNub. Scaling these services can be another challenge, especially if you have millions of users accessing this data as they get chat rooms, add memberships, show chat room members, among other things. This presents a serious challenge of keeping your application realtime for your customers the way that they expect.
Objects take this pain away from developers so they can focus on providing the best end-user experience on their apps instead of worrying about infrastructure. With Objects, developers can simply use our pre-built services to set metadata for users and channels, add and remove channel memberships for a user, or add members to a channel, all without deploying additional servers or setting up database tables. Now that’s what you expect when you work with PubNub.
Scalable Storage for User and Channel Metadata
Store user properties like a user’s name, email address, and profile info as metadata on the user record. Similarly, store channel properties like channel name and description. This metadata can be set, removed and fetched from the database.
Managing Channel Memberships
Create and store associations between users and channels. A user can belong to multiple channels, and a channel can have multiple members. Use Memberships to access these associations from the objects database.
Realtime Data Events
Receive events in realtime when user / channel metadata is set or when channel memberships are modified in the objects database. Client applications can receive these events to update a user’s profile or show an alert when a user is added to a channel.
What's New in Version 2
With the introduction of Objects v2, PubNub has simplified and streamlined the service to integrate it with our core services. You can use new methods in your PubNub SDKs to store metadata for users and channels to use this data in your applications without spinning up additional backend infrastructure.
How to Start Using Objects v2
New to PubNub? Great! You have nothing to worry about. You can start using Objects v2 methods in the SDK by enabling the Objects feature from your Admin Dashboard. Just turn it on and select the region that should host your data. That's it, now you’re ready to use the Objects to store metadata for your application.
If you’re already using Objects v1 for your applications, you can continue to do so on the existing version of the PubNub SDKs. No action is required if you don’t plan to upgrade your SDK versions at this time. If you would like to try Objects v2, you can do so by following the migration guide. Note that your existing data will not migrate automatically when you upgrade to the new schema. If you wish to retain your data, you can reach out support team at firstname.lastname@example.org who will be happy to assist you to migrate objects data from your account.