问题
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