Pushjet-Server-Api
Pushjet-Server-Api copied to clipboard
Can somebody explain the complete concept of Pushjet server
I have installed Pushjet-Server-Api and Pushjet-Android - it almost works . Almost, because it doesn't get information immediately - I have to refresh pushjet on android to get unread messages.
I think, that I have to install pushjet-connectors and/or pushjet-broker but which and why - no idea.
@SledgehammerPL don't quote me on this, but I think you need to install the broker on your server to receive notifications immediately. The connectors is for your application be able to connect to a server. Maybe @Mechazawa can give you a more correct answer
If you want to have basic functionallity (GCM), then the server api is more then enough. Otherwise the broker and connectors muse be configured. The broker makes sure that incomming messages are distributed to the connectors. So when someone is listening on TCP or Websocket the message will arrive.
I'll make a clearer guide in the future
@Mechazawa Is there any update on this clearer guide? I've been trying to get Pushjet working on my Arch server, with little success. The last time I looked at the guide, I didn't find it clear enough- so I gave up for that moment.
@Mechazawa poke - any update on documentation? So far I've found it very vague, and it's hard to figure out how to use Pushjet. For now I'm using the official server, as I can't figure out how to host my own..
I'm in the same boat as @shymega
Perferebly something like this could be demonstrated with a few docker containers and an docker-compose file.
I've actually now given up for now, and gone back to Pushbullet. Not ideal, but I needed something to test.
@jkaberg There is a Dockerfile for Pushjet - located here, but the main issue is the documentation. It doesn't explain how to setup the broker, connectors, etc. If I could help with the docs I would. At the moment, I don't really want to use Pushbullet, so I'm considering making my own clone of Pushbullet/Pushjet in Elixir instead - just to quickly prototype.
I would like to add my voice to the request to get more clear documentation on this project. I am trying to get it working on my Debian server, but I can't seem to get past the Server API installation. I can't create a service via a Python request (502 error).
Some more documentation would be great. The getting started with nginx documentation was very helpful (and I submitted a slight correction), but we need the next steps after that.
I am very interested in this project and would love to contribute however I can.
+1 for more docs
Okay, after reading the code I think I figured out how pushjet works 😃 .
You have the Server-API whis is handling incoming events and the user database. When an event enters the Server-API it is written in a ZeroMQ called pushjet-relay.ipc
.
It sends 2 kinds of event : subscription (which handles unsubscription too) and message.
The PushJet Broker is listening to the MQ pushjet-relay.ipc
and distributes the eventes to another MQ : pushjet-publisher
. I'm not really sure now why this component is necessary, I will play with later in order to understand this.
Then we have the connectors. They are called when a client wants to establish a connection. When a client connects (in WebSocket or TCP) the connector open a connection to the pushjet-publisher
queue and starts to listen. When a new event is in the queue it will me automatically sent to the client.
What I'm not really sure about :
- Does new notifications and subscriptions are sent directly to the API server or does the connectors handle the connection but forward them to the Server API (I think it's the second solution).
- Why is the 2 queues model needed, why the connectors are not on the same queue than the Server API.
- What modifications are done to the event by the Broker
- Where the subscription is really handled