简体   繁体   English

DNODE作为使Java调用NodeJS函数的一种方式?

[英]DNODE as a way to make Java call NodeJS functions?

On the dnode github page ( https://github.com/substack/dnode ) there is a subsection that says: 在dnode github页面( https://github.com/substack/dnode )上有一个小节,内容为:

dnode in other languages
These libraries implement the dnode protocol too so you can make RPC calls between scripts written in different languages.

And one of the libraies is dnode-java. 其中一种库是dnode-java。 Has anyone ever used this library? 有没有人使用过这个库? Is it possible to call code/functions in NodeJS from Java using Dnode? 是否可以使用Dnode从Java调用NodeJS中的代码/函数? It seems I cannot find enough documentation, examples or tutorials on this, so any help is very much appreciated. 似乎我找不到足够的文档,示例或教程,因此,非常感谢您的帮助。

RPC means Remote procedure call,it is a protocol that allow a program to make a subroutine call on a remote machine. RPC表示远程过程调用,它是允许程序在远程计算机上进行子例程调用的协议。

Dnode is an RPC implementation, you can create a server in nodejs and a client in java and call the functions in your nodejs server. Dnode是RPC的实现,您可以在nodejs中创建一个服务器,并在java中创建一个客户端,然后在nodejs服务器中调用函数。

I never tryed dnode, can't give you my option about it, but if you just want to "integrate" java and nodejs in the same machine there another options that may be more interesting, like nodyn 我从未尝试过dnode,无法为您提供我的选择,但是,如果您只想将Java和nodejs“集成”到同一台机器上,那么还有另一个可能更有趣的选择,例如nodyn

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM