Skip to content

Tutorial solutions #7

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

Open
wants to merge 34 commits into
base: solutions
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
18c997d
multiple agents
Crista2019 Jul 7, 2020
6be2651
clarify instructions to add agents
Crista2019 Jul 7, 2020
a588c8c
add exercise instructions to read.me
Crista2019 Jul 7, 2020
8ffe6c3
make exercise into actionable with TODO
Crista2019 Jul 8, 2020
1a268a1
add second try it yourself about stats lane
Crista2019 Jul 8, 2020
237a080
revise comment wording so I know what to separate out in the solution…
Crista2019 Jul 8, 2020
41748f2
empty template with TODOs and hints (w/o solutions)
Crista2019 Jul 8, 2020
93730e4
calculate basic average with stats value lane
Crista2019 Jul 8, 2020
d6bd22c
added second stats metric (local mean)
Crista2019 Jul 8, 2020
96a3716
add variance and std deviation calculations
Crista2019 Jul 8, 2020
15a584b
include more descriptive hints for logic to update stats
Crista2019 Jul 8, 2020
2515c3d
made tutorial vs solutions code clearer
Crista2019 Jul 8, 2020
85fb3ab
remove TODOs/instructions
Crista2019 Jul 8, 2020
a94cc0e
add suggestions to change UI after server exercises
Crista2019 Jul 9, 2020
dad986e
add suggestions to change UI after server exercises
Crista2019 Jul 9, 2020
789da1d
select web agent by dropdown with color changes
Crista2019 Jul 10, 2020
aece681
change color gradients for web agents, dropdown select
Crista2019 Jul 10, 2020
a2f852d
drop down to select web agent, color scheme change updates per agent
Crista2019 Jul 10, 2020
65290c2
differentiate data generated and sent to each web agent
Crista2019 Jul 10, 2020
d8901e3
send all stats data to one value lane of type Value
Crista2019 Jul 10, 2020
ea806bb
model the stats lane vals in the gauge UI
Crista2019 Jul 11, 2020
7c2a3e4
made TODO comment to add remove logic for histogram
Crista2019 Jul 11, 2020
3d5ee2f
variable naming convention refactor
Crista2019 Jul 13, 2020
3a639dd
commit with didRemove logic stopping point, before realizing that upa…
Crista2019 Jul 14, 2020
4a2ed02
add didRemove for avg and stats (local_* lanes may not require this l…
Crista2019 Jul 14, 2020
cfd7a9e
fixing scope/syntax errors in didRemove
Crista2019 Jul 14, 2020
698515b
fix casing for local final variables (from UPPER to camelCase)
Crista2019 Jul 14, 2020
f61a70e
update case of value labels to reflect last commit
Crista2019 Jul 14, 2020
794d58c
get item slot in histogram using 'count' key instead of index
Crista2019 Jul 14, 2020
f071c99
explain code solutions in the readmes
Crista2019 Jul 14, 2020
eea3c4f
flipping the () and [] markdown for links
Crista2019 Jul 14, 2020
fb541c1
fix variable name -> updatedStats
Crista2019 Jul 14, 2020
a89facf
remove gratuitous TODO
Crista2019 Jul 14, 2020
95a5f3c
make ++ and -- uniform without spaces before
Crista2019 Jul 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
flipping the () and [] markdown for links
  • Loading branch information
Crista2019 committed Jul 14, 2020
commit eea3c4f83b43e18eec3cac45c22e29abd22c3d50
4 changes: 2 additions & 2 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Swim implements a general purpose distributed object model. The "objects" in thi
[Creating a class](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L13) that extends `swim.api.agent.AbstractAgent` defines a *template* for Web Agents (though not a useful one until we add some [lanes](#lanes)).

#### *Example Solutions*
- *Created two additional web agents in (DataSource)[https://github.com/swimos/tutorial/blob/solutions/server/src/main/java/swim/tutorial/DataSource.java]*
- *Created two additional web agents in [DataSource](https://github.com/swimos/tutorial/blob/solutions/server/src/main/java/swim/tutorial/DataSource.java)*
- *Created unique Records (msg2 and msg3) to vary the data sent to different agents*

Visit the [documentation](https://developer.swim.ai/concepts/agents/) for further details about Web Agents.
Expand All @@ -25,7 +25,7 @@ Continuing our analogy, *lane callback* functions serve as the "methods" of Web
Each lane type defines a set of overridable (default no-op) lifecycle callbacks. For example, [sending a command message](#sending-data-do-swim) to any command lane will trigger its [`onCommand` callback](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L51-L54). On the other hand, [setting a value lane](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L53) will trigger its `willSet` callback, then update its value, then trigger its [`didSet` callback](http://github.com/swimos/tutorial/tree/master/server/src/main/java/swim/tutorial/UnitAgent.java#L40-L47).

#### *Example Solutions*
- *Added 5 new SwimLanes in (UnitAgent)[https://github.com/swimos/tutorial/blob/solutions/server/src/main/java/swim/tutorial/UnitAgent.java]*
- *Added 5 new SwimLanes in [UnitAgent](https://github.com/swimos/tutorial/blob/solutions/server/src/main/java/swim/tutorial/UnitAgent.java)*
- *the 'avg' ValueLane keeps track of changes to the mean cumulatively*
- *the 'localAvg', 'localVar', and 'localStdDev' ValueLanes run calculations on the 5 most recent data points sent from histogram*
- *the 'stats' ValueLane is an alternative design choice which tracks each of the above metrics using one lane of type Value (rather than 4 individual lanes of type Long)*
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy