Triggering application behavior

Home Forums PeerfactSim Forum Triggering application behavior

  • This topic has 4 replies, 1 voice, and was last updated 9 years ago by Same Diffr.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #751
    Same Diffr


    I want to implement and simulate the SCRIBE group multicast application on top of Pastry in the simulator.

    When I am done with coding (lets assume I did no mistake) and the application theoretically works as it should. How can I trigger application specific behavior or actions in the simulation?

    For SCRIBE, these actions simply are creating, joining, leaving a multicast group and sending multicast messages to group members.

    As I understood, I can write an action.dat file for my application to trigger events at certain times during the simulation.

    But the action.dat only is interpreted by the simulator which then triggers according behavior.

    Formulating my question more precisely:
    I already implemented how my application should react on the four possible message types of SCRIBE. But I don’t know where I should implement the actual triggering of those four message types.

    In action.dat there’s the line “node 0110 joins group 0101”.
    Now some part of my application has to know, that it should send a join message.
    Where should I implement how the code interprets orders like these?

    I am sorry for the confusing formulation of my problem.

    Best regards

    Simulator version: 2013-10-17 PeerfactSim.KOM – Community Edition

    Philipp Giesen

    I’m not sure, if i understood your problem correctly, but your have 2 basic ways to trigger application behaviour.

    1) Via the actions-File, to tell certain nodes to start certain actions at a certain time.
    2) Via the reception of messages to your application. You can implement a MessageHandler to trigger application-internal behaviour after receiving a message of a specific type or content. You would have to implement either DHT or KBR-based message handlers (wheather you use KBR or DHT message forwarding in the overlay).

    Same Diffr

    “2) Via the reception of messages to your application.”
    That’s exactly what I did. I created 4 application specific message types. In the, I defined how a node should react when it receives a certain message type.

    “1) Via the actions-File, to tell certain nodes to start certain actions at a certain time.”
    Yes, I will need need an actions-file in order to force the simulated SCRIBE network to do as I wish (for evaluation purposes).

    My problems are:

    a) I don’t know what orders are valid inside an actions-file (i.e. the syntax and semantics). Is there a documentation about this?

    b) I don’t know “where” the actions-file connects to the simulator/my application. I mean, somehow, the orders of the actions-file have to be interpreted by the simulator or my application. Where can I find the part of the simulator performing this task? or Where do I have to implement it in my application?

    Thank you for your help.

    Philipp Giesen


    The actions-File is connected via your application.xml config-file.
    Just look into filesharing.xml or take a quick look into the Getting
    Started documentation on the site
    The structure of the actions.dat-File is explained there aswell.

    The actions-File is linked within the Scenario-Tag of the config-File.

    – zitierten Text einblenden –
    > —
    > You received this message because you are subscribed to the Google Groups
    > “PeerfactSim.KOM” group.
    > To unsubscribe from this group and stop receiving emails from it, send an
    > email to peerfactsim-k…
    > For more options, visit

    Same Diffr

    Ah, I see. Thank you very much.

    Best regards

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed.