Elixir如何读取远程节点Mnesia表 [英] How Elixir can read remote node mnesia table

查看:82
本文介绍了Elixir如何读取远程节点Mnesia表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Elixir编写程序来访问失忆症。我在Amazon Linux中运行Iex Shell。我尝试使用

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')

返回true,然后我要在此远程节点上运行mnesia命令,我发出

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

  :mneisa.info

但是,它只返回本地节点的记忆信息。如何访问连接的远程节点的mnesia数据库?

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

我尝试过rpc_call,它可以工作。但这是否有更直接的方法来从远程节点的失忆症中获取数据。

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

推荐答案

您尝试过吗:

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

这篇关于Elixir如何读取远程节点Mnesia表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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