explaingit

mpusher/mpush

3,772JavaAudience · developerComplexity · 4/5Setup · hard

TLDR

An open-source Java server for pushing real-time notifications directly to mobile devices over persistent connections, so your backend can send messages to any phone instantly without polling. Includes client SDKs for Android, iOS, and Java.

Mindmap

mindmap
  root((mpush))
    What it does
      Real-time push notifications
      Persistent TCP connections
      Encrypted messaging
    Tech stack
      Java Netty
      ZooKeeper
      Redis
    Use cases
      Mobile push server
      In-app messaging
      Self-hosted notifications
    Audience
      Backend developers
      Mobile developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run your own push notification server to send real-time messages to Android and iOS apps without relying on a third-party service.

USE CASE 2

Deliver low-latency in-app chat or alert messages to thousands of connected mobile clients simultaneously.

USE CASE 3

Set up targeted push rules per user with the mpns scheduler to send personalized notifications based on conditions.

USE CASE 4

Replace a paid push service by self-hosting mpush with your own ZooKeeper and Redis infrastructure.

Tech stack

JavaNettyZooKeeperRedis

Getting it running

Difficulty · hard Time to first run · 1day+

Requires JDK 1.8+, a running ZooKeeper cluster, and a Redis instance before the server can start.

In plain English

MPush is an open-source real-time push notification system written in Java, designed to deliver messages from a server to mobile devices reliably and quickly. The problem it solves is a common one in mobile app development: standard HTTP connections close after each request, so there is no efficient way for a server to proactively send a message to a phone. MPush maintains persistent TCP connections with each client device, keeping those connections alive with heartbeats, so that the server can push a message to any connected device at any time with very low latency. The server component uses a Java networking library called Netty to handle large numbers of simultaneous connections efficiently. It depends on two external services: ZooKeeper, which handles service coordination when running multiple server nodes together, and Redis, which handles session storage and message queuing. The configuration is written in a format called HOCON and covers network ports, connection timeouts, heartbeat intervals, compression thresholds, and traffic shaping settings. RSA and AES encryption are built in to secure the connection between the server and each client. The project is organized as a set of related repositories. The main server lives here. A separate scheduler component (alloc) decides which server node to assign each connecting client to. A personalized push center (mpns) handles rules for targeting specific users. Client SDKs are available for Android (with a demo app), iOS in both Swift and Objective-C, and plain Java. This means an app team can run their own push infrastructure rather than relying on a third-party service. To get started, you install a JDK (version 1.8 or higher), ZooKeeper, and Redis, then download a release package and edit the configuration file before starting the server with a shell script. Detailed setup documentation and examples are linked from the repository page.

Copy-paste prompts

Prompt 1
How do I set up mpush on Ubuntu with ZooKeeper and Redis, configure the HOCON config file, and start the server for the first time?
Prompt 2
Show me how to integrate the mpush Android SDK into an Android app to receive real-time push notifications from an mpush server.
Prompt 3
How does mpush keep mobile connections alive with heartbeats, and how do I tune the heartbeat interval and timeout settings in the config?
Prompt 4
How do I scale mpush horizontally across multiple server nodes using ZooKeeper for coordination?
Prompt 5
How does mpush encrypt the connection between the server and a mobile client using RSA and AES?
Open on GitHub → Explain another repo

← mpusher on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.