by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 18:17

    jkarneges on develop

    handler: make http publish maxi… Merge pull request #47691 from … (compare)

  • Jul 29 18:41

    jkarneges on v1.30.0

    (compare)

  • Jul 29 18:40

    jkarneges on master

    limit body bytes to internal bu… runner: support condure service use client_maxconn and condure_… and 1 more (compare)

  • Jul 29 18:40

    jkarneges on develop

    update version (compare)

  • Jul 28 02:16

    jkarneges on develop

    use client_maxconn and condure_… (compare)

  • Jul 28 02:12

    jkarneges on develop

    runner: support condure service (compare)

  • Jul 22 01:42

    jkarneges on develop

    limit body bytes to internal bu… (compare)

  • Jul 15 18:45

    jkarneges on v1.29.0

    (compare)

  • Jul 15 18:45

    jkarneges on master

    fix crash when parsing accept h… provide credits on websocket ac… fix crash when response hold ti… and 10 more (compare)

  • Jul 15 18:45

    jkarneges on develop

    update version (compare)

  • Jul 13 21:36

    jkarneges on develop

    init field (compare)

  • Jul 13 18:59

    jkarneges on develop

    split websocket frames to fit i… (compare)

  • Jul 09 23:07

    jkarneges on develop

    update qzmq handler: only process body when… handler: don't allow pausing tw… (compare)

  • Jul 07 15:42

    jkarneges on develop

    update qzmq (compare)

  • Jun 26 20:54

    jkarneges on develop

    update submodules fix warnings (compare)

  • Jun 21 16:50

    jkarneges on develop

    fix crash when response hold ti… don't re-enable keep-alive if m… (compare)

  • May 22 03:40

    jkarneges on develop

    provide credits on websocket ac… (compare)

  • May 13 16:28

    jkarneges on develop

    fix crash when parsing accept h… (compare)

  • Apr 08 15:46

    jkarneges on master

    websocket-over-http: add option… update version (compare)

  • Apr 08 15:46

    jkarneges on v1.28.0

    (compare)

Justin Karneges
@jkarneges
welcome @niranjan-kmit . do you have any requirements for the client protocol, like sse or websockets? or not sure?
Jeremy Llewellyn
@jeremyll
Is there any examples of a multi-master pushpin deployments or centeralized pushpin pub/sub with proxies pointed to that? I cant' for the life of me find a solution that works outside of one process with pushpin.
NIRANJAN
@niranjan-kmit
@jkarneges it would be good to have websocket or Http in my case.
Justin Karneges
@jkarneges
@jeremyll a simple multi-instance approach is to publish messages to all pushpin instances. the instances that have applicable subscribers will deliver the message, the instances that don't will ignore
6 replies
Justin Karneges
@jkarneges
@niranjan-kmit I'd suggest starting with SSE over HTTP, as it is fairly straightforward. https://pushpin.org/docs/usage/#server-sent-events
basically, make an endpoint in your java backend that responds with Content-Type text/html and also sets Grip-Hold and Grip-Channel headers. then publish SSE-formatted data to the channel
you can publish using HTTP POST. there is an example of that in the section that immediately precedes the link I sent. just replace hello there\n with SSE format, like event: message\ndata: hello there\n\n
NIRANJAN
@niranjan-kmit
@jkarneges why i am getting "Error while proxying to origin." while openning the streaming connection to pushpin. I have changed pushpin conf file like * localhost:8000
Justin Karneges
@jkarneges

you mean the routes file? try setting the content to

*,debug localhost:8000

and then make a request

