a better realtime library for your apps
We believe that we should not being trapped on channel/event
approach like
Pusher is, so we adopted for an your app, your rules approach.
Since findhit was developed it had a lot of realtime communication dependencies
with web-clients.
At first development stage we relied on an excellent realtime service that you may already know: Pusher.
Pusher is wonderful for pub:sub service for stabilish a web-socket based communication, if you could keep on the channel, event model.
After a couple months using Pusher, we decided to create our own software for communicate with clients, on top of Socket.IO (later was refactored to use Engine.IO instead). That software relied on a similar way WebSocket API, where you could listen on a channel and an event.
Everything was great until our first structure problems appeared, we had a way to send individual messages for all user's devices or target only one of them, and some other interesting features, but a bigger one was missing: we relied on client/event and we have to refactor it anytime we wanted to add another filter, and thats bad practice and also insane...
Thats when realizehit was born, a rewrite of our internal comm library with support for:
- Custom filters
- Identification capabilities trought HTTP Headers
- This allow us to identify static things per request, such as
user
,device
andzone
. - That enhances our security since we handle them on the
load-balancer
. If you want to use this feature, please make sure to implement it as we do in order to avoid HTTP Headers injection from BlackHats.
- This allow us to identify static things per request, such as
Since realizehit is a stateless service, we must have a redis
server running
somewhere.
npm i -g realizehit
DEBUG=* realizehit
realizehit:WebSocketServer: listening on port 8080
realizehit:RestServer: listening on port 3000
docker build -t realizehit/realizehit .
docker run -d -p 80:8080 81:3000 realizehit/realizehit
- [api-js-client]
- [socket-js-client]
- [api-server]
- [socket-server]