How Elixir can read remote node mnesia table

断了今生、忘了曾经 提交于 2019-12-07 03:38:54

问题


I am trying use Elixir to write program to access mnesia. I run iex shell in amazon linux. I tried to connect another node using

Node.connect(:'hello@abc.com')

which return true, then I want to run mnesia command on this remote node, I issue

  :mneisa.info

However, it only returns local node mnesia info. How can I access the connected remote node's mnesia database?

I have tried rpc_call, it works. But is it having more direct method to get the data from remote node mnesia.


回答1:


Did you try:

Node.spawn :'hello@abc.com', fn -> :mneisa.info end 


来源:https://stackoverflow.com/questions/29642263/how-elixir-can-read-remote-node-mnesia-table

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