Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fedsd utility updated to make the RTI optional and support enclaves visualization #1870

Merged
merged 9 commits into from Jun 29, 2023

Conversation

ChadliaJerad
Copy link
Collaborator

This PR updates fedsd utility to not require an RTI trace file.
This is per @erlingrj 's request, so that it supports enclaves visualization.

@ChadliaJerad
Copy link
Collaborator Author

@erlingrj and @edwardalee, this PR is intended to adapt fedsd to visualize the interactions between enclaves.
To this end, it derives the RTI tracepoints and draws horizontal lines for the communications.
The figure below showcases the output from a federation visualization, without using rti.lft.
fed_like_enclave

Does this make sense?

@ChadliaJerad ChadliaJerad changed the title Fedsd no rti Update fedsd utility to make the RTI optional and support enclaves visualization Jun 27, 2023
@edwardalee
Copy link
Collaborator

edwardalee commented Jun 28, 2023 via email

@erlingrj
Copy link
Collaborator

erlingrj commented Jun 28, 2023

Hi @ChadliaJerad, thanks alot for looking at this. I am currently getting a diagram that looks like this:
image

Based on the following 2 trace files (renamed from .lft to .txt to enable upload to Github):
EnclaveTracing_wrapper_src.txt
EnclaveTracing.txt

It would be amazing if we could get the the TAGGED_MSG event to go directly between the two enclaves. I think it is quite doable. All the messages that go to/from the RTI have dest/src -1 while this TAGGED_MSG (T_MSG) has src and dest set to the enclave ids

@erlingrj
Copy link
Collaborator

erlingrj commented Jun 28, 2023

I added two minor changes.

  1. Improve the exeception handling in fedsd
  2. Make the fedsd script use the trace_to_csv utility that is within the same bin directory as fedsd. It was currently using whichever was on the path and for me there was another trace_to_csv executable on the path

@erlingrj
Copy link
Collaborator

@edwardalee initially we will just use it draw diagrams of the enclaves coordination. I haven't even thought about Diagrams for enclaved federations yet. I think it could make sense to have one process per enclave and one process for the RTI process within each enclave. Those RTI processes will be the ones exchanging federate-level NETs and LTCs

@ChadliaJerad
Copy link
Collaborator Author

Ah, cool!But there is still the issue that all the trace points will go into one file.It also could be a real can of worms if we try to visualize federates with enclaves.

Indeed. Currently, the diagrams that make sense are either for federations or enclaves.
As mentioned by @erlingrj, the adaptation is just a step to help understand enclaves interactions.
Enclaved federates need to be thought toughly. This can only be done once the coordination federates/enclaves remote_rti/local_rti are set.

It would be amazing if we could get the the TAGGED_MSG event to go directly between the two enclaves. I think it is quite doable. All the messages that go to/from the RTI have dest/src -1 while this TAGGED_MSG (T_MSG) has src and dest set to the enclave ids

This is straightforward, since you can you tracepoint_federate_to_federate()...
The call will be done in the enclave implementation.

@ChadliaJerad
Copy link
Collaborator Author

Ah, cool!But there is still the issue that all the trace points will go into one file.It also could be a real can of worms if we try to visualize federates with enclaves.

Indeed. Currently, the diagrams that make sense are either for federations or enclaves. As mentioned by @erlingrj, the adaptation is just a step to help understand enclaves interactions. Enclaved federates need to be thought toughly. This can only be done once the coordination federates/enclaves remote_rti/local_rti are set.

BTW @edwardalee, there is a trace file per enclave.

@erlingrj
Copy link
Collaborator

I am using federate_to_federate but still the arrow goes to the RTI.

@ChadliaJerad
Copy link
Collaborator Author

I am using federate_to_federate but still the arrow goes to the RTI.

I see why. I will fix it right now (and check with your trace files) and let you know.

@ChadliaJerad
Copy link
Collaborator Author

@erlingrj, here is the diagram after the fix (using the trace files you provided):
image

@erlingrj
Copy link
Collaborator

Thats great! Very useful!

@erlingrj erlingrj enabled auto-merge June 28, 2023 20:01
@erlingrj erlingrj added this pull request to the merge queue Jun 29, 2023
Copy link
Collaborator

@erlingrj erlingrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Merged via the queue into master with commit 116b3c5 Jun 29, 2023
46 of 83 checks passed
@erlingrj erlingrj deleted the fedsd-no-rti branch June 29, 2023 09:42
@petervdonovan petervdonovan changed the title Update fedsd utility to make the RTI optional and support enclaves visualization fedsd utility updated to make the RTI optional and support enclaves visualization Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants