Project

General

Profile

Caching for Redmine API

Added by Niraj Bhatt almost 7 years ago

Hi,

I am using redmine API for one of our product, there are 200 simultaneous users connection for updating and fetch data from various sources. Now I would like to implement caching mechanism to reduce database read / write operation from redmine API.

We have implemented echache for our java portals but how it will be helpful to integrate with redmine?

Is there any other way to implement caching in redmine to reduce database load and give fast result via API only.

We are not using remine frontend / web admin for any communication, Only APIs.

It is quite urgent, Need someone help for the same.

Regards,
Niraj Bhatt


Replies (1)

RE: Caching for Redmine API - Added by dj jones over 6 years ago

Hi Niraj

Before playing, it would be good to get enough data to be sure you will be making a difference.

Eg if your 200 users are working on 200 seperate projects, one each: then caching will likely not help.

So first, it would be worth logging the API activity and see if there is alot of repeated calls.

But caching anyway is tricky, because users always want the latest, true data - not old but faster!

Because you are using Redmine over API, there is no way for your application to have any intelligence about caching - it can never know if the data is unchanged so no need to ask again.

Maybe when you look at the API calls you may see some poor practise, that you can correct in your code base (eg, same calls made multiple times in one second, when only 1 is needed, but the code in a loop is not re-using the results of the first call, but calling again each time round the loop- common inefficiency).

A better approach may be to start with the users - which user-types say it is slow? Doing what tasks? What MySQL queries do those tasks generate? What does the MySQL slow query say about them? Check the obvious things - is your database lacking free memory / not using SSD disks?

By the way, if these users are not using the redmine web interface at all... have you written your end front end to Redmine - or are users using some other big application, which for some of it's functionality uses Redmine APIs.

Your users are not benefiting from some of the UI power of Redmine if they never use the UI! (Of course the UI is far from perfect)

    (1-1/1)