Giter VIP home page Giter VIP logo

Comments (3)

SanderMertens avatar SanderMertens commented on May 13, 2024

Let's see I understand you correctly; you have a module with one system that can issue a request (SendRequestSystem), and with another system that is listening for requests (HandleRequestSystem) and another system that listens for replies (HandleReplySystem), where the latter is only interested in replies to requests sent by the SendRequestSystem.

If this is the case, then I think the approach you suggested works. You add a tag unique to the SendRequestSystem - HandleReplySystem combination to the entity with the request component, and in the HandleReplySystem you subscribe for this tag.

It does sound a bit contrived, but I can't say based on this information whether it's the right or wrong approach. Other than that, I don't see anything inherently wrong with it.

from flecs.

teksoc-1 avatar teksoc-1 commented on May 13, 2024

@SanderMertens Yes, you have problem framed the issue well. And yes, that is the approach we are taking - I knew a callback like implementation for the response was not really ECSy ... so went with this ... I guess I wasn't necessarily happy with the solution, so was just kind of thinking out loud I guess, trying to reach for inspiration/alternatives and/or affirmation that we weren't doing anything inherently wrong.

from flecs.

SanderMertens avatar SanderMertens commented on May 13, 2024

@teksoc-1 I'm closing this question, feel free to reopen if you want to discuss further!

from flecs.

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.