These are chat archives for GeniusesOfSymfony/WebSocketBundle

7th
Jul 2015
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:14
Hi!
Johann Saunier
@ProPheT777
Jul 07 2015 16:22
hey
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:23
I'm sorry for asking so many questions. I hope I'm not being a bother. This is my first time contributing to a Symfony bundle and I'm not sure about the workflow. So if you think I could do things another way anywhere during our conversation, just let me know.
Johann Saunier
@ProPheT777
Jul 07 2015 16:25
no problem, there is no special workflow to contribute on 3rd party :D
to be honest I never used ZMQ as transport to push on websocket server
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:26
So, I have a problem with the way you proposed.
Johann Saunier
@ProPheT777
Jul 07 2015 16:26
we just need to be sure where we go and have the same global idea.
so speak about it !
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:26
Ah, nice! :)
ZMQ is the only thing in the list that you mentioned in your comment that requires PHP to also start a server. So the gos:pusher:server will need to start two servers: one for zero_mq itself, and another for the pusher server.
Johann Saunier
@ProPheT777
Jul 07 2015 16:28
no
pusher server and zmq is the same thing
zmq is just a technology to handle that
but inside pusher server you can zmq or another technology to do transport
like in websocket bundle
you can run different app with one server
here it's the same, you can run different transporter with the same command
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:31
Hmm, I'm new to this and maybe I'm getting this wrong, but in this tutorial there are two servers. Look at the last section that says "creating our executable".
One is on port 5555, another is on 8080.
Johann Saunier
@ProPheT777
Jul 07 2015 16:33
yes 8080 is the websocket
5555 is ZMQ (push server)
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:35
Right. And which one does gos:push:server start?
Both?
Or do you have to run gos:push:server and then run gos:websocket:server?
Johann Saunier
@ProPheT777
Jul 07 2015 16:37
you run both yeah
pusher server is isolated of websocket
Parham Doustdar
@parhamdoustdar
Jul 07 2015 16:38
Well, the problem here is two things. First, you only need to start a pusher when you're using ZMQ. Things like Redis already have their own server.
Right?
Parham Doustdar
@parhamdoustdar
Jul 07 2015 17:11
@ProPheT777: And the second problem is, the pusher that you pass into the stack (which I'm guessing would be a topic in our case) needs to be shared between the two instances, because the Redis client or the ZMQ server require a callback for their onMessage() function.
@ProPheT777: This is what has me confused: we can't have two different instances.
Johann Saunier
@ProPheT777
Jul 07 2015 17:49
For today we don't care about other tech than ZMQ
we just must not closed the door for other
just focus on ZMQ implementation (with interface etc)
and the day where we need other support we will take the time to implement them
here is an exemple with redis as transport
may be it can be more concret to you and anderstand of what I talk about
Parham Doustdar
@parhamdoustdar
Jul 07 2015 18:35
@ProPheT777: Exactly. Look at this example you sent me. It has both the client and the server. So both of them have to be done in one instance. In other words, the MessagableTopicInterface (the new interface I am going to define which has onMessage() on it) will be passed both to the transport (so that it can define the callback on it) and to the WampServer. So, when you run gos:push:server, t
$ProPheT777: That's what I meant with the command starting two servers.
here is a websocket on the host and port you defined, and also another socket listening on another address:port.
Johann Saunier
@ProPheT777
Jul 07 2015 18:46
yes