Coder Social home page Coder Social logo

Comments (8)

elBoberido avatar elBoberido commented on June 4, 2024 1

Yes, they will be be able to get data from a single publisher. You don't even need to copy the application to different directories but just make sure each invocation of the binary creates a new app-name. Can be done by providing a cmd line parameter or you could use genuid to generate unique app-names on the fly or use the pid + current time. I would recommend to enable the process monitoring in RouDi (-m ON) if you do this else the resources will not be cleaned up if an app crashes and gets restarted since it will have a different app name.

from iceoryx.

elBoberido avatar elBoberido commented on June 4, 2024 1

Oh, sorry. What I actually meant was uuidgen https://www.man7.org/linux/man-pages/man1/uuidgen.1.html

from iceoryx.

elBoberido avatar elBoberido commented on June 4, 2024 1

We have a mechanism that each process needs to send a heartbeat to RouDi. If this heartbeat is not send for a longer time, RouDi assumes the application crashed and cleans up the resources thereafter if started with -m ON. The cleanup happens only for applications which terminated abnormally, e.g. a crash. Applications which terminated gracefully already cleaned up their resources on their shutdown.

from iceoryx.

elBoberido avatar elBoberido commented on June 4, 2024

The constexpr char APP_NAME[] is just there to prevent magic values. You need one per process, not per subscriber and you can also use iox::runtime::PoshRuntime::initRuntime("my-app-name"); instead of the constexpr.

After the initRuntime call you can create multiple endpoints like publisher, subscriber, clients, etc. in the same process.

Does this answer your question?

from iceoryx.

afpgit avatar afpgit commented on June 4, 2024

How does this work in terms of scaling the number of subscribers?

Let's say, for the sake of example, I copy the executable associated with mysubscriber.cpp, i.e., mysubscriber.exe, into directory1, directory2, directory3, etc. Will they be able to get data from a single publisher?

Is there any way to automatically create app-names without worrying about manually creating unique app-names?

from iceoryx.

afpgit avatar afpgit commented on June 4, 2024

I did google genuid but nothing came up. May I have a link to it to learn more about it?

from iceoryx.

afpgit avatar afpgit commented on June 4, 2024

Please correct me if I am wrong. With ./iox-roudi -m ON, the daemon will force clean up any subscribers that are crashed or peacefully terminated.

from iceoryx.

elBoberido avatar elBoberido commented on June 4, 2024

@afpgit closing the issue. If there are more question feel free to re-open it

from iceoryx.

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.