Giter VIP home page Giter VIP logo

Comments (6)

staltz avatar staltz commented on June 16, 2024

Hey @ntilwalli I think onionify currently has the race condition problems that cycle/run used to have (with regard to cross-driver startup). So either we replicate that solution in this codebase, or wait for the next version of Cycle.js where onionify could be used as a "plugin". I prefer the latter but we can also do the former (PR please?).

But batching state updates as one scheduled state update sounds good. Smart idea

from cycle-onionify.

ntilwalli avatar ntilwalli commented on June 16, 2024

Thanks for the response. I could def PR this, after looking at the solution in run. How would the plugin architecture fix this? Or are you just saying if we waited until the next version of Cycle is released, we could avoid fixing this twice?

from cycle-onionify.

staltz avatar staltz commented on June 16, 2024

Hey Nikhil, if we get a PR, it should use a buffer like in cycle/run and this is overall a synchronous approach. So please don't send a PR to add delays because that's not a good solution (it adds noticeable disadvantages to other users and use cases).

The plugin system would help because then onionify would be like a "driver", and then it would use the solution that is currently inside cycle/run.

from cycle-onionify.

ntilwalli avatar ntilwalli commented on June 16, 2024

Yeah, the delay/debounce approach is not appropriate. I had updated my comment to indicate that. I'll look at how it was accomplished in run. I'm surprised that you're proposing onionify as a driver in the next version of cycle. I thought drivers are specifically associated with sinks that have side-effects. I assumed onionify would be a pure adapter in that architecture. Has your thought-process changed or am I misunderstanding?

from cycle-onionify.

staltz avatar staltz commented on June 16, 2024

I thought drivers are specifically associated with sinks that have side-effects. I assumed onionify would be a pure adapter in that architecture. Has your thought-process changed or am I misunderstanding?

Yes it would not be a driver, it would be a plugin, that's why I referred to it as "driver" with quotation marks two comments above.

from cycle-onionify.

ntilwalli avatar ntilwalli commented on June 16, 2024

Being a pure-plugin (adapter?) means there's no interaction with run, so even in the new architecture it wouldn't get the benefit of the built-in microtask queueing. Pure-plugins like onionify would need to implement the queueing for themselves similar to what I'm doing in the PR.

from cycle-onionify.

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.