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

src/alto/app/estimator.py: compress requests #7

Open
jacobdunefsky opened this issue Apr 25, 2022 · 0 comments
Open

src/alto/app/estimator.py: compress requests #7

jacobdunefsky opened this issue Apr 25, 2022 · 0 comments

Comments

@jacobdunefsky
Copy link
Collaborator

As was decided during a
meeting before the hackathon (although I can't find the Google Doc
in which this decision was made), the format of requests should
allow flows to be specified by specifying a many-to-many relationship
between sources and destinations. An example is as follows:

{"srcs": ["src1", "src2", "src3"], "dsts": ["dst1", "dst2"]}

The above dict defines six flows: one flow from each source to each
destination.

Now, this format was chosen to allow for the compression of requests.
However, the input format groups flows by source. Thus, an input like

SRC1 -> DST1 DST2
SRC2 -> DST1 DST2
SRC3 -> DST1 DST2

can be compressed to the dictionary given above. But this code doesn't
currently do that. The problem of finding an optimal compression
strikes me as NP-hard (although I haven't actually thought it through).
Thus, the current code simply naively translates the input string into
a dict. We might either want to change this, or decide that compression
is unnecessary/too much work, and change the design.

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

No branches or pull requests

1 participant