This guide provides developer-friendly instructions on building a chat application using the PubNub SDKs. It contains quick start tutorials in three common languages, and also includes use case-based code samples and common design patterns.
Some of today's most popular applications—chat and social apps, document collaboration, multiplayer games, IoT, ride-sharing, and more—rely on realtime data. More applications are becoming realtime, and more users are getting connected. Users of those applications expect a consistent, reliable experience across all their devices.
The PubNub Data Stream Network (DSN) empowers you to provide an ”always-on, realtime" experience to your application's users. PubNub's enterprise-grade security, global replication, and 99.999% uptime SLA guarantee that your application will always be scalable, reliable, and secure. Write your applications with PubNub's easy-to-use Software Development Kits (SDKs), and PubNub will scale the infrastructure for you.
With PubNub, you can send messages to one or more devices, including smartphones, tablets, desktops, micro-controllers, and more. Just about any device that can connect to the internet can connect to PubNub. These messages can be used to send text-based communication (such as chat), player movements in games, geolocation updates, sensor data, and a lot more.
Learn how to build a feature rich chat application on any platform using the PubNub SDKs.
- One-on-One & Group Channels for private messaging between two users or multiple users in a group.
- Typing Indicators to indicate when a user starts or stops typing.
- Unread Message Counts to show counts of unread messages on chat channels.
- Message History fetches missed messages from storage based on timestamp of the last read message.
- User Online/Offline Status tracks when users join or leave chat channels or shows occupancy of a channel.
- Push Notifications delivers messages via APNS/FCM mobile push services when the app is closed or running in the background.
- Security Controls to encrypt messages or restrict user access to channels.
- Chatbot Integrations built on PubNub's serverless Functions or using third party integrations.
- Content Moderation filters messages based on some of its attributes, so that only messages with acceptable content are passed to subscribing clients.
- Language Translation mutates messages in-flight, altering the final message received by users to be in their requested language.
- External Storage saves your messages to an external database to enable full-text searching, archiving, and more.
Some code and use cases in this documentation require add-on features, which you can enable via the PubNub Admin Dashboard.