Corda: Can we develop Dapps that will be run by IIS webserver to talk to Corda platform?

喜你入骨 提交于 2021-01-29 02:30:26

问题


We have used "Yo!CorDapp" example (https://github.com/corda/spring-observable-stream) to build a POC.

In this POC, can we replace angular by .NET for frontend and use IIS webserver in place of springboot webserver to talk to Corda platform?

Thanks


回答1:


You can use any front-end technology you want.

As of Corda 3, your backend must be JVM-based, for two reasons:

  • You need to load various flow, state and other class definitions onto the classpath to pass as arguments to flows, retrieve objects from the vault, etc.
  • You need to use the CordaRPCClient library to create an RPC connection to the node

If you really need to write your back-end in another language, there are a few workarounds:

  • Create a thin Java webserver that sits between your main webserver and the node. The Java webserver translates HTTP requests from the main webserver into RPC calls to the node, and RPC responses from the node into HTTP responses to the main webserver
    • This is the approach taken by libraries such as Braid
  • Use a library such as GraalVM to compile non-JVM languages to JVM bytecode
    • An example of writing a JVM webserver in Javascript using GraalVM is available here: https://github.com/nitesh7sid/cordapp-example-nodejs-server-graalvm


来源:https://stackoverflow.com/questions/53303627/corda-can-we-develop-dapps-that-will-be-run-by-iis-webserver-to-talk-to-corda-p

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!