Grasshopper

algorithmic modeling for Rhino

ACADIA 2015 Hackathon - Sending Snippets via Flux

As part of the ACADIA 2015 Hackathon, Ramon van der Heijden at Front Inc and I developed a way to send arbitrary Grasshopper snippets to another instance of Grasshopper (on a local or remote machine). This can be used to push the computation to another machine, allowing you to continue editing the definition, then the output of your snippet will be pushed back when the computation has completed on the remote machine. Alternatively, you can store snippets in data keys and instantiate them as needed or simply have a live way of sharing portions of a script with others.

This is a modification of Andrew Heumann's Create Snippets script that looks at all the nodes that are grouped with the CreateSnippet node and generates the XML of those objects. Then using Flux, the XML data is transmitted to the other instance, and is essentially "pasted" onto the remote instances' canvas. If you include nodes to transmit the data back to the local instance, the result will appear once the solver has completed on the remote machine. The script automatically enables all nodes that have been disabled on the local side. This allows you to prevent the solver from calculating the snippet on your machine, but allows it to be run remotely.

When setting up a Flux, you can simply create a data key to send the data up to the other machine and one to send it back. You can see these in the example images as the blue Item Selector nodes with the names "LocalToVirtual" and "VirtualToLocal."  

We were able to use this to push computation to an Amazon EC2 instance. This would be especially handy for nodes that already have multi-threading/parallel computing options available (ie Honeybee / Ladybug), but we're looking in to ways of splitting large data sets up and running them on multiple instances of Rhino/GH on the same machine. 

The files area attached below, feel free to give it a try and see how you can improve it!

LocalMachine_RetrieveResults.gh

RemoteMachine.gh

Views: 1654

Comment

You need to be a member of Grasshopper to add comments!

Comment by Ángel Linares on November 3, 2015 at 11:49pm
Closer to a mobile GH app that runs your code in a remote machine...possibilities are mind blowing :) Amazing work!
Comment by Anthony Buckley-Thorp on October 27, 2015 at 1:32pm

Really great work - so excited to see what else people do with Flux. We currently have a beta user wait-list in place but anyone who wants to try this out now please e-mail me at anthony@flux.io and I can arrange immediate access. (Please include ACADIA 2015 in the subject title.)

Comment by Nate Holland on October 27, 2015 at 8:41am

Nice work!

Comment by Stephen Maher on October 27, 2015 at 8:29am

This is awesome! Well done.

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service