Code Monkey home page Code Monkey logo

spigo's Introduction

spigo and simianviz

Join the chat at https://gitter.im/adrianco/spigo

GoDoc

Wiki Instructions

SIMulate Interactive Actor Network VIsualiZation - simianviz - also visualize the simian army in action. Follow @simianviz on twitter to get update notifications.

Originally called Simulate Protocol Interactions in Go - spigo - the name spigo is taken, however simianviz wasn't, so domains have been registered etc. and the name will transition over the coming months.

Using simianviz to view architecture diagrams

Launch the dependency graph visualization in your browser

aws reference architecture dependency graph

For a local installation of the UI, with no network dependencies, you can start the service and browse localhost:8000 using:

$ cd ui
$ npm install
$ npm run dev

With a local install of the Neo4j graph database, you can write the graph into Neo4j with -n, and additionally write the flow data with -n -c. Subsections of the graph and flows can be viewed using Neo4j queries. The default local Neo4j instance is expected to be at localhost:7474, this can be overridden by setting NEO4JURL in the environment. The password must be set in the environment as well.

$ ./spigo -n
2016/05/21 08:50:51 Neo4j requires environment variable NEO4JPASSWORD is set

neo4j dependency graph

Running the simulation to generate new visualizations and metrics

$ ./spigo -h
Usage of ./spigo:
  -a string
    	Architecture to create or read, fsm, migration, or read from json_arch/<arch>_arch.json (default "netflixoss")
  -c	Collect metrics and flows to json_metrics csv_metrics neo4j and via http: extvars
  -cpuprofile string
    	Write cpu profile to file
  -cpus int
    	Number of CPUs for Go runtime (default 4)
  -d int
    	Simulation duration in seconds (default 10)
  -f	Filter output names to simplify graph by collapsing instances to services
  -g	Enable GraphML logging of nodes and edges to gml/<arch>.graphml
  -j	Enable GraphJSON logging of nodes and edges to json/<arch>.json
  -kv string
    	Configuration key:value - chat:10ms sets default message insert rate
  -m	Enable console logging of every message
  -n	Enable Neo4j logging of nodes and edges
  -p int
    	Pirate population for fsm or scale factor % for other architectures (default 100)
  -r	Reload graph from json/<arch>.json to setup architecture
  -s int
    	Sequence number to create multiple runs for ui to step through in json/<arch><s>.json
  -u string
    	Polling interval for Eureka name service, increase for large populations (default "1s")
  -w int
    	Wide area regions to replicate architecture into, defaults based on 6 AWS region names (default 1)

Developing new architectures and simulation features

There were too many top level packages so a more hierachical directory structure was setup.

Directory structure
- spigo        # binary built for MacOS
- spigo.go     # main program
- actors       # go code for packaged behaviors
- tooling      # go support code
- ui           # visualization code using d3 and js
- misc         # scripts to run all tests and regenerate output
- json_arch    # architecture definition files
- json         # json dependency graph output
- json_metrics # flow, metrics and guesstimate output
- csv_metrics  # histograms saved as tables
- png          # images for readme
- archived     # old files and packages
- gml          # old graphml dependency graphs

The format of architecture definition files is described in json_arch/README

Docker compose (v1 and default to version2) yaml files can be converted to architecture json by extracting the dependency tree. Some editing to set the right relative counts and actor packages will be needed.

$ cd compose2arch; go install

$ compose2arch -file myarch.yaml > json_arch/myarch.json

Contributing and forking Spigo/SimianViz

Here's a useful guide to managing forked go programs on github. Thanks to Kurt, Priya and Henri for their initial contributions and advice.

Ideas for future enhancements and interfaces have been accumulated as Issues, please take a look there and feel free to add your own comments and ideas, or go ahead and implement something.

Next steps, papers and presentations

See this paper for some Occam code and results for the original version of this idea circa 2007.

The public launch was during a short keynote presentation at the March 2015 O'Reilly Software Architecture Conference: Monitoring Microservices - A Challenge - Video of the 10 minute talk

Most of the microservices presentations on Adrian's slideshare account discuss the current state of work.

The basic framework is in place, but more interesting behaviors, automonous running, and user input to control or stop the simulation haven't been added yet.

Next steps include connecting the output directly to the browser over a websocket so the dynamic behavior of the graph can be seen in real time. A lot of refactoring has cleaned up the code and structure in preparation for more interesting features.

Jason Brown's list of interesting Gossip papers might contain something interesting to try and implement...

spigo's People

Contributors

adrianco avatar basvanbeek avatar benders avatar gitter-badger avatar kkemple avatar kmissoumi avatar mechanoid avatar rogpeppe avatar vaskoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spigo's Issues

Model cassandra behaviors more accurately

First pass at hash based sharding in priamCassandra seems to work well enough for now.
priamCassandra_test.go shows the token assignments and how balanced the hash is across nodes

cass5:0,cass6:268435455,cass8:536870910,cass1:805306365,cass7:1073741820,cass12:1342177275,cass13:1610612730,cass0:1879048185,cass4:2147483640,cass9:2415919095,cass14:2684354550,cass15:2952790005,cass2:3221225460,cass3:3489660915,cass10:3758096370,cass11:4026531825
map[6:55 1:60 13:65 5:51 4:79 7:54 14:69 12:60 15:82 10:64 2:63 3:56 11:59 8:62 0:64 9:57]

For now the ring token assignments are only setup within each zone, so when replicating a Put messages are sent to a random node in the right zone or region, which then passes them on to the right place. This should be extended so that each node gossips it's ring to the other zones and regions.

Make architecture enter time-lapsed

Each node and edge has a timestamp, it would be nice to render each node individually so that the user could watch the architecture grow over a timed period. Nodes and edges are already sorted:
https://github.com/adrianco/spigo/blob/master/ui/js/stores/chart.js#L87

nodes = sortBy(nodes, 'timestamp');
edges = sortBy(edges, 'timestamp');

this.cache[this.architecture + step] = {nodes, edges};

The rendering code for the chart just needs to be refactored and adjusted to render each node individually:
https://github.com/adrianco/spigo/blob/master/ui/js/chart/index.js#L75-L128

Error: Cannot find module 'gulp-notify'

root@n42-poweredge-8:~/spigo/src/github.com/adrianco/spigo/ui# npm run dev

[email protected] dev /root/spigo/src/github.com/adrianco/spigo/ui
node_modules/.bin/gulp dev

Error: Cannot find module 'gulp-notify'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/root/spigo/src/github.com/adrianco/spigo/ui/.gulp-tasks/bundle-app.js:4:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm ERR! weird error 8
npm ERR! not ok code 0

Fetch all architecture data upfront

Currently only the step of a particular architecture is grabbed at one time, this is to prevent unnecessary data transfers, however soon the ability to play through an architecture's life cycle will be needed. In order to do that all data must be prefetched from the server:

https://github.com/adrianco/spigo/blob/master/ui/js/stores/chart.js#L29-L49
https://github.com/adrianco/spigo/blob/master/ui/js/stores/chart.js#L119-L137

This would also require the UI to have some sort of "loading" state.

Generate trace-viewer output

The message logs generated by -m could be visualized using the Google trace viewer
https://github.com/google/trace-viewer

There's a JSON format with a bunch of options, but it should be possible to see each message being generated, waiting on the channel, and the start and end of the goroutine that consumes it.

Question on F5 LB and Zuul

Hi Adrian,

I have a question on configuring Zuul and exposing the same with multiple host names.

Currently we have apache mod jk reverse proxy to do that.

I am sure this is not the right forum/place to ask the same. Please let me know where can I post this to get it answered from you.

Thanks
Bharath

How to get architecture on the local UI ?

I ran the compose2arch -f xxx.yaml |python -m json.tool > my_arch.json .

I was also able to run the ./spigo -a my_arch.json =j=true

I was able to run npm install and bring up the UI locally . I see the my_arch.json copied as part of the json in the UI directory

What files should I modify to get the "my_arch" in the drop down (on the browser ) so that I can see the visuallzations in the browser ?

Benchmark gotocol message formats

Build a benchmark.go nanoservice package that records performance for each message type separately in more detail. Create a test routine that sends messages as fast as possible with varying amounts of payload and different buffer sizes on the channel and vary number of CPU runtime threads.

Try out various optional extensions to gotocol to see what the performance impact is.

Write up channel benchmarks as a blog post.

Response and service time histograms

Fix the metrics/hdrhistogram code to export histograms. Use the zipkin timestamps to measure response time and service time, as well as the current message transfer time.

Read in architecture from a json definition

Instead of having hard coded netflixoss, lamp, migration architectures, have them defined as json files and use a single architecture.go package to read them in and launch them.

Started coding architecture.go - it's not part of the build yet.

Collect and save/process histograms of response times

Tweaked hdrhistogram configuration to use much less memory.
Changes to metrics package to export histograms - need to make a pull request for codahale/metrics
Collect histograms for response time (zipkin cr-cs) and service time (zipkin ss-sr) as well as network delay (zipkin sr-cs was the initial implementation, cr-ss).

Save time distributions in the json graph when a node exits.

Extend message to include trace and span ids for zipkin like logging

Add two 64bit fields to message. One is set to indicate the overall context of a series of put or getrequest and getresponse messages making up a request from end to end. The other is unique for each span to be monitored. If both are set then they are logged along with message timestamp and other metadata.
The result should be able to simulate enough detail to output zipkin or similar log files.

Local installation not working

I ran:

$ cd ui
$ npm install
$ npm run dev

however the last command returns the following output:

$ npm run dev

> [email protected] dev /Users/mmiglier/spigo/ui
> gulp dev

[18:10:35] Using gulpfile ~/spigo/ui/gulpfile.js
[18:10:35] Starting 'dev'...
[18:10:35] Starting 'build-dev'...
[18:10:35] Starting 'clean-dist'...
[18:10:35] Finished 'clean-dist' after 20 ms
[18:10:35] Starting 'lint'...
[18:10:35] Starting 'styles'...
[18:10:35] Starting 'copy-font-awesome-fonts'...
[18:10:35] Starting 'copy-google-fonts'...
[18:10:35] Starting 'copy-html'...
[18:10:35] Starting 'copy-json'...
[18:10:35] Starting 'bundle-app'...
[18:10:35] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:35] 'lint' errored after 375 ms
[18:10:35] ESLintError in plugin 'gulp-eslint'
Message:
    true === false
Details:
    fileName: /Users/mmiglier/spigo/ui/js/actions.js
    lineNumber: 0
[18:10:36] 'dev' errored after 457 ms
[18:10:36] Error in plugin 'run-sequence'
Message:
    An error occured in task 'lint'.
[18:10:36] 'build-dev' errored after 404 ms
[18:10:36] Error in plugin 'run-sequence'
Message:
    An error occured in task 'dev'.
[18:10:36] 'build-dev' errored after 406 ms
[18:10:36] Error in plugin 'run-sequence'
Message:
    An error occured in task 'lint'.
[18:10:36] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:36] Finished 'copy-html' after 576 ms
[18:10:36] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:37] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:37] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:37] gulp-notify: [Gulp notification] Styles created...
[18:10:37] Finished 'styles' after 1.89 s
[18:10:37] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:37] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:37] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:37] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] Finished 'copy-font-awesome-fonts' after 2.71 s
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:38] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:39] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:40] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:40] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:40] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:40] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:40] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:40] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:41] Finished 'copy-google-fonts' after 6.13 s
[18:10:41] gulp-notify: [Error running Gulp] Build Error: true === false
[18:10:42]
/Users/mmiglier/spigo/ui/js/actions.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/api-client.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/app.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/dispatcher.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/four-oh-four.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/layout.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/router.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/simianviz.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/chart/index.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/header/index.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-collision-detection.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-connected-nodes.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-fisheye.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-link-expander.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-pin-nodes.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-removable-links.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/d3-removable-nodes.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/lib/store-event-mixin.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/stores/chart.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/js/toolbar/index.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/gulpfile.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/build-dev.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/build-prod.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/bundle-app.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/clean-dist.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/copy-font-awesome-fonts.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/copy-google-fonts.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/copy-html.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/copy-json.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/dev.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/lint.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/minify-app.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/minify-styles.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/serve.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/styles.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/tdd.js
  0:0  error  true === false

/Users/mmiglier/spigo/ui/.gulp-tasks/test.js
  0:0  error  true === false

✖ 37 problems (37 errors, 0 warnings)

[18:10:49] Finished 'copy-json' after 14 s
[18:10:51] gulp-notify: [Gulp notification] Client app bundled...
[18:10:51] Finished 'bundle-app' after 16 s

and finally no service is listening to port 8000 on localhost.

Any idea on what could be wrong? thanks

Unable to build locally

I tried to use the compose2arch program on Linux-x64 and it expectedly failed . I tried to compile the compile2arch.go by setting the GOPATH but the directory structure is not right . Is there a easier way to build this code ?

Forgetting nodes not working yet

chaosmonkey removes a node half way through a run
nodes do go away, and notify eureka
eureka is sending forget messages to callback parties

rest of behavior isn't tested or working yet

Extend message to include separate header, URI and body strings, or parse json body

Each message needs a header that can include the kind of things that live in HTTP headers, i.e. mime types for the content, transaction id's for zipkin like tracing.

Each get, put or delete message could have a URI in the format
Imposition: Put
header: transactionid:1
uri: gotocol://servicename/route/keyspace/key
body: value

The servicename would be looked up and would process the level2/level3/thing

Response messages would use the transaction id from the header to lookup the return service path
Imposition: GetResponse
header: transactionid:2
uri: gotocol://keyspace/key
body: value

These could be implemented as separate strings in gotocol or as a combined json payload in a single string. Need to benchmark the difference.

For branching transactions, needs a parent txid and a child txid

Save and restore Archaius config

The global config should be saved along with the architecture and read back inso that things like the aws region names can easily be over-ridden with datacenter or other public cloud names.

V0r4 json graphs will show Done nodes with Exit status

V0r4 adds timestamps and changes the name service to package. Next needs to write Done records to the file when everything exits. For the spigo.html file viewer these can be ignored. For the connected real time app that will come eventually, nodes and edges need to be removed.

For now, when an edge is forgotten, there is no way to remember which numbered edge it was. Need to keep a map in graphjson and remove those as well.

Connect go code directly to browser and push updates

First step - build a push.go and push_test.go package that replays the graphjson output using the timestamps to control the rate and send it to a browser via websocket or http/2 server push.

Second step - integrate push.go into a standalone graphpush.go tool that loads a graphjson file, sets up an http endpoint then loops the data at a controlled speed into the connected browser app.

Third step - integrate push.go into edda.go as an option to manage and display the simulation as it happens.

UI Architecture menu needs more entries or dynamic update

There are only four entries in the Menu, but several additional architecture output files exist.

Need to document how to add entries to the list or make it dynamic based on whatever is available.

$ ls json
aws_ac_ra_web.json fsm3.json lamp5.json migration3.json netflix1.json netflix9.json netflixoss7.json
container.json fsm4.json lamp6.json migration4.json netflix2.json netflixoss.json netflixoss8.json
container1.json fsm5.json lamp7.json migration5.json netflix3.json netflixoss1.json netflixoss9.json
container2.json lamp.json lamp8.json migration6.json netflix4.json netflixoss2.json testyaml.json
container3.json lamp1.json lamp9.json migration7.json netflix5.json netflixoss3.json
fsm.json lamp2.json migration.json migration8.json netflix6.json netflixoss4.json
fsm1.json lamp3.json migration1.json migration9.json netflix7.json netflixoss5.json
fsm2.json lamp4.json migration2.json netflix.json netflix8.json netflixoss6.json

investigate symlinking JSON from root to UI folder

currently you need to copy all JSON files from the root directory over to the UI directory for the UI to work properly, while this is fine for deploying, it makes local dev a real PITA. the JSON dir should either be watched via gulp, or simlinked

Generate GraphViz support

The graphjson and graphml formats should be easily translated into GraphViz notation so that people can use that toolset to manipluate the graphs. http://www.graphviz.org/Home.php

Filing this as an enhancement in case anyone feels like building a translator or generator code.

DNS setup CNAME for simianviz.net

I can't figure out the config to get a CNAME to work. I'd like simianviz.org to redirect to this github site and simianviz.net to redirect to the SPA at simianviz.divshot.io

Extend chaosmonkey to have a list of victims

Currently there is a single victim listed in an arch file which is killed half way through a run. This hack needs to be extended to a list of victim services with frequency of attack options, timing, separate logging of chaos incidents etc.

Attack currently just kills off the victim, it would be good to also simulate network partitions by forgetting listener addresses, sleeping the victim for a long period, or other bad behaviors.

Question: how to visualise my own arch?

Hi all,

Same with many others, Adrian's great talk on State of Arts Microservices brought me here.

I am having my first go at Simianviz. Just created my own json arch by using the provided script to convert my docker compose file (name:"frontier_arch.json"). I can see now in the json_arch folder:

tree json_arch   
json_arch
├── aws_ac_ra_web_arch.json
├── cassandra_arch.json
├── container_arch.json
├── frontier_arch.json
├── lamp_arch.json
├── netflix_arch.json
├── netflixoss_arch.json
├── test_arch.json
├── testyaml_arch.json
└── yogi_arch.json

I can see I could run spigo to simulate some load:

