CYRE
Neural Line ID based event manager C.Y.R.E ~/`SAYER`/ action-on-call
Cyre is designed to provide reactive and dynamic networking throughout the application. It's really interesting because the whole operation evolves around controlling the behavior how they communicate between each other.
If you are familiar with javascript pub/sub method or Redux's dispatchers/reducers you are good to go with Cyre. The main difference would be Cyre has one extra step, action(action, on, call) some methodology difference
Action
Actions in cyre are the operators, the link between dispatchers and reducers of all services that application provide. The application could have unlimited number of emitters and subscribers however services can only be able to communicate through if their ID is listed in the actions list. Therefore limiting unauthorized access with reducers or vice-versa.
Actions in Cyre stack vertically, each action can have its own middleware, conditions and pre-payload. One action can have its own error log without affecting the next action's performance
cyreaction'reducer_id'
On
On in cyre are the reducers/absorbers except that they don't listen to every dispatches/emits. Cyre targets specific reducer by their action type ID so they only act up on when they are called. One action can have multiple listeners and these listeners can be named or anonymous, => arrow, functions
cyre
Call
Calls in Cyre are interesting methods because they are not particularly emitters more like triggers. I call them Air lift technology. Think of them like an embassy sends rescue drone to return its citizens in post apocalypse situation. Cyre doesn't concern about the emitter or the situation, only their ID. If the is valid against home database, actions list, it will dispatch the package to, trigger action, with that ID with optional new payload. Calls are runtime methods so thats why they need to be lightweight.
cyre
Installation
npm i cyreyarn add cyre
Usage example
/* { cyre.action: 'predefine action with preconditions and default payload', cyre.on: 'link action.type with function' , cyre.call: 'execute action by id' cyre.dispatch:'define and execute action on demand' } *///eg simple use: eg simple use cyreaction id: 'uber' payload: 44085648634 cyrecyre //user interface: at action creators/view model//execute action with default payloadcyre //execute action with new payloadcyre
Extra features
//Delay effect/debounce/or throttle actioncyreaction id: 'screen_resize' type: 'adjustScreen' interval: 400
//Repeat actioncyreaction id: 'apiCall' type: 'apiServer' interval: 400 repeat: 10
//Log for specific actioncyreactionid: 'apiCall' type: 'apiServer' log: true
//Stop all iterating actionscyre
//Remove functions from listeningcyre
Cyre examples
Made with Cyre git projects
Project pipeline
-
1.0.0 initial commit
- adding functionality
- expand useability
- fix compatibility
-
1.2.0 optimization
- increase performance
- testability
- reliability
Meta
Distributed under the MIT license. See LICENSE
for more information.
Contributing
- Fork it (https://www.npmjs.com/package/cyre/fork)
Q0.0U0.0A0.0N0.0T0.0U0.0M0 - I0.0N0.0C0.0E0.0P0.0T0.0I0.0O0.0N0.0S0Expands VERTICALLY as projects grows 2019