Push technology
푸시 기법 또는 서버 푸시(server push)는 인터넷 상에서 어떤 전송 요청이 중앙 서버에서 시작되는 정보 전달 방식이다. 이것은 전송 요청이 클라이언트에서 시작되는 풀 기법과 대비되는 것이다.
Categories
- Apprise
- Web syndication
- Comet
- Pull technology
- pushd
- Server-sent events (SSE)
- Event stream format
- ErrorPush - 미니멀한 에러 콜렉션 서비스 오픈소스
- Ntfy - 모바일/데스크탑으로 푸시 보내기
- Pushover - Pushover makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop (유료)
- Gotify - a simple server for sending and receiving messages
- Unified Push - 탈중앙화, 오픈소스 푸시 알림 프로토콜
- Novu - 개발자를 위한 오픈소스 노티피케이션 인프라스트럭쳐
- Pushy - https://pushy.me/ - 100개 단말기 까지만 무료
Polling & Callback
일반적으로 상태를 알아오기 위한 방법에는 크게 두가지 방법이 있다.
- 폴링 (Polling)
- 상태를 주기적으로 조사를 해서 서버의 상태를 알아낸다. 이 조사하는 행위를 하트비트 (Heartbeat)라고 한다.
- 콜백 (Call-back) or 롱폴링 (Long Polling)
- 다른 하나는 상태를 알고 있는 주체(리스너)에게 알려 달라고 이야기(등록) 한 후 리스너가 알려주는 방식이다. 비동기(Asynchonous)적인 방법이다.
인터넷 분야에서 폴링 (Polling)을 Pull technology, 콜백 (Call-back)을 Push technology라고도 한다. (서버관점에서)
하트 비트 간격 조정
Heartbeat Interval Adjustment
The heartbeat begins at the default rate. The heartbeat interval is specified by the client and is sent as part of the ping request. The direct push algorithm on the client then dynamically adjusts the heartbeat interval to maintain the maximum time between heartbeats without exceeding the time-out value.
To determine the optimal heartbeat interval, the algorithm keeps a log of ping requests. If a ping request receives a response, the algorithm increases the interval. If no response is received at the end of the interval, the client determines that the network timed out and the interval is decreased as follows:
- If the heartbeat was not increased during the last ping, the heartbeat is changed to the minimum heartbeat value.
- If the heartbeat was increased during the last ping, then it is changed back to the previous heartbeat.
The algorithm also uses the following configurable settings:
- HeartbeatIncrement that indicates the maximum amount that the interval can be increased or decreased.
- HeartbeatMin and HeartbeatMax indicate the maximum interval allowed.
By using this algorithm, the client eventually determines the longest idle connection possible across the cellular network and corporate firewall.
See also
Favorite site
- Wikipedia (en) Push technology에 대한 설명
- Hello world: Facebook 메신저와 MQTT
- Hello world: 모바일 Push와 nPush
- [추천] RTCS 실시간 웹 서비스를 위한 도전 1
- [추천] 천만 명의 사용자에게 1분 내로 알림 보내기 (병렬프로세스의 최적화) (RabbitMQ, Redis) 2