Forum Discussion

Manasa's avatar
10 years ago

Display community content on extrenal site- should refresh rate be real time or set to some value?

Hello,

 

We are building a building a website that will contain certain pages that will fearture community content ( ex: we want to show latest blog articles on one of the pages) . This will require use of the REST API  to pull the content from the Lithium community. I would appreciate your help on the following. We cannot use the ActiveCast Widget because it does not cover all the filter criteria we need to apply for pulling in content.

 

1. Can we display the content in real time using the REST API. So as soon as there is new content that meets the filter conditions we are using, it would display on our website. If real time is not possible, what is a recommended refresh rate ( should we just cache the content we pulled in and then pull in new content at certain time intervals)?

 

2. Are there any performance issues with real time updates?

 

3. What is the best way to handle the case when Lithium does down for some raeson. In this case, does it make sense to cache the content displayed and continue to display it until new content is available?

 

Thanks,

Manasa

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)

    Hi Manasa

     

    thanks for sharing your use case with us. For your questions

     

    1. The REST API is a pull API, so you would have to poll at regular intervals. I would reccommend checking with your Lithium Manager in relations to the expected load increase for this integration. You can also investigate the event subscription model and see if the information provided by this API is enough for you (this is a push api). I think caching and polling at regular intervals could do the trick
    2. "Realtime" may translate into polling at a high frequency, which does not sound advisable in general
    3. This will depend on the requirements. For most applications and use cases, it sounds like a completely reasonable strategy to me.

     

    Hope this helps,