Skip to content

Exercise more capabilities of Swim in the tutorial application #5

Description

@brohitbrose
  • Introduce an exercise to the reader to update swim.tutorial.DataSource to write to more Agents than just /unit/master. Edit the README in server accordingly.

  • Introduce an exercise to the reader to create a stats value lane in swim.tutorial.UnitAgent that is populated by changes to histogram. Maybe suggest something that follows this skeleton. Edit the README in server accordingly.

  • Since the data entries in histogram are pretty boring, maybe enhance them with some measure of central tendency (e.g. mean/median) and some measure of spread (e.g. range; stdev/variance might be harder with streaming inputs but it seems doable?) Will leave this decision to @Crista2019 ; have fun with it!

  • Include solutions to a new branch (or branches, if you prefer that).

  • In the READMEs, ask how one might change the UI code to accommodate for these server-side changes.

Activity

  1. Crista2019 commented on Jul 8, 2020

    @Crista2019
    Contributor

    addressed in the tutorial_with_exercises branch:

    • Introduce an exercise to the reader to update swim.tutorial.DataSource to write to more Agents than just /unit/master...
    • Introduce an exercise to the reader to create a stats value lane in swim.tutorial.UnitAgent that is populated by changes to histogram...
  2. Crista2019 commented on Jul 8, 2020

    @Crista2019
    Contributor

    addressed in the tutorial_solutions branch:

    • Include solutions to a new branch... (let me know if you'd prefer multiple branches, though I like the idea of one solutions branch)
    • Since the data entries in histogram are pretty boring, maybe enhance them with some measure of central tendency and some measure of spread (I ended up tracking the most recent 5 data points, though this can be changed to the most recent x data points if 5 is too few)
  3. Crista2019 commented on Jul 9, 2020

    @Crista2019
    Contributor

    tasks left TODO:

    • ask @brohitbrose about what behavior should go into the logic of histogram.didRemove((k,o) ... to update the stats lane(s) in swim\tutorial\UnitAgent.java (on the tutorial_solutions branch)

    • make example changes to the UI code to reflect the suggested server-side changes (on the tutorial_solutions branch)

    • consider how to update the way in which data is randomly generated in swim\tutorial\DataSource --that is random yet predictable

  4. Crista2019 commented on Jul 11, 2020

    @Crista2019
    Contributor

    changes on the tutorial_solutions branch I have committed today:

    • all data going to the stats_* lanes have been consolidated and sent from histogram to one stats ValueLane<Value>
    • all UIs have a dropdown menu to select which web agent is shown
    • changes between web agents are reflected visually with different color schemes
    • the data sent from DataSource to each web agent are distinct so switching between them is more interesting
    • the gauge UI now links to the stats laneURI and shows mean and local mean, variance, std dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions