gen_server:call vs rpc:call from erlang to ergo #146
-
I simulate a function need one second in ergo.
the escript will be a client gen_server:call from erlang to ergo.
Because gen_server process command by sequence,the gen_call from client will run one by one, so the QPS is very low. if i change gen_server:call to rpc:call
in this way rpc:call from erlang to elang. https://www.erlang.org/blog/otp-23-highlights/#distributed-spawn-and-the-new-erpc-module |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
this output...
says you handle your requests using the same processes, which is sleeping for a second handling every message. Erlang' ERPC handles requests spawning a new process for every request. |
Beta Was this translation helpful? Give feedback.
-
Basically, ERPC is an abstraction on top of the RemoteSpawn. Ergo supports this kind of request, so you may want to try it. See TestNodeRemoteSpawn(..) in tests/node_test.go as an example. |
Beta Was this translation helpful? Give feedback.
this output...
says you handle your requests using the same processes, which is sleeping for a second handling every message.
Erlang' ERPC handles requests spawning a new process for every request.