These are chat archives for fanout/pushpin

Oct 2017
Oct 17 2017 06:39
hello everybody
I have a question about pushpin and the backend
I don't understand the difference between "NewGripPubControl" and "NewPubControlClient"
I'm just playing around with this example code:
is "NewGripPubControl" creating a server socket to which pushpin will connect in order to forward new incoming client connections?
Oct 17 2017 10:43
is it possible to use pushpin with
or what are you using for javascript client implementations?
Justin Karneges
Oct 17 2017 16:53
hi @smogm , in order to make it easier to publish to multiple Pushpin servers and/or Fanout Cloud at the same time, the go-pubcontrol library PubControl class wraps one or more PubControlClient instances and will publish to all of them at once
then there's GripPubControl from go-gripcontrol which adds some conveniences on top of PubControl. usually it's enough to just instantiate a GripPubControl. you can pass a list of configurations and it'll make the underlying client objects as necessary
the class is used for publishing messages only. not for forwarding client connections. when you call one of the Publish methods, it will make an HTTP POST to one or more target servers with your message data
Justin Karneges
Oct 17 2017 17:04
it's not possible to use pushpin with at this time. pushpin supports sockjs though, and it's easy to make it speak SSE as well, so we recommend one of those if you need to connect from browsers
we still need to add Go to our examples but hopefully it's easy to figure out from the other langs
Oct 17 2017 20:27
@jkarneges thank you for your reply!
I got it working with standard websocket connection :)
another question: is it somehow possible to get some type of a "backlog" if a new client connects?
lets say I have a bunch of stock market data which was just updated and published to all existing client
now a new client connects just a moment later
is it possible to let him fetch the latest market data without publishing it again from the backend?
anyway, pushpin is a very nice project, don't understand why it is so unpopular :)
tried different things, but pushpin looks most promising
Oct 17 2017 20:34
keep that good work up @jkarneges, very nice project, will recommend it to friends
Justin Karneges
Oct 17 2017 21:47
@smogm thanks for the kind words :)
if you just want to send a snapshot of latest data, you can send it at the time of connect. for example, if you are using websocket-over-http to communicate with the backend, the backend could respond with OPEN and some TEXT messages, which the client will receive immediately