/spigo -a frontier -d 5 -j -g                     
2015/10/21 13:17:12 Loading architecture from json_arch/frontier_arch.json
2015/10/21 13:17:12 frontier.edda: starting
2015/10/21 13:17:12 Architecture: /Users/jasonw/java/projects/vagrant-docker-jenkins-frontier/frontier_sharefolder/docker-files/frontier-compose/docker-compose.yml compose yaml
2015/10/21 13:17:12 architecture: scaling to 100%
2015/10/21 13:17:12 Starting: {mysql1 machine instance frontier-mysql process monolith 1 3 []}
2015/10/21 13:17:12 frontier.us-east-1.zoneA.eureka0....eureka.eureka: starting
2015/10/21 13:17:12 frontier.us-east-1.zoneB.eureka1....eureka.eureka: starting
2015/10/21 13:17:12 frontier.us-east-1.zoneC.eureka2....eureka.eureka: starting
2015/10/21 13:17:12 Starting: {frontier_java_app_1 machine instance frontier-java-app process monolith 1 3 [mysql1]}
2015/10/21 13:17:12 Starting: {frontier_java_app_2 machine instance frontier-java-app process monolith 1 3 [mysql1]}
2015/10/21 13:17:12 Starting: {haproxy1 machine instance frontier-haproxy process monolith 1 3 [frontier_java_app_1 frontier_java_app_2]}
2015/10/21 13:17:12 frontier.us-east-1.zoneC.haproxy12....haproxy1.monolith activity rate  10ms
2015/10/21 13:17:17 asgard: Shutdown
2015/10/21 13:17:17 frontier.us-east-1.zoneC.eureka2....eureka.eureka: closing
2015/10/21 13:17:17 frontier.us-east-1.zoneA.eureka0....eureka.eureka: closing
2015/10/21 13:17:17 frontier.us-east-1.zoneB.eureka1....eureka.eureka: closing
2015/10/21 13:17:17 spigo: complete
2015/10/21 13:17:17 frontier.edda: closing

I started the server using
npm run dev

I assumed my architecture diagram would show up along with the 'lamp', 'netflix' ones in the dropdown but couldn't find it.

Am I missing something?

Another question is, when I am generating load using Spigo commandline, should I be expecting visual changes on the d3 diagrams? Or the 'charge' on the page meant to be for that?

Many thanks,

Jason

Cannot read property 'neighbours' of undefined

Uncaught TypeError: Cannot read property 'neighbours' of undefined.

it is emanating from the following loop, any idea why is this happening?
cola.js line 3332
Watch Expressions
"i ": Object
length: 144
source: "ds"
target: "sdf"

  while (i--) {
                var e = this.es[i];
                var u = getSourceIndex(e), v = getTargetIndex(e);
                var d = getLength(e);
                this.neighbours[u].neighbours.push(new Neighbour(v, d));
                this.neighbours[v].neighbours.push(new Neighbour(u, d));
            }

UI Performance

My friends and I have been playing around with spigo, and so far it's been great. One thing we’ve noticed is that for higher node visualizations, performance becomes a major problem. For migrations/9, I was unable to even use the graph as the frame rate became less than 5 per second.

After timelineing the graph and looking at the styles, I was able to conclude that paint times were the largest contributor of poor performance. After diving deeper, I would suggest that instead of manipulating positioning on the nodes and tool-tips, I would manipulate it using transforms so it renders in its own layer. http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/

You might want to look into debouncing the scroll events with requestAnimationFrame, so you’re not doing too much scripting into one frame (16ms).

After that, you could try to reduce the amount of nodes on the screen with some kind of clustering, as this would ease rendering performance as well. You could do cool things with clicking to see subnodes to still be able to show all the nodes if you wanted to.

UI needs to pick up different architectures

However, the lamp.html netflixoss.html and fsm.html pages need to reference lamp.json etc. At present the shared js code is hardwired to migration.json - the architecture should really be a drop down menu or url parameter in one ui page - something like spigo.html?arch=migration&step=1

Also, with the latest changes, the *-local-d3.html files can be removed.

updated npm run dev fails for local ui

This was working until I sync'd the updates to allow pinning and deleting

$ npm run dev

[email protected] dev /Users/acockcroft/go/src/github.com/adrianco/spigo/ui
gulp dev

