🍰
Grasshopper ES por BetweenRealities
  • Using and Generating Documentation
    • GitHub
    • Discord
      • Speckle Webhooks
    • Speckle Client
  • Potencial technological implementations
  • 🧞Compute
    • Introducción a Grasshopper
      • Customizar Entorno
        • VSCode
      • Rhinoceros 3d
      • Hops
      • Galapagos
    • Modelos Informados
      • Comportamiento Estructural
        • Automatizar cálculo Python
      • OOP
      • Rhino Inside Revit
        • Revit
          • Modelado 3d en Revit
          • Certificación profesional Revit
      • Energía
    • Procesos Urbanos
      • Automatizar Qgis
      • Librerías Python
      • Librerías Grasshopper
      • Stable Diffusion
    • Programación
      • RhinoPython
        • Anatomía del script
        • Python básico
        • Tuples, listas y diccionarios
        • Operadores y funciones
        • Ejecución condicional
        • Geometría
        • Clases
      • Multithread
  • 🪅Database
    • Lenguaje Python
      • Types and operations
      • Statements and syntax
      • Function and generators
      • Modules and packages
      • Classes and OPP
      • Exception and tools
      • Advance topics
    • Análisis de la Información
      • Comparison with SQL
      • Comparison with R / R libraries
      • Pandas
    • Abrir Acceso
      • Rest API Abierta
    • Blockchain Descentralización
  • 🕸️COLLECT
    • Captura de Datos
      • Raspberry Pi
        • Encendido y apagado automático
      • Arduino
      • UAS
      • Fotogrametría
        • Crashes
    • Técnicas Machine Learning
      • Clasificación
      • Computer Vision
    • Computación en la Nube
      • Contenedores
      • Azure
      • Ubuntu Server Deploy
      • PostgreSQL Server
      • Rhino Compute Deploy
  • 🍭INTERACT
    • Introducción a Unreal Engine
      • Ejecutar Python
      • Datasmith
      • Materiales
        • Crear PBR
        • Materiales Introducción
      • Iluminación
        • Iluminación Introducción
        • Raytraced Iluminación Cinemática
      • Assets Management
    • Interacción Inmersiva
      • Blueprints
        • Blueprints estandar
        • Blueprints Introducción
        • Diseño Nivel
      • Packaging
      • Performance
    • Interfaces Bidimensionales
Con tecnología de GitBook
En esta página
  • App server to run Rhino Compute in Azure
  • ¿Que es Rhino Compute?
  • Introduction
  • ECOSYSTEM
  • RHINO COMPUTE: geometry engine
  • APPSERVER: A node.js app ans API for remote solving grasshopper definitions in Rhino.Compute
  • remote deployment: could be windows server 2019, kubernetes (they use this), docker
  • Deploy overview
  • Prerequisites
  • Create and use the VM
  • Modifying compute parameter after deployment
  • Updating the deployment

¿Te fue útil?

  1. COLLECT
  2. Computación en la Nube

Rhino Compute Deploy

AnteriorPostgreSQL ServerSiguienteIntroducción a Unreal Engine

Última actualización hace 2 años

¿Te fue útil?

App server to run Rhino Compute in Azure

Summary: So, to run Hops (1) using VM computation, I just need to set the parameter URL and KEY in preference>solver. To execute the vscode or other application request and get the json (2) I need to run the appserver locally (npm run start). And finally, to use the js application (3), both appservers must be running (local and VM).

  1. Run Hops: install compute in the VM, define URL and KEY in grasshopper (local) and works.

  2. Request API: Define env variables RHINO_COMPUTE_URL/KEY in local machine. Start the appserver in both machines and return the resolved json. It works like a charm.

C:\Users\casas\OneDrive\compute.rhino3d.appserver>npm run start

> @mcneel/compute.rhino3d.appserver@0.1.11 start
> node ./src/bin/www

Started worker 1
RHINO_COMPUTE_URL: http://****/
Listening on port 3000
Go to viewer: http://localhost:3000/view
GET /solve/srf_kmeans.gh?int_resolution=30&int_dimension=30&num_x=0.5&num_y=0.5&int_k=6 200 884.433 ms - -

If both do not start, this error occurs:

{
  "message": "Internal Server Error",
  "stack": "Error: Internal Server Error\n    at C:\\Users\\casas\\OneDrive\\compute.rhino3d.appserver\\src\\routes\\solve.js:152:15\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
}
  1. Run js app: I need to run both appservers (local and vm) to interact with the gh definition, right? Call from http://localhost:3000/examples/spikyThing/

When i am running boths app servers at the same time (vm and local) it works perfectly (did you refer to that? 'A local appserver can only speak to a local Rhino.Compute instance and a remote appserver can only speak to a remote Rhino.Compute instance.')

> @mcneel/compute.rhino3d.appserver@0.1.11 start
> node ./src/bin/www

