Giter Site home page Giter Site logo

dimichgh / oja Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 11.0 148 KB

Structure your application business logic - lightweight pub/sub module with event backlog, timeout support that maps events to promises and back as well as chains them to other topics.

JavaScript 100.00%

oja's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oja's Issues

Memory leak on long running scripts

Hi,

first of thanks for your library, it works quite well and encourages us to write small actions for our business logics, just as intended :)

We noticed, that the library has one inherent memory leak as the queue will never be cleaned.
As we use the library in a NodeJS service which usually won't restart, the queue will continuously grow and eventually hit the memory limit.

We fixed this for the time being by shifting the first element from the queue after emitting. This works in our use case but of cause will cause problems in use cases where consumers are defined later (aka repub). As such it would be nice to have the option to decide, whether or not a value should be put into the queue.

Do you have any plans into this direction or any other suggestions on how to handle this scenario?

Thanks in advance!
Laurens

async execute ()

/Users/cetisoftware/Documents/app/oja-selling-example/src/services/item-details/action.js:7
async execute() {
^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/Users/cetisoftware/Documents/app/oja-selling-example/src/pages/item/index.js:5:27)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.