Nakama vs Firebase
This is intended to be a brief, objective, technical overview of Nakama and Firebase
At a very high level
- Heroic Labs’ Nakama is an open-source server which can be hosted on any cloud as well as locally. Firebase is a proprietary SaaS service hosted in the cloud and cannot be self-hosted.
- Nakama server and the client libraries are open source on GitHub. Nakama can be run on Windows, macOS, and Linux for development and production.
- Nakama comes packaged with a database to provide a fully capable collection of services. No separate solutions are required for user accounts, social login, data storage, etc.
- Firebase comes with a realtime data storage system which syncs data between server and client. It can store large blobs that uses cold-line storage as the backing mechanism.
- Nakama handles persistent users and shared state as well as persistent chat history. Firebase does not have any higher order functionality (like built-in chat and presence system).
- All of Nakama’s features: Realtime multiplayer, chat, matchmaker, server authoritative logic, etc. are available with the same server and license. Licenses for Nakama Enterprise (for multi-server clusters) includes all features and no artificial CCU limitations.
- Firebase provides Performance Monitoring, Crash Reporting, Analytics for free. All other development tools (such as Realtime Database) are paid products.
Feature/Capability | Heroic Cloud (Nakama) | Firebase |
---|---|---|
User Identification | Heroic Cloud (Nakama)‘Nakama offers multiple methods to authenticate: including email/password, third-party social providers like Steam and Game Center. You can also use your existing user accounts service with the server.’ | FirebaseFirebase offers multiple methods to authenticate including third-party social providers. Optional UI element available. |
Data Storage | Heroic Cloud (Nakama)Data is stored in in JSON format in a postgres-compatible database. Each record has specific read-write permissions and can be updated using JSON-patch operations. All operations are batched and they include transactional update guarantees. | FirebaseFirebase stores JSON data and synchronizes changes with devices and persists data to disk. |
Asset Storage | Heroic Cloud (Nakama)Nakama doesn’t store asset files directly. Instead you can store a version-specific manifest which lists all files and the link to download the files from cold-line storage like S3. | FirebaseFirebase stores and serves user-generated content such as photos or videos. |
In-App Chat & Chat History | Heroic Cloud (Nakama)1 on 1, group, and room-based chat. Available as part of Nakama server and can be self-hosted. Persistent chat history, can be kept as long or short as required by the studio. | FirebaseNot available. |
In-App & Push Notifications | Heroic Cloud (Nakama)Nakama pushes system notifications to the devices that are online automatically. You can send custom notifications and persist them for later delivery. Push Notification is available as a code module. | FirebaseYes. You can segment users and send mass notifications, but notifications are not persisted for later delivery. |
Custom Script Runtime | Heroic Cloud (Nakama)Nakama has an embedded script runtime which utilises the Lua language to extend or override server behaviour. You can use the Runtime as before/after action hooks, RPC calls, or server-to-server HTTP calls. | FirebaseCloud Functions are single-purpose JavaScript functions that are executed in a managed Node.js environment. |
Remote configuration | Heroic Cloud (Nakama)Yes. You can read more about it here. | FirebaseFirebase Remote Config includes a client library that handles important tasks like fetching parameter values and caching them. |
Matchmaking & Multiplayer Engine | Heroic Cloud (Nakama)Turn-based and realtime. The engine itself is realtime and works as a message broker. Turn-based games have their state managed in-memory on the server. | FirebaseFirebase does not have any multiplayer capabilities. |
Transport Protocol | Heroic Cloud (Nakama)WebSocket, secure rUDP (reliable-ordered and unreliable-unordered) based on the netcode.io specs. | FirebaseWebSockets |
Sync Behaviour | Heroic Cloud (Nakama)Data is pushed to clients over a background socket. Data is persisted by the server, and state is tracked. If client lose network connectivity, they can then rejoin at a later point. | FirebaseData stored in the Firebase realtime database is pushed to the clients. Authentication, asset storage, etc use request-response model. |
Hosted | Heroic Cloud (Nakama)Any cloud of your choice, local or bare metal. We also offer a Heroic Cloud for developers who do not wish to operationalise their own infrastructure. | FirebaseHosted on Google servers, and cannot be self-hosted. |
Open Source | Heroic Cloud (Nakama)Closed source. | Firebase |