Started worker 1
RHINO_COMPUTE_URL: http://*****/
Listening on port 3000
Go to viewer: http://localhost:3000/view
GET /examples/spikyThing/ 304 7.850 ms - -
GET /examples/spikyThing/script.js 304 2.397 ms - -
GET /examples/favicon/site.webmanifest 304 2.245 ms - -
GET /examples/favicon/favicon-32x32.png 304 2.945 ms - -      
POST /solve 200 561.313 ms - -

If both do not start, this error occurs:

GET /examples/spikyThing/ 304 1.793 ms - -
GET /examples/spikyThing/script.js 304 0.869 ms - -
GET /examples/favicon/favicon-32x32.png 304 0.999 ms - -
GET /examples/favicon/site.webmanifest 304 0.953 ms - -
Error: Internal Server Error
    at C:\Users\casas\OneDrive\compute.rhino3d.appserver\src\routes\solve.js:152:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
POST /solve 500 4177.648 ms - 249

¿Que es Rhino Compute?

Rhino Compute es un servicio de computación en la nube que permite a los usuarios ejecutar scripts y análisis complejos en Rhino y Grasshopper de manera rápida y sencilla. Utilizando la plataforma de Rhino Compute, los usuarios pueden subir sus archivos de Rhino y Grasshopper a la nube y utilizar la potencia de cálculo de la nube para ejecutar análisis complejos y grandes conjuntos de datos en poco tiempo. Esto permite a los usuarios ahorrar tiempo y recursos en la ejecución de análisis y scripts complejos, y también les permite trabajar de manera colaborativa en proyectos comunes.

  • Rhino.Compute is a geometry server: provides and API for geometry calculation using Rhino's geometry library. This server can process incoming http request to perform geoemtric calculation and or slve gh definitions and return results as a http response.

  • geometry server: The server is running Rhino in a non-user interface mode and makes a portion of the RhinoCommon .NET SDK available in a well defined pattern that matches the functions available in RhinoCommon.

  • Client library: communicate any programming language.

  • Setting up a production enviroment: [[Deployment to production servers]]

  • It works with other http clients: c#, python, JavaScript.

  • Hops: client which can make calls to rhino.compute from grasshopper. These function can increase legibility by simplifying complex definition while reducing duplication. [[Hops]].

Introduction

1a conferencia browser <> compute.rhino3d.appserver <> compute.rhino3d rhino3d.appserver: sources: bin>www: mira que hay en el files directory y cosas relacionadas con funciones de js routes: definitions, index, solve (get the request, handle different requests checking params, collecting inputs, checking cache and solving the definition or returning cache)

localhost:3000: /name_definition (description inputs and outputs), /inint.html (warm up, pasa todos los nested loop -sliders- para precalcularlos y guardarlos en el cache)

Automatizar la ejecución de rhino compute en service buscando el .exe. Mientrads tanto se puede ejecutar en local

2a conferencia server run his own instance of Rhinio Compute in Rhino 7 (tienes que tenerlo) e iniciar el servicio automáticamente Apps: compute.rhino3d: RhinoCommon en Grasshopper, private instance compute.rhino3d.appserver: running gh definitions with different inputs, node.js, cache to improve performance, serves browser and web pages. rhino3dm.js: web assembly, serialice geometry from definitions, create js meshes

example (favicon, app.js es el standard de express apps, index.html) compute.rhino3d.appserver>npm install (en el terminal de vscode)

ECOSYSTEM

browser <> compute.rhino3d.appserver <> compute.rhino3d compute.rhino3d (RhinoCommon, private instance, ) compute.rhino3d.appserver (run gh definintions, node.js express webapps [app.js], cache to improve performance, server browser and web pages) rhino3dm.js (web assembly of RhinoCompute <-> node.js, serialize geometry returned from web-grasshopper, create three.js meshes) example (favicon, apps.js with definition and inputs, index.html)

RHINO COMPUTE: geometry engine

architecture: clients (web base) <> server propio (rhino compute -compute_geometry.exe, authentification, API, cache, Rhino7) <-> server mcneal (cloud zoo)

github: https://github.com/mcneel/compute.rhino3d docs: https://developer.rhino3d.com/guides/compute/ billing: 20 cent/core/hour = 1$/hour = 25$/day = 750$/month (todas las horas encendido) presentación: https://discourse.mcneel.com/t/rhino-grasshopper-web-application-framework-presentation/106635

APPSERVER: A node.js app ans API for remote solving grasshopper definitions in Rhino.Compute

introducción: https://www.youtube.com/watch?v=At4BaIuEE3c architecture: clientes (web base) <> appserver (API, files, cache) <> Rhino.Compute API: / (list of definitions), /definition.gh (display info about input-output), /solve (solve gh definition and return json data), /definition/definitionID (send gh definition file)

local setup and debuging: 1. Rhino.Compute (dl, start, play) build: https://ci.appveyor.com/project/mcneel/compute-rhino3d/build/artifacts problemas con el build: https://discourse.mcneel.com/t/problems-with-some-examples-for-rhino-compute-appserver/122311/9 unzip compute and execute compute.geometry.exe and check version 'localhost:8081/version' (run compute) 2. Rhino.Compute (clone, start, debug, play) github: mcneal/compute.rhino3d/docs/develop.md 3. AppServer (clone, start, debug, play) git: https://github.com/mcneel/compute.rhino3d.appserver open samples in vscode folder live server for vscode (with the samples folder open)

appserver folder squema (run in vscode debug mode): sources (bin, example, files (archivos gh), routes[definitions.js, index.js, solve.js, app.js]) /bin/www: principal puerta de entrada, busca lo que hay en el file directory /routes/solve: get the request, handle differetn reuqest (check paramas, collect inputs, check cache and solve definition or return cache) run in localhost:3000 (/*name_definition, /init.html) localhost:3000/example.gh: descripción de inputs y outputs /init.html: pasa por todas las convinaciones para precalcularlas

remote deployment: could be windows server 2019, kubernetes (they use this), docker

  1. Rhino.Compute (deploy, test, play) docs: mcneal/compute.rhino3d/docs/deploy.md get a remote machine (windows) install rhino and compute (one line of code in docs, paste in powershell). This intall some service for autostart rhinocompute.geometry.exe automatically .url: dirección del remote desktop que quieres que ejecute las definiciones (dentro del código de examples)

  2. AppServer (deploy, test, play)

Deploy overview

Ho to setup a instance of rhino.compute on a virtual machine running IIS (internet information services). We can setup it to process incoming request and forward that request to the rhino.compute instance. The IIS is necessary to relaunch the compute server if it crash or malfunction (otherwise an API would be enough). ISS can launch an instance of compute when it is needed which in turn launch one or more child processes (perform the actual computation). When rhino.compute.exe does not receive request to solve the process will shut down and stop incurring core hour billing. When new request is received, ISS will make sure that rhino.compute.exe is running.

Prerequisites

  • bootstrap script: EmailAddress, ApiKey, RhinoToken.

Create and use the VM

Setup a physical machine to act as a server or create a virtual machine.

  • Running the Bootstrap script: Windows PowerShell commands.

  • Testing the app: compute server URLs and API key. Add the hops component and indicate the path.

Modifying compute parameter after deployment

Updating the deployment

<! node: https://nodejs.org/dist/latest-v13.x/ > docs: https://github.com/mcneel/compute.rhino3d.appserver/blob/main/docs/installation.md posible host: docker image, kubernetes, heroku, windows vm billing & licensing: https://developer.rhino3d.com/guides/compute/core-hour-billing/ añadirlo en plotly: https://dash.plotly.com/external-resources RHINO 3DM github: https://github.com/mcneel/rhino3dm build: https://github.com/mcneel/rhino3dm/blob/main/docs/python/RHINO3DM-BUILD.PY.md utilizando python: https://github.com/mcneel/rhino3dm/blob/main/docs/python/RHINO3DM.PY.md utlizando javascript: https://github.com/mcneel/rhino3dm/blob/main/docs/javascript/RHINO3DM.JS.md ejemplos: https://github.com/mcneel/rhino-developer-samples/tree/7/rhino3dm#samples HOPS documentación: https://developer.rhino3d.com/guides/grasshopper/hops-component/ introducción: https://discourse.mcneel.com/t/create-cpython-components-using-hops-in-grasshopper/120517 JUPYTER USING RHINO.COMPUTE git: https://github.com/kpfdev/Rhino_Compute_Workshop <! - DESARROLLAR PLUGINS VisualStudio: https://github.com/mcneel/rhino3dm install npm in vm with vscode: compute.rhino3d.appserver > npm install > <!- https://designcommunicationfx.com/ ->

Running rhino compute locally uses your existing Rhino license and does not cost any additional money. In production environment you will need a server or virtual machine with windows server (10 cent per hour per core).

connect via RDP: log onto it via remote desktop protocol which connect two computers over a network.

[0001 Basics of Grasshopper Plugin Development

🕸️
Rhino - Running and Debugging Compute Locally (rhino3d.com)
Rhino - Licensing & Billing (rhino3d.com)
Rhino - How to create a virtual machine (VM) on Azure (rhino3d.com)
Rhino - Deployment to Production Servers (rhino3d.com)
Start here - Rhino Developer / compute.rhino3d - McNeel Forum
Rhino Grasshopper Web Application Framework Presentation - Rhino Developer / compute.rhino3d - McNeel Forum
Calling Compute with Python with Python (rhino3d.com)
mcneel/compute.rhino3d: REST geometry server based on RhinoCommon and headless Rhino (github.com)
rhino-developer-samples/rhino3dm/py at 7 · mcneel/rhino-developer-samples (github.com)
How to create a virtual machine (VM) on Azurewww.rhino3d.com
Logo
Deployment to Production Serverswww.rhino3d.com
Logo
Grasshopper Programming Tutorial] - YouTube