在CORDA中动态部署和运行节点 [英] Deploy and run nodes dynamically in CORDA

查看:33
本文介绍了在CORDA中动态部署和运行节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个用例,其中我们必须在运行时通过从网页上单击按钮来部署并启动节点.与在CORDA演示台中工作的方式相同.有人可以指出实现此目的的示例或解释吗?

We have a use case in which we have to deploy and start a node at runtime on button click from a web page. The same way as it working in CORDA's demo bench. Can someone please point out to an example or an explanation for achieving this?

推荐答案

节点本质上是一个包含两个内容的文件夹:

A node is essentially a folder containing two things:

  • 一个 node.conf 文件
  • 一个 corda.jar 文件

它可能还需要其他东西(如果不在开发人员模式下,则需要证书)或想要的其他东西(如果要提供API,则为 corda-webserver ),这是需要CorDapps的plugins文件夹负载),但上面的两个条件就足够了.

There are other things it may need (certificates if not in dev mode) or want (corda-webserver if you want it to offer an API, a plugins folder with CorDapps that you want it to load), but the two items above are sufficient.

在本地运行 deployNodes 时,它将创建一组包含这些内容的节点文件夹.运行节点"等同于在有效 node.conf corda.jar 文件上运行 java -jar corda.jar >文件也存在.

When you run deployNodes locally, it creates a set of node folders containing these things. "Running a node" is equivalent to running java -jar corda.jar on a corda.jar file in a folder where a valid node.conf file is also present.

如果您可以通过前端收集有效的 node.conf 文件的参数或自动生成它们,那么您在服务器上所需要做的就是:

If you can collect the parameters for a valid node.conf file via a front-end or auto-generate them, then all you need to do on the server is:

  • 创建一个新文件夹
  • 生成一个 node.conf 文件并将其保存到文件夹中
  • corda.jar 文件复制到该文件夹​​
  • 在该文件夹中启动 corda.jar 进程
  • Create a new folder
  • Generate a node.conf file and save it to the folder
  • Copy a corda.jar file to that folder
  • Start a corda.jar process in that folder

这篇关于在CORDA中动态部署和运行节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