gmplugin_hello
This is a minimal Gajumaru plugin. This is meant to be a minimal working template on which development can occur immediately.
Quickstart
System Prereqs
After clone
make init
make build-gm-with-my-plugin
Running
make fresh-console
(gajumaru@localhost)1> gmplugin_hello_app:hello().
"hello, world"
(gajumaru@localhost)2> gmplugin_hello_app:network_id().
<<"localnet">>
(gajumaru@localhost)3> gmplugin_hello_app:height().
{ok,1}
Questions
What is a Gajumaru?
In the context of this document, "Gajumaru" with no qualification means the Erlang software that runs a gajumaru node.
What is a Gajumaru plugin?
A Gajumaru plugin is an Erlang application that runs in the same Erlang process
context as gajumaru, meaning it can natively call aeu_db:whatever.
What is the point of a Gajumaru plugin?
Let's say you're developing a point-of-sale app for your daughter's lemonade
stand. Your application needs to interact with Gajumaru in some way. You're
going to have your LemonPay app talk to your own local gajumaru node that
you're running on your old laptop on 192.168.2.1.
The idea here is that the portion of your LemonPay business logic that needs to
interact intimately with data on the chain should run in the relatively
frictionless Erlang-to-Erlang context of the gajumaru application. Then you
expose a service interface on port 9876 that is tailored specifically for
LemonPay. LemonPay talks to 192.168.2.1:9876.
How does anything do anything?
The important thing to understand is that gajumaru starts your plugin.
Therefore, when you're developing and iterating on your plugin, you need to have a way to start gajumaru, start your plugin, mess around with it.