[23:44:37] Using gulpfile ~/go/src/github.com/adrianco/spigo/ui/gulpfile.js
[23:44:37] Starting 'dev'...
[23:44:37] Starting 'build-dev'...
[23:44:37] Starting 'clean-dist'...
[23:44:37] gulp-notify: [Gulp notification] Client dist folder cleaned...
[23:44:37] Finished 'clean-dist' after 36 ms
[23:44:37] Starting 'lint'...
[23:44:37] Starting 'styles'...
[23:44:37] Starting 'copy-font-awesome-fonts'...
[23:44:37] Starting 'copy-google-fonts'...
[23:44:37] Starting 'copy-html'...
[23:44:37] Starting 'copy-json'...
[23:44:37] Starting 'bundle-app'...
[23:44:38] Finished 'copy-html' after 559 ms
[23:44:38] gulp-notify: [Gulp notification] Styles created...
[23:44:38] Finished 'styles' after 772 ms
[23:44:38] Finished 'copy-font-awesome-fonts' after 979 ms
[23:44:38] gulp-notify: [Error running Gulp] Build Error: 'force' is not defined.
[23:44:38] 'lint' errored after 1.08 s
[23:44:38] ESLintError in plugin 'gulp-eslint'
Message:
'force' is not defined.
Details:
fileName: /Users/acockcroft/go/src/github.com/adrianco/spigo/ui/js/lib/d3-pin-nodes.js
lineNumber: 5
[23:44:38] 'dev' errored after 1.14 s
[23:44:38] Error: [object Object]
at formatError (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/bin/gulp.js:169:10)
at Gulp. (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:117:20)
at Gulp.Orchestrator._emitTaskDone (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/run-sequence/index.js:60:4)
at Gulp.emit (events.js:117:20)
[23:44:38] 'build-dev' errored after 1.12 s
[23:44:38] Error: [object Object]
at formatError (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/bin/gulp.js:169:10)
at Gulp. (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:117:20)
at Gulp.Orchestrator._emitTaskDone (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/run-sequence/index.js:60:4)
at Gulp.emit (events.js:117:20)
[23:44:38] 'build-dev' errored after 1.12 s
[23:44:38] Error: [object Object]
at formatError (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/bin/gulp.js:169:10)
at Gulp. (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:117:20)
at Gulp.Orchestrator._emitTaskDone (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/node_modules/run-sequence/index.js:60:4)
at Gulp.emit (events.js:117:20)
[23:44:39]
/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/js/lib/d3-collision-detection.js
16:18 warning Function 'anonymous' has a complexity of 6 complexity

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/js/lib/d3-link-expander.js
19:21 warning Strings must use singlequote quotes

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/js/lib/d3-pin-nodes.js
5:4 error 'force' is not defined no-undef
6:3 error Unnecessary semicolon no-extra-semi
14:3 error Unnecessary semicolon no-extra-semi
17:0 warning Line 17 exceeds the maximum line length of 120 max-len
19:6 error 'force' is not defined no-undef
20:3 error Unnecessary semicolon no-extra-semi

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/.gulp-tasks/bundle-app.js
25:33 warning Strings must use singlequote quotes

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/.gulp-tasks/lint.js
22:33 warning Strings must use singlequote quotes

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/.gulp-tasks/minify-app.js
16:33 warning Strings must use singlequote quotes

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/.gulp-tasks/minify-styles.js
16:33 warning Strings must use singlequote quotes

/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/.gulp-tasks/styles.js
14:33 warning Strings must use singlequote quotes

✖ 13 problems (5 errors, 8 warnings)

[23:44:39] Finished 'copy-google-fonts' after 1.65 s
[23:44:41] Finished 'copy-json' after 3.77 s
Cannot find module 'lodash.sortby' from '/Users/acockcroft/go/src/github.com/adrianco/spigo/ui/js/chart'

Dynamically create menu of architectures

At present there is a fixed set of fsm, lamp, netflixoss, migration. However there is now an ability to load from a json spec and create a new architecture, so there needs to be a dynamic menu.

I suggest separating the output files intended for the SPA into a separate subdirectory from the architecture and metrics files, then anything in that directory gets loaded by the SPA.

To make the transition easier, graphjson files will stay in /json

I will move arch and metrics files into /json_arch and /json_metrics by changing the go code and moving existing files over

Divshot hosted UI is no longer available

Divshot has shut down
http://simianviz.divshot.io/

Site Unavailable
Divshot, the hosting provider for this website, has ceased operation as of December 22, 2015. Divshot technology now powers Firebase Hosting.
If this is your website, please update your DNS to point to a new hosting provider!
So long, and thanks for everything!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.