4 Replies Latest reply on Aug 2, 2018 5:56 PM by john_reynolds

    Internal Add On Tile - Auto Update with group activity/content

    davidhickey13

      Hi, this is the third time I have attempted to post this question, my content keeps getting sent for moderation before it is posted.

       

      I have an add-on tile that I am using on our Jive platform in order to runs AMA (Ask Me Anything) sessions.

       

      Basically the tile polls a specific place (an AMA-specific group/project) in order to find new questions in its activity stream, these Q's are then presented to the AMA host so that he can vie and answer them in the tile.

       

      What I want to do is improve on the update mechanism so that no polling of the REST service is required and the updates to the tile happen automatically when new content (question) is created in the group that the tile is in.

       

      Is this functionality available Out Of The Box for tiles? What is the recommended approach for achieveing this functionality without polling?

       

      I know it is possible to set up a webhook for a place and then presumably I would need to write a websocket service (using sockets.io or something) that can push the new content to the tiiles html. But I am hoping there is a simpler, more integrated way.

       

       

      The tile is completely internal and has no need to integrate with any services outside of our Jive platform.

       

       

      Thanks,

       

       

      David

       

       

      Yuval Z Butch Marshall Pawan Shah  Jez Martin John Reynolds

       

       

       

       

       

       

       

       

       

       

      Powell Trusler Pierce Currid

        • Re: Internal Add On Tile - Auto Update with group activity/content
          john_reynolds

          Hi David,

           

          I would say there are two ways to do this:

           

          1. The webhook you mentioned. Based on criteria, the webhook would be initiated and perform an action, in this case pushing a new configuration to the tile when a new project question is asked. Note, the webhook would have to run somewhere, but you can run this in your own environment and the webhook would be registered to run at that location. There aren't any out of the box mechanisms in Jive for Webhooks, so they have to be custom developed. The benefit is that the tile would get updated in as close to real-time as possible. One minor drawback is that you have to account for if the Webhook fails to run. See the 2nd option for that
          2. Create a standalone middleware application that periodically retrieves data from Jive (newly posted questions) and then remotely pushes a new configuration to the tile. You can optimize this API call for performance reasons or even maintain a "last run" date so that you're only retrieving recently created content. This has the benefit of running on a schedule (~15m, ~30m, etc), putting monitoring around it's execution, and knowing that you're getting the latest state of the information. You could say the delay in tile update (depending on the schedule) is a negative, but it seems that as long as the tile is updated in a timely manner, it would be ok.
          • Re: Internal Add On Tile - Auto Update with group activity/content
            davidhickey13

            Thank you John! Really appreciate this info. For sure it is an option 1 scenario we are looking at.

             

            Just for clarification for me:

            'the webhook would have to run somewhere' - Doesn't the webhook run on our Jive platform?
            Am I right in saying that I would need to write a service that the webhook is pointed to?


            For option 1, could I create a node.js based service and deploy it with the add-on itself? I am trying to keep all layers of the solution contained in the add on package.

            Does this make sense or am I misunderstanding what you proposed?






              • Re: Internal Add On Tile - Auto Update with group activity/content
                jgoldhammer

                David,

                the web hooks are http requests from Jive to another service which understands the format. It cannot be packaged into a custom view tile- it must be a hosted add-on on any server. It will make it more complex, of course. You cannot package the node.js service into the add-on itself- the node.js must run outside of Jive Using webhooks for Jive integrations.

                 

                Thanks

                Jens

                • Re: Internal Add On Tile - Auto Update with group activity/content
                  john_reynolds

                  'the webhook would have to run somewhere' - Doesn't the webhook run on our Jive platform?
                  Am I right in saying that I would need to write a service that the webhook is pointed to?

                  No, they don't run on Jive

                  Sorta, as far as the service you write.

                   

                  Webhooks are a standard mechanism to have a platform (in this case, Jive) send data to an external URL (including Jive) when an event occurs.

                  Webhooks neither push or pull content from Jive.  Webhooks are a mechanism to allow you to register to receive notification of an event.  When the event occurs, the *platform* will call an external URL, typically with information about the event that occurred. Thus in the webhook if you want to push data back into Jive, you just have to write code that acts on the event and pushes data back to Jive using separate REST API calls.

                   

                  In that way, it makes sense that they're not hosted on Jive.

                   

                  Hope that helps