Giter Site home page Giter Site logo

Ordering guarantees about reactor HOT 6 CLOSED

reactor avatar reactor commented on July 23, 2024
Ordering guarantees

from reactor.

Comments (6)

smaldini avatar smaldini commented on July 23, 2024

Interesting, would it mean to make the current tasks queue shareable?

from reactor.

smaldini avatar smaldini commented on July 23, 2024

(Also I think exposing the task queue would be interesting for storage/retry/metrics/etc)

from reactor.

dynaxis avatar dynaxis commented on July 23, 2024

Hi, I'm the person who wrote the reply quoted above. My concern is somewhat related to https://groups.google.com/forum/?#!topic/reactor-framework/9iUBl7lZZyc .

I got that reactor removes direct dependencies between event generators and consumers and is really fast at dispatching events. It is already a good aid for asynchronous programming in general. But it would be good if we don't need to care about explicit synchronization at all when writing consumers (especially with stateful consumers).

As you know, actors and some other in-VM messaging frameworks such as Jetlang try to do so by requiring programmers to concern only about message exchanges inside their application. No other synchronization is required. Here I'm roughly equating Consumers and actors (Fibers in Jetlang).

I'm afraid such a facility is not in the scope of Reactor possibly due to differences in the major design decision or something like that.

from reactor.

dynaxis avatar dynaxis commented on July 23, 2024

#55 seems relevant to this issue too.

from reactor.

jbrisbin avatar jbrisbin commented on July 23, 2024

I think this issue is addressed by the Resequencer support now in master that enforces order on a Consumer by managing checkouts and checkins of slot numbers.

from reactor.

smaldini avatar smaldini commented on July 23, 2024

As a side note, the latest changes in Dispatcher (e2f3a4b) also solve this, order is guaranteed for singleThreaded dispatcher (event Loop, Ring Buffer) where ThreadPool will redispatch to any available thread.

from reactor.

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.