Git Product home page Git Product logo

Comments (4)

adrai avatar adrai commented on June 25, 2024

No at the moment there is no api that does this... but may I ask why you need it? What is your intend?

from node-eventstore.

NilsFrkal avatar NilsFrkal commented on June 25, 2024

Re: [node-eventstore] Only Getting Undispatched Items per StreamID (#45)

Thanks for getting back to me ... here is my scenario:

My users can be online or offline. My backend doesn't know about the sessions as this is managed in nodejs/sessions/redis. So all "relevant events" are send out and stored in your event store (pretty cool stuff by the way ...). Anyway, I can have 2 situations:

A) user is currently logged in with 1 or more devices. In this case I broadcast the events up to the channel immediately
B) user is offline. In this case I just store the events until ... user comes online

-> here is the problem. As soon as the user logs in I need to broadcast the undispatched events. But I can only get them by going through all undispatched events. Unfortunately I am looking at "pretty high volume event and not so many people logged" in scenario most of the times. So this becomes fairly expensive.

I am just wondering how you solved this in the "add event" scenario as in this case it is based on streamId?

Cheers, Nils

from node-eventstore.

adrai avatar adrai commented on June 25, 2024

ok? https://github.com/adrai/node-eventstore#own-event-dispatching-no-event-publisher-function-defined
v1.5.0

from node-eventstore.

NilsFrkal avatar NilsFrkal commented on June 25, 2024

Awsome! Works like charm ... Thanks Adrai. Much appreciated.

from node-eventstore.

Related Issues (20)

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.