Features
HTTP Relay provides communication service between HTTP clients. If you are looking for a solution similar to WebRTC but simple to use and supported by all web browsers and HTTP clients, you are in the right place.
- Peer can be any web browser or HTTP client
- One-to-one, one-to-many communication and data transfer
- Peer as an HTTP server
- Open Source
- Cross Platform
- Fast and efficient (written in Go language)
- Server is a single executable with no dependencies
- JavaScript, Python, PHP, Java, C#, Ruby, Go, almost any language
Concept
flowchart LR
A[Alice] <--> H[HTTP Relay]
H[HTTP Relay] <--> B[Bob]
Peers exchange data by requesting the same URL.
https://demo.httprelay.io/<method>/<channel>
<method>
- communication method (sync, link, mcast, proxy)<channel>
- unique channel name (can be random character string known just by peers)
Example:
https://demo.httprelay.io/link/mysecretchan123
Use case
- HTTP Relay is the most useful in cases when:
- Service/peers has no public IP address or it is dynamic
- Ports can’t be open because of the security or technical reasons
- Application can’t be built as an HTTP server
- Peers are behind
HTTP Proxy server
- Peers are behind
- Run your application workers as clients using
proxy
communication method
- No need for configuration when adding/removing
- No need for real IP address or open port
- Easy to manage and integrate with your
reverse proxy
- CI/CD deployment hooks
- No need to open ports
- Better security
- Serve web application online from your browser
- An application can be packed to a single HTML file
- “Server-side” can have UI
- IoT
- Track
- Control
- Update
HTTP Relay v.s. WebRTC
WebRTC is designed to provide streaming capabilities. HTTP Relay is designed to send messages and transfer data between peers using standard HTTP requests.
Feature | WebRTC | HTTP Relay |
---|---|---|
Easy to use | ✖ | ✔ |
Data Buffering | ✖ | ✔ |
Server Mode | ✖ | ✔ |
HTTP Clients | ✖ | ✔ |
Working behind HTTP Proxy | ✖ | ✔ |
Good Interoperability | ✖ | ✔ |
Web Browsers | ✔ / ✖ | ✔ |
Open Source | ✔ | ✔ |
No server required | ✔ / ✖ | ✖ |
Streaming | ✔ | ✖ |
Communication methods
Communication method | Pattern | Sender method | Direction | Receiver method | Channel ownership |
---|---|---|---|---|---|
sync | Exchange | ANY | ⟷ | ANY | ✖ |
link | Producer | POST | ⟶ | GET | ✔ |
mcast | Buffered Producer | POST | ⇶ | GET | ✔ |
proxy | Server | SERVE | ⟷ | ANY | ✔ |