Comments (6)
Hi Sean! Thanks for popping in.
No one is working on this currently. I think it'd be excellent to port to d3. Could end up making the visualizations interactive :)
I'll be generally AFK for the next week and a half so be in touch with @naterush as you come up with a plan. In general, I'd like to keep any additional web component completely optional and require minimal modifications to the core of the repo. I'm not a front-end guru so I'll defer to your judgement on tooling.
Some notes on potential features:
- Run/visualize
- configure simulation from web interface (pick params like the ones you can pass in to casper.py from command line)
- run specific from a test-string
- export
- as a test string
- as a gif
- handle binary and blockchain protocol
- Make tool as general as possible to handle both protocols. Will need some specific config depending on protocol. See our parent
plot_tool
vs the childrenbinary_plot_tool
andblockchain_plot_tool
- Make tool as general as possible to handle both protocols. Will need some specific config depending on protocol. See our parent
from cbc-casper.
from cbc-casper.
I think @karlfloersch mentioned that the reason the original PR was not merged in was b/c of some performance concerns.
Not sure if this is an issue - but it might be worth thinking about other visualizations as well.
from cbc-casper.
A web based d3 visualizer sounds awesome! I have decent amount web & d3 experience, and would love to take a crack at rebasing this PR and extending out. Is anyone currently working on this and/or is it still in the roadmap? @zramsay I see you are working on graphing features right now.
@naterush As far as scalability of the visualization goes.. Matplotlib uses canvas under the hood, so it has to re-render the entire view on each change (not good for frequently changing graphs). SVG utilizes the underlying dom is better for dynamic data. However, there is a hard limit on the number of DOM nodes and any change requires a complete re-render.
This is where I think react can come in. Since virtual-dom allows subsets of the view tree to be updated independently (only re-renders what changes). Plus the new react-fiber
implementation has given a huge performance boost to apps w/ large component tree. https://www.youtube.com/watch?v=Qu_6ItnlDQg
Uber has a nice d3-react library with higher level api's for tree maps :) https://github.com/uber/react-vis
from cbc-casper.
Hey Danny, thank you for the welcoming! huge fan of this project :)
Features above noted. Will dig more into how test_lang is working, would be cool to generate tests from the ui and export test_lang sequence from simulations.
Still getting feel for the repo and plot tool functionality, but basically, I am thinking that the plot tool could remain as is but emit JSON data instead of saving images & interacting with matplot if --web
is present in command line call.
Overview
- Plot Tool Modifications
- add another argument option
--web
that will initiate the web/d3 simulation process - append a boolean
self.web
to the plot_tool class as a gate on msg emissions-- sending json blob to express server
- Server
- a simple express server that serves the webapp payload on
/
- a websocket that connects to webapp client and forwards emitted messages from the python shell
- App v.1
- form to run simulations. specifying [rand, rrob, full, nofinal, binary], [#validators], [#rounds], [#interval]
- d3 visualization of simulation output. I am still testing out different libraries and apis for this and am not sure which will be best at this point. Perhaps using d3-force..
(https://bl.ocks.org/mbostock/4062045) - the app could save an array of of states [ {interval1}, {interval2}, {interval3}..] allowing traversal back and forth between rounds
I started building up a webapp yesterday and am making python shell calls on form submissions. Here is what the form looks like.
Goal today is to start emitting json data from the simulation to the webapp via websocket pushes. Once I have data loaded up in the app, I can start to toy with the visualizations 👍
from cbc-casper.
Update
I have a minimum working hack for pushing json data from the python shell to the web app over a websocket. Simple redux state accepting the pushes and updating the visualization.
The current graph is pretty naive and only renders nodes and edges. I want to get more nuanced features like sizing according to weight, some sort of clique clustering, styling on the message passing & conical chain highlight.
Also, will work on features noted above such as test_lang
integration and gif
exports. Would be helpful to know what features are the biggest priority for you guys.
Fully connected network looks pretty cool as of now :)
from cbc-casper.
Related Issues (20)
- Rename/move testing lang HOT 10
- Add descriptive comments to casper.py HOT 2
- View becomes positive ontology HOT 1
- Validator Strategies HOT 3
- Network.send to handle sender other than message.sender HOT 1
- Reconsider existing msg_gens used by SimulationRunner HOT 1
- Network that can handle peer connectivity
- Add last_finalized_estimate to protocols that need it HOT 1
- Oracle Comparisons HOT 1
- Add ability to specify initial bets HOT 2
- Add test language to protocols where it is missing HOT 1
- Add different estimate rules for protocols w/ non-deterministic estimates HOT 1
- Add safety detection to protocols where it is missing HOT 1
- Restructure Codebase HOT 16
- CliqueOracle optimisation? HOT 1
- Refactor network delay functions to be more dynamic HOT 1
- Add SkipBlockchain protocol to support skip blocks HOT 1
- Silly typo in wiki HOT 2
- Implement CBC-Casper HOT 1
- some thoughts on "CBC Casper the Friendly Ghost" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbc-casper.