Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce HTTP server side caching #128

Closed
mantzas opened this issue Jan 2, 2020 · 5 comments · Fixed by #193
Closed

Introduce HTTP server side caching #128

mantzas opened this issue Jan 2, 2020 · 5 comments · Fixed by #193
Assignees
Labels
enhancement New feature or request

Comments

@mantzas
Copy link

mantzas commented Jan 2, 2020

Is your feature request related to a problem? Please describe

We would like to introduce optional caching on the server-side in order to improve performance and the load on our systems.
The solution should comply with the RFC and should meet the below requirements:

Describe the solution

  • Use the builder pattern to setup the cache
  • Add the caching per route
  • Follow the RFC for the headers
@mantzas mantzas added enhancement New feature or request Up for grabs The issue/bug is ready for implementation and removed Up for grabs The issue/bug is ready for implementation labels Jan 2, 2020
@drakos74
Copy link

drakos74 commented Mar 2, 2020

i would be interested in working on this, connected to that one : #129. If there are no objections...

@drakos74
Copy link

drakos74 commented Mar 2, 2020

just for consistency , RFC for headers : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

@drakos74
Copy link

drakos74 commented Mar 2, 2020

The initial idea is to create a caching middleware. Does that sound reasonable ?

@drakos74
Copy link

drakos74 commented Mar 9, 2020

On it!
It seems though that this one would help a lot with the abstraction ... #167 . Does it make sense if i base my changes on it ? And we can always release them one by one , when the 167 gets merged.

@mantzas
Copy link
Author

mantzas commented Mar 10, 2020

@drakos74 I am actually already finished with #167, so just CR and merge and you have everything you need.

drakos74 added a commit to drakos74/patron that referenced this issue Mar 14, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 14, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 14, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 22, 2020
drakos74 added a commit to drakos74/patron that referenced this issue Mar 25, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 25, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 25, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 25, 2020
drakos74 added a commit to drakos74/patron that referenced this issue Mar 30, 2020
drakos74 added a commit to drakos74/patron that referenced this issue Mar 30, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Mar 30, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
drakos74 added a commit to drakos74/patron that referenced this issue Apr 1, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 2, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue May 9, 2020
drakos74 added a commit to drakos74/patron that referenced this issue Jul 22, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit to drakos74/patron that referenced this issue Jul 24, 2020
Signed-off-by: Vangelis Katikaridis <[email protected]>
drakos74 added a commit that referenced this issue Jul 24, 2020
* #128 cache wip implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 adjust to patron new version

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 refine requirements

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 first iteration of server cache functionality

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 server route cache implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Add validation for brokers in kafka.NewBuilder (#191)

Signed-off-by: Stanislav Afanasev <[email protected]>

* Add ActiveBrokers() method to Kafka AsyncProducer (#192)

Signed-off-by: Giuseppe Mazzotta <[email protected]>

* #128 revert sixth example main

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 update readme

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix more linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 add vendor file

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Add Route struct getters (#195)

Signed-off-by: Alex Demin <[email protected]>

* Introduce dockertest to integration tests (#182)

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 wrap up implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 add readme details on cache metrics

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 readme adjustments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 finalise implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 increase test timeout

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 decouple tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #193 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Update tracing and metrics dependencies (#190)

Signed-off-by: Paschalis Tsilias <[email protected]>

* #128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 update vendors

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Upgraded github actions v2 (#198)

Signed-off-by: Sotirios Mantziaris <[email protected]>

* #128 make abstraction simpler and easier to use

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 add comment

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 trigger the build

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 unexport response read writer

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 check for min < max

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 update vendor

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 remove timeinstant and make use of ttl cache only for route caching

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 update readme after latest changes

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix redis cache interaction and create cached route example

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 remove the processor specific logic for the cache

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 use the patron header alias instead of a raw map

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 expose cache functionality as a middleware

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 refactor cache logic to separate package

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 remove timeinstant abstraction

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 avoid defining the prometheus registerer

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix linting and exported objects

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 make middleware cache abstraction more concrete

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 make the naming conventions and structure more go like

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix imports

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 move timing request example to user service

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 fix typo

Signed-off-by: Vangelis Katikaridis <[email protected]>

* #128 add package doc

Signed-off-by: Vangelis Katikaridis <[email protected]>

Co-authored-by: Stanislav Afanasev <[email protected]>
Co-authored-by: Giuseppe <[email protected]>
Co-authored-by: Alexander Demin <[email protected]>
Co-authored-by: Paschalis Tsilias <[email protected]>
Co-authored-by: Sotirios Mantziaris <[email protected]>
Stefos pushed a commit to Stefos/patron that referenced this issue Oct 8, 2020
* beatlabs#128 cache wip implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 adjust to patron new version

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 refine requirements

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 first iteration of server cache functionality

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 server route cache implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Add validation for brokers in kafka.NewBuilder (beatlabs#191)

Signed-off-by: Stanislav Afanasev <[email protected]>

* Add ActiveBrokers() method to Kafka AsyncProducer (beatlabs#192)

Signed-off-by: Giuseppe Mazzotta <[email protected]>

* beatlabs#128 revert sixth example main

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 update readme

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix more linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 add vendor file

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Add Route struct getters (beatlabs#195)

Signed-off-by: Alex Demin <[email protected]>

* Introduce dockertest to integration tests (beatlabs#182)

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 wrap up implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 add readme details on cache metrics

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 readme adjustments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 finalise implementation

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 increase test timeout

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 decouple tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#193 fix tests

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Update tracing and metrics dependencies (beatlabs#190)

Signed-off-by: Paschalis Tsilias <[email protected]>

* beatlabs#128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 update vendors

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 implement review comments

Signed-off-by: Vangelis Katikaridis <[email protected]>

* Upgraded github actions v2 (beatlabs#198)

Signed-off-by: Sotirios Mantziaris <[email protected]>

* beatlabs#128 make abstraction simpler and easier to use

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 add comment

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 trigger the build

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 unexport response read writer

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 check for min < max

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 update vendor

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 remove timeinstant and make use of ttl cache only for route caching

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 update readme after latest changes

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix redis cache interaction and create cached route example

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 remove the processor specific logic for the cache

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 use the patron header alias instead of a raw map

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 expose cache functionality as a middleware

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix linting

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 refactor cache logic to separate package

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 remove timeinstant abstraction

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 avoid defining the prometheus registerer

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix linting and exported objects

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 make middleware cache abstraction more concrete

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 make the naming conventions and structure more go like

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix imports

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 move timing request example to user service

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 fix typo

Signed-off-by: Vangelis Katikaridis <[email protected]>

* beatlabs#128 add package doc

Signed-off-by: Vangelis Katikaridis <[email protected]>

Co-authored-by: Stanislav Afanasev <[email protected]>
Co-authored-by: Giuseppe <[email protected]>
Co-authored-by: Alexander Demin <[email protected]>
Co-authored-by: Paschalis Tsilias <[email protected]>
Co-authored-by: Sotirios Mantziaris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants