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

Refactor Application class #154

Merged
merged 9 commits into from
Sep 15, 2020
Merged

Conversation

zigen
Copy link
Contributor

@zigen zigen commented Sep 11, 2020

I refactored Application class

@zigen zigen changed the title Refactoring Application class Refactor Application class Sep 11, 2020
@zigen zigen marked this pull request as ready for review September 11, 2020 09:42
scheduleAt(simTime() + exponential(0.00001 * myAddress), pk);
break;
}
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we know that no more to do something in this method, so I wrote this to return.
we should keep the scope small to make it more readable.

if (traffic_pattern == 2) {
int endnode_dest_addr = getOneRandomEndNodeAddress();
EV_INFO << "My connection setup request will be sent from " << my_address << " to " << endnode_dest_addr << "\n";
ConnectionSetupRequest *pk = createConnectionSetupRequest(endnode_dest_addr, number_of_resources);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want to think about the detail of the packet creation.
so I move this into createConnectionSetupRequest method

quisp/modules/Application.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@rdviii rdviii left a comment

Choose a reason for hiding this comment

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

Are we satisfied with the address issue?

@rdviii
Copy link
Contributor

rdviii commented Sep 14, 2020

Oh, and ultimately this is related to what the API for applications ought to be; what's the quantum equivalent of a BSD socket? That's an actual research issue that has been on the list for several years, and no one has really pursued it in depth yet. Wojtek's observation that "time is part of the service" is definitely relevant here -- the API should include high-precision timestamps, probably below the nanosecond level for some purposes.

@rdviii rdviii merged commit ccc4b8e into sfc-aqua:master Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants