Giter VIP home page Giter VIP logo

Comments (3)

tyarkoni avatar tyarkoni commented on May 21, 2024

Thanks for the question, @aleneum! Support for hierarchical states has been suggested before (#31); to recap: I think it would be nice, as long as the implementation can be made relatively compact. I'm happy to consider PRs or to discuss potential implementations, but probably won't have time to implement this myself any time soon, so it would fall to someone else to do it.

With respect to concurrent states, it depends on what you mean. If you mean support for being in multiple states at once, but still in a single-threaded context, I'm willing to consider something along those lines---though I'd need to be convinced that there's a real need for it. I guess my intuition is that most potential use cases could be reduced to either (i) making states hierarchical (so, this amounts to implementing hierarchies, as above), (ii) implementing multiple Machine instances, or (iii) refactoring the states so that you encode all possible combinations of desired states as discrete states.

On the other hand, if you're talking about concurrency in the sense of multithreading (see discussion in #30), then that's definitely not on the agenda, as I think it would be a beast to get right.

Since this has come up before, I'll mark it as help wanted and leave it open.

from transitions.

aleneum avatar aleneum commented on May 21, 2024

Thank you for your fast and detailed answer. I missed to check the closed issues. My thoughts went into the same direction as described in #31 and I would be happy to contribute (or at least give it a shot) if you consider this a promising road.

About concurrency: I agree with you that in most cases its preferable to redesign rather than using concurrency. Since it is problematic not just on the programatic level. It's also tough to debug and hard to comprehend and follow, especially if you have not worked with the code before.

It just seems to be a required and used feature in our robotic department (which also looks for a new state machine). I better check with the guys again about what they need. I assume they have cases like:

planTrip ----> checkEnvironment
    |                 |
    V                 V
checkSelf ------>  doTrip

where multiple settings and sensors have to be prepared and checked before something can be done. So yeah, the execution context is probably multithreaded, distributed and hell. I guess thats why they also want to rework they current solution :).

Thank you for your input so far. I will tinker around a bit and if we decide to build upon transitions I will probably contact you again.

Best regards,
Alex

from transitions.

tyarkoni avatar tyarkoni commented on May 21, 2024

Added in b327706. Thanks again, @aleneum!

from transitions.

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.