Skip to content

nisranjan/cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cache.Svc

This is a cloud native distributed cache service with a more reliable per node router.

Usage

Put

Puts and Key-Value pair in the cache using HTTP POST. The key is typically a numeric value (but not essential) and the value can be a complex object.

HTTP POST request
http://{IP}:{Port}/api/cache/{key}

A sample object

{
    "key": "0",
    "value": {
        "person":{
            "name":"Zeroooo",
            "address":"Texas, USA"
        }
    }
}

Run In Postman

If you are having issues with these APIs in Postman Apps, refer to this doc

Get

Gets a value for an existing Key-Value pair from the cache using HTTP GET Method.

HTTP GET request
http://{IP}:{Port}/api/cache/{key}

Run In Postman

If you are having issues with these APIs in Postman Apps, refer to this doc

Delete

Deletes an existing Key-Value pair from the cache using HTTP DELETE Method

HTTP DELETE request
http://{IP}:{Port}/api/cache/{key}

Run In Postman

If you are having issues with these APIs in Postman Apps, refer to this doc

FEATURES

  • Cloud Native

    • Cache.svc current runs inside a Container (this service on AWS Elastic Container Service)
    • Cache.svc also runs as a Serverless service (Amazon Fargate)
    • All communication in Cache.svc is HTTP only (i.e. client to server & also server to server including routing calls)
  • Distributed Router

    • Every node in the server has a router - this is potentially a more reliable design than a single central router
    • Routing is based on Consistent Hashing algorithm;
    • Routers communicate to each other, if a key maps to a different server, then the request to read-write is forwarded to relevant server, otherwise its handled locally
  • LRU Cache

    • Currently supports only Least Recently Used algorithm

Cache.Svc Architecture

Read this for Cache.Svc architecture

Version

2.0-SNAPSHOT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published