6 Replies Latest reply on Mar 21, 2019 8:17 PM by arthur.michel

    Reponse from osapi.jive.core.get() Extremely Slow

    eric.anastas Novice

      I have developed a custom tile which displays featured blog posts in a carousel. I have not made any changes to the tile recently, and it has been working fine for months. However, as of last Friday it has been taking a very long time, as in 10-15 seconds, for the tile to display any content.

      I did some debugging and found that my call to osapi.jive.core.get() is taking a very long time to return. For example here's a screen shot that shows response times from 5-12 seconds!


      I'm using the API to retrieve the latest blogs posts from a number of key places on our Jive site. I'm able to make the following REST request request directly to the site with out a problem.




      As you can see the response returns in 302 ms in Postman.



      However, making the same request via osapi.jive.core.get() takes multiple seconds to return.


      var requestTime = new Date();




              href: url,

              v: "v3"


          .execute(function(res) {

              var responsetime = new Date();

              var respElapsed = responsetime - requestTime;


                  "Request: " + requestTime.toLocaleTimeString() +

                  ", Response: " + responsetime.toLocaleTimeString() +

                  ", Elapsed: " + respElapsed +

                  ", URL:" + url




      This logs responses times from 2.3 all the way up to 21.0 seconds


      Request: 12:38:43 PM, Response: 12:38:47 PM, Elapsed: 3614, URL:/contents?sort=dateCreatedDesc&startIndex=0&fields=banner,subject,tags,permalink,conten...

      Request: 12:38:47 PM, Response: 12:38:52 PM, Elapsed: 4953, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:38:52 PM, Response: 12:38:55 PM, Elapsed: 3101, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:38:55 PM, Response: 12:38:58 PM, Elapsed: 3355, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:38:58 PM, Response: 12:39:00 PM, Elapsed: 2277, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:39:00 PM, Response: 12:39:06 PM, Elapsed: 5360, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:39:06 PM, Response: 12:39:27 PM, Elapsed: 20959, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publ...

      Request: 12:39:27 PM, Response: 12:39:31 PM, Elapsed: 4692, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:39:31 PM, Response: 12:39:46 PM, Elapsed: 14374, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publ...

      Request: 12:39:46 PM, Response: 12:39:52 PM, Elapsed: 6591, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:39:52 PM, Response: 12:40:06 PM, Elapsed: 13565, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publ...

      Request: 12:40:06 PM, Response: 12:40:16 PM, Elapsed: 10432, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publ...

      Request: 12:40:16 PM, Response: 12:40:21 PM, Elapsed: 4488, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:40:21 PM, Response: 12:40:28 PM, Elapsed: 6565, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:40:28 PM, Response: 12:40:37 PM, Elapsed: 9079, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:40:37 PM, Response: 12:40:44 PM, Elapsed: 7242, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...

      Request: 12:40:44 PM, Response: 12:40:52 PM, Elapsed: 7822, URL:/contents?sort=dateCreatedDesc&fields=banner,subject,tags,permalink,contentImages,publi...



      Related: Making REST API calls directly from a Jive app or tile

        • Re: Reponse from osapi.jive.core.get() Extremely Slow
          jgoldhammer Jive SME

          Hi Eric,


          very interesting observation!


          "social/rpc" calls are handled differently in comparison to normal ajax calls- social/rpc calls are handled by the opensocial container Apache Shindig within Jive. Technically this is the JiveJsonRpcServlet which extends the JsonRPCServlet (shindig/JsonRpcServlet.java at trunk · apache/shindig · GitHub ) from Apache Shindig (GitHub - apache/shindig: Mirror of Apache Shindig (incubating) ). This servlet hands over all calls to a  HttpRequestHandler shindig/HttpRequestHandler.java at trunk · apache/shindig · GitHub which executes this requests via own requestpipeline (shindig/DefaultRequestPipeline.java at trunk · apache/shindig · GitHub ). This pipeline will call the jive endpoint again via network to execute the plain ajax request (the same like in postman).


          My guess: Aurea has made a change in the shindig execution layer which leads to this result. Maybe we have limited resources here, so that the layer cannot handle all incoming requests at the same time and social-rpc-requests have to wait to be executed. That would explain the different response times, especially in comparison with the direct ajax call.


          In the end only Aurea can tell you via application monitoring what the problem is. AFAIK they use New Relic and should be able to answer this question...




            • Re: Reponse from osapi.jive.core.get() Extremely Slow
              eric.anastas Novice

              Thanks for the very informative response!


              I originally filed a support ticket with Aurea on this issue, but the support rep responded saying there's nothing he can do because customizations and the REST API are beyond the scope of Aurea support .


              What can Jive Support help you with? What can't Support do?


              So what options do I have from here? This obviously isn't something I can troubleshoot.

                • Re: Reponse from osapi.jive.core.get() Extremely Slow
                  jgoldhammer Jive SME


                  ok- understood.


                  Some other questions:

                  • Was your jive platform upgraded during that time?
                  • Do you see other social/rpc calls from the jive platform itself which are slow?


                  If you find some slow calls from the platform, you could create a new support ticket with these findings. I think it is a general issue and not related to your custom tiles...




                    • Re: Reponse from osapi.jive.core.get() Extremely Slow
                      eric.anastas Novice

                      I'm not aware of our instance of Jive being upgraded when this started becoming a problem. We are on Jive Cloud and I see "Jive SBS 2019.1.0.0" on the top right of the admin panell.


                      My tile makes other requests to osapi.jive.core.get() which do not take a long time. Here's what the tile does.


                      1. Get current users streams from "/people/@me/streams" and only record offical "publication" streams.
                      1. Gets the associated places for each stream "/streams/{streamID}/associations


                      Next I attempt to read the most recently created blogs in any of these places. Here's my code that that generates the request URL.


                      var featuredBlogsReqUri = "/contents?sort=dateCreatedDesc&startIndex=0" +

                          "&fields=banner,subject,tags,permalink,contentImages,published,-resources" +



                          if (newsPlaceUris.length > 0) {



                              featuredBlogsReqUri += "&filter=place(";


                              for (var i = 0; i < newsPlaceUris.length; i++) {

                                  featuredBlogsReqUri += newsPlaceUris[i];



                                  if (i < newsPlaceUris.length - 1) featuredBlogsReqUri += ",";

                                  else featuredBlogsReqUri += ")";




                      Requesting the URLs generated from this code directly to the rest API is fast, but is slow through osapi.jive.core.get().