PubNub ChatEngine and Layer both enable you to build realtime messaging and other chat features into your application and provide the infrastructure to power it. That’s about where the similarities end, and in this blog post, we’ll walk through why ChatEngine and Layer are different and show you how to choose between them.
What is PubNub ChatEngine?
ChatEngine is an opinionated chat framework that provides APIs and SDKs for building web, mobile, and desktop chat. With official partnerships with Amazon, Microsoft, IBM, SendGrid and others offering an extensive plugin library and programmable serverless functions, ChatEngine empowers you to build chat functionality of all shapes and sizes, designed to be highly customizable and extensible. ChatEngine runs on the PubNub network, so all backend infrastructure is taken care of.
What is Layer?
Layer is an end-to-end chat solution for mobile and web that includes backend infrastructure as well as UI/UX elements. Layer gives you a couple of tightly-defined ways to build chat, as, by design, it’s more SaaS service than a framework. Its black box design approach accelerates the process of embedding chat functionality, although you’re locked into their conversation platform, with UI/UX that is relatively rigid and tricky to customize.
Though both technologies deliver chat functionality, their use cases are very different.
Because PubNub is an extensible and highly customizable framework, it is a great option for any team that wants to add chat to their product and website, and, in the process, own/develop chat as a core part of their business. ChatEngine is not a ‘widget’ service, so development work is required. However, this means the chat app itself has the flexibility to morph and innovate over time as your business sees fit.
Some examples of apps that could be powered by ChatEngine include a team collaboration app like Slack or Symphony Sales, a 2nd screen social app like Rooster Teeth, an automated shopping assistant for an eCommerce company, or 1:1 private chat in a dating app.
Layer delivers a top-to-bottom chat app functionality, which tightly defines its use cases, providing a narrow set of future options for teams looking to make chat a core feature of their product. It gives you basic chat functionality out of the box, with attractive UIs, making it ideal for things like web chat widgets or B2C customer support chat. However, because it’s designed to be more SaaS solution than a framework, there’s limited flexibility for extending it to address unique use cases.
Chat Features and Functionality
Both provide the core, table-stakes resources of chat: messaging, user management, typing indicators, unread message counts, etc, as well as backend infrastructure. It’s the advanced extensibility where the services differ greatly.
With PubNub Functions and Blocks, and Layer Webhooks, you can integrate 3rd party services into your chat app. However, Functions and Blocks provide a greater breadth of functionality than Webhooks due to their extensible and flexible architecture.
Serverless Functions vs Webhooks
Layer Webhooks simply enables responsiveness to events in a Layer chat app. This could be triggering automated responses (simple chatbots), notifying users when they are @mentioned, or adding in a weather bot powered by a 3rd party weather API.
With PubNub Functions and Blocks, you can do more with your chat messages: transforming, mutating, and augmenting them in-motion (via Functions), or integrating best-in-class 3rd party services (via Blocks) within the chat feed. This allows you to execute business logic at any point in the message delivery, and provide a faster and more efficient way to expand the capabilities of your chat application.
Functions versus Webhooks is especially vital in the world of cognitive services – the machine learning and artificial services that are enriching the next generation of applications. Live translation, speech-to-text, natural language processing – all these services are delivered through powerful APIs, and Functions is the key to integrating them into your chat app. While Webhooks only delivers automated responses, Functions lets you bring in intelligent bot functionality via Amazon Lex, Watson Conversation, Microsoft Azure Bot Service, and other best-in-class services. Being able to integrate these powerful capabilities through serverless compute gives you a huge advantage in shipping chat apps and chatbots of the future.
Both services provide and maintain backend infrastructure, including managing SDKs, servers, and network. Layer provides an SLA of 99.9%, while PubNub provides a 99.999% SLA. The two extra nines may seem nearly redundant – but it is the difference between about five minutes of annual downtime and fully five hundred.
PubNub is designed for scale and as such supports any number of participants to join a single chatroom. One of our customers powered an interactive app to complement a massive international cricket tournament, and had thousands of users in chat rooms. Layer maxes out at 25 participants.
As for global distribution, Layer doesn’t explicitly state how many points-of-presence they have or where their servers are located. PubNub has 15 points-of-presence across the globe, ensuring low latencies wherever your users are located, and message redundancy so every message gets where it needs to go.
|1:1 and Group Messaging||✅||✅|
|Chatrooms||Infinite||Up to 25 participants|
|Rich Media / Rich Snippets||✅||✅|
|Images||✅ via Upload Plugin and Custom||✅|
|Push Notifications||✅ via Mobile Push Gateway||✅|
|Language Translation||✅ via Functions||❌|
|Content Moderation||✅ via Functions||❌|
|Geolocation||✅ via Functions||✅ via Mapbox|
|Chatbots||✅ via Functions||〽️ Automated Response Only|
|Message Encryption||✅ AES/TLS||✅ TLS|
|UX/UI Components||〽️ Open-source||✅|
With that, we hope you give ChatEngine a try for your project, and better yet, carry out a proof-of-concept using both ChatEngine and Layer and compare both side-to-side. If you’re looking to quickly launch a simple chat widget, Layer is a great option. But if you’re looking to make chat a core feature of your application, or the application itself, ChatEngine is the way to go.