Justin Karneges
@jkarneges
@jeremyll for zmq with django grip, you can try something like:
GRIP_PROXIES = [{
    'control_zmq_uri': 'tcp://localhost:5563',
    'require_subscribers': True
}]
NIRANJAN
@niranjan-kmit
@jkarneges how do we know that specific channel doesn't have any subscribers ,the chanel which is created by backed service previously?
Justin Karneges
@jkarneges
@niranjan-kmit you can monitor for subscriptions via zmq, either the sub socket used for publishing or the stats socket. for what purpose?
NIRANJAN
@niranjan-kmit
Hello @jkarneges if any no clients subscribed to particular channel then i need to delete the channel?
Justin Karneges
@jkarneges
@niranjan-kmit there's no need to delete channels. they are created automatically and destroyed automatically
NIRANJAN
@niranjan-kmit
i mean i need to delete orphan channels
@jkarneges is there any particular time we have to destroy that orphan channel automatically?
Justin Karneges
@jkarneges
are you asking how long does it take pushpin to destroy a channel with no subscribers?
NIRANJAN
@niranjan-kmit
@jkarneges Yes
Justin Karneges
@jkarneges
for http stream and websocket transports it is immediately when the last subscriber going away. for http response (used for long polling) the channel lingers for about a minute in case a subscriber comes back
NIRANJAN
@niranjan-kmit
Thank you very much @jkarneges
NIRANJAN
@niranjan-kmit
@jkarneges Can you please provide some resource for getting insite about JWT validation in puspin proxy
Justin Karneges
@jkarneges
@niranjan-kmit validation of the Grip-Sig header? or something else?
NIRANJAN
@niranjan-kmit
@jkarneges Grip-Sig header
NIRANJAN
@niranjan-kmit
@jkarneges how can we validate token which is cumming from fronted using pushpin?
Justin Karneges
@jkarneges
@niranjan-kmit the signing key is specified in pushpin.conf sig_key
backend can validate using the same key
NIRANJAN
@niranjan-kmit
@jkarneges !GripControl.validateSig(session.getHeaders().get("grip-sig"), "<key>") above mentioned keys, from where grip-sig andand key comes?
Justin Karneges
@jkarneges
@niranjan-kmit Pushpin adds Grip-Sig to the proxied request. key is whatever is specified in pushpin.conf
NIRANJAN
@niranjan-kmit
if I want authorize valid user or request then how can do with the pushpin?
NIRANJAN
@niranjan-kmit
@jkarneges if I got the JWT Token from UI Service then how can I validate that token while making q request to the pushpin proxy?
@jkarneges Basically I want to implement Authentication/Autherization with Pushpin Proxy?
Justin Karneges
@jkarneges
@niranjan-kmit pushpin relays all headers sent by the client to the backend. you can then auth the client from the backend
ccbeloy
@ccbeloy
Hi @jkarneges ...is there an event pushpin raise when removing a channel? And how to subscribe to that event?v
Justin Karneges
@jkarneges
@ccbeloy see the zmq SUB socket. some info here: https://pushpin.org/docs/advanced/#subscription-forwarding
the code sample at the end of that section
NIRANJAN
@niranjan-kmit
@jkarneges How do I know that my channel X having N number subscriptions? can you please provide any reference since i am a beiginner for pushpin
Justin Karneges
@jkarneges
@niranjan-kmit you can find that on the subscription stats https://pushpin.org/docs/advanced/#stats-socket
NIRANJAN
@niranjan-kmit
Hi@jkarneges can we send json response with custome message using java grip library.
as of now i see newFixedLengthResponse in the code
Justin Karneges
@jkarneges
@niranjan-kmit you can send any data format you want
NIRANJAN
@niranjan-kmit
@jkarneges Json formate with status code with message
like {200: "deployed succesfully"}
Justin Karneges
@jkarneges
@niranjan-kmit pushpin sends bytes. so if you want to send json, just encode the json to bytes and send the bytes :)
NIRANJAN
@niranjan-kmit
Hi @jkarneges my backend service running to validate token.after validation of token ineed to send response standard way with response code.
Justin Karneges
@jkarneges
@niranjan-kmit if you just want to respond normally then you can simply do that. if no grip instructions are provided, the proxying is a passthrough
NIRANJAN
@niranjan-kmit
Hi @jkarneges how can we implement heart beat service for pushpin? i want know the active connections
NIRANJAN
@niranjan-kmit
Hello . Can any one guide me to the implementation of heart beat endpoint with puhpin?
Justin Karneges
@jkarneges
@niranjan-kmit there are a couple of ways to do this. one is to subscribe every connection to a unique channel, and monitor the subscriptions to see who is connected. however, TCP connections that go away may linger for a long time, so a more accurate way to determine active connections is for the clients to send heartbeats, which pushpin will then pass along to your backend
NIRANJAN
@niranjan-kmit
@jkarneges any ref documentation we have for this?
Justin Karneges
@jkarneges
@niranjan-kmit for the first approach, see the code sample at the end of this section for monitoring subscriptions https://pushpin.org/docs/advanced/#subscription-forwarding