Skip to content

madbeyk/pirate-redmine-api-reverse-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pirate Redmine Api Reverse Proxy Cache

early beta (big bordel) stage

merging, filtering, sorting and autoupdating ability

Source data - Czech Pirate Party Redmine project management server JSON API
https://redmine.pirati.cz/projects/snemovna/issues.json

Output purpose - Czech Pirate Party webpage media results application (subpage)
https://pirati.cz/vysledky

Based on hapi.js 18.1.0 - Server Framework for Node.js

Utilizes Wreck library for Redmine API requests
Requires Node.js > 8.12

Handles requests from web application.
Merges and process requests to redmine API.
Caching data in catbox-memory.

Reason

  1. Very slow response of Redmine API (e.g. more than 3 seconds for 100 records)
  2. Paginated output of Redmine API (max. 100 records per request)
  3. Data filtering
  4. Data sorting

Win/Win

  1. Now the response is sorted and filtered (smaller payload by aprox. 25%)
  2. Server keeps cached data in memory and automaticly reload them every 30 minutes
  3. Response time is below 200ms

Install

git clone https://github.com/madbeyk/pirate-redmine-api-reverse-cache.git
yarn install

Set-up

process.env.HOST - IP adrress of server (default 0.0.0.0)
process.env.PORT - running port (default 80)

export PORT=3001
export HOST=your.host.ip

Run

yarn run start2

Todo

  • Caching
  • Filtering
  • Sorting by resorts and internal priority of each issue
  • Merge paginated requests to redmine (max. 100 results in one API response)
  • Automatic data update every 30 minutes
  • Advanced external API error handling (outtages ...)
  • Image processing (caching, resizing, minimizing ...)
];()~~~~~

Releases

No releases published

Packages

No packages published