Chakravyga
Description
Consider a n task done m resources, with each task has their own custom skill. This tasks will get routed to one of the m resource. This algorithm select the suitable resource based on the skill which is required for the task to be done and as well as the availability of resource.
Installation
npm install chakravyga
Usage
Resouces and tasks can be any objects.
Endpoints
Endpoints are the point where the task gets proccessed.
var chakra = ; var Endpoint = chakraEndpoint; // Each endpoints have // type = "major classification on an endpoint" // skills = "skills assosiated with the endpoint" // data = "data assosiated with the endpoint" var sathya = 'scifi' "tamil" "chennai" id: "AZ0123TYQ" usename: 'mugiwara' ; sathya;
Router
Router can be explained as a common point which subscribes to the incoming tasks. and selects the tasks based on enpoint availability.
var chakra = ; var Router = chakraRouter; var router = ; var Endpoint = chakraEndpoint; // Each endpoints have // type = "major classification on an endpoint" // skills = "skills assosiated with the endpoint" // data = "data assosiated with the endpoint" var sathya = 'scifi' "tamil" "chennai" id: "AZ0123TYQ" usename: 'shanks' ; sathya; var adhi = 'scifi' "tamil" "chennai" id: "AZ0123TYP" usename: 'ace' ; adhi; var magesh = 'scifi' "tamil" "chennai" id: "AZ0123TYR" usename: 'benn beckman' ; magesh; router; router; router; router; router; var end = router; end;
Licence
MIT