summaryrefslogtreecommitdiff
path: root/rvi_sample.config
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarlandrover.com>2014-11-11 20:36:33 -0800
committerMagnus Feuer <mfeuer@jaguarlandrover.com>2014-11-11 20:36:33 -0800
commit78f55842d27c3056d9239833bcd5abe1ca098365 (patch)
tree3475e94f9397b68c0e175bfe0e392611bb2d1909 /rvi_sample.config
parent245151aa91bee4c4413e574cef0a51e7a481c3c7 (diff)
downloadrvi_core-78f55842d27c3056d9239833bcd5abe1ca098365.tar.gz
Updatedto use gen_server RVI component communication
Diffstat (limited to 'rvi_sample.config')
-rw-r--r--rvi_sample.config68
1 files changed, 61 insertions, 7 deletions
diff --git a/rvi_sample.config b/rvi_sample.config
index 750f913..7c31cdf 100644
--- a/rvi_sample.config
+++ b/rvi_sample.config
@@ -106,7 +106,8 @@
%% to remotely connected rvi nodes.
%%
%% Two rvi nodes should never have the same node_service_prefix
- %% value.
+ %% value unless all services add a system-wide unique name
+ %% to it.
%%
{ node_service_prefix, "jlr.com/vin/1234/"},
@@ -135,44 +136,97 @@
{ components,
[
+ %% A note about JSON-RPC calls vs gen_server calls:
+ %%
+ %% All locally connected services communicate with Service Edge
+ %% through JSON-RPC, as specified below.
+ %%
+ %% Communication between the RVi components, however, can be
+ %% either JSON-RPC or gen_server calls.
+ %%n
+ %% JSON-RPC calls provide compatability with replacement components
+ %% written in languages other than Erlang.
+ %%
+ %% Gen_server calls provide native erlang inter-process calls that
+ %% are about 4x faster than JSON-RPC when transmitting large data volumes.
+ %%
+ %% If one or more of the components below are replaced with external
+ %% components, use JSON-RPC by specifying url and exo_http_opts
+ %% for all components.
+ %%
+ %% If you are running an all-native erlang system, use gen_server calls
+ %% by configuring gen_server.
+ %%
+ %% If you specify both gen_server and url/exo_http_opts, the gen_server
+ %% communicaiton path will be used for inter component communication.
+ %%
+ %% Please note that communication between two RVI nodes are
+ %% not affected by this since data_link_bert_rpc will use
+ %% BERT-RPC to communicate ( using the address/port specified
+ %% by bert_rpc_server).
+ %%
+
{ service_edge,
%% This is the URL that local services use to connect to
%% the RVI system. It is also used by
%% the other components below to send inter-compoonent
%% JSON-RPC calls to the service edge.
%%
+ %% For this component url and exo_http_opts should always be specified
+ %% so that local services have a HTTP port to connect to.
+ %%
+ %% gen_server can also be specified to enable faster, native erlang
+ %% inter compojnent communication.
+ %%
%% The host and address given in URL should route to the port given
%% in exo_http_opts below.
%%
%% The web socket integrates with the rvi.js javascript code
%% that connects Tizen IVI to the RVI system.
- [ { url, "http://127.0.0.1:8811" },
+ [
+ { gen_server, service_edge_rpc },
+ { url, "http://127.0.0.1:8811" },
{ exo_http_opts, [ { port, 8811 } ] },
{ websocket, [ { port, 8818}]}
]
},
{ service_discovery,
- [ { url, "http://127.0.0.1:8812" },
+ [
+ %% In this sample file, we turn on both JSON-RPC and
+ %% gen_server calls. Normally, one of the two are
+ %% commented out.
+ { gen_server, service_discovery_rpc },
+ { url, "http://127.0.0.1:8812" },
{ exo_http_opts, [ { port, 8812 } ] }
]
},
{ schedule,
- [ { url, "http://127.0.0.1:8813" },
+ [
+ %% For obscure reasons, the gen_server component
+ %% here is just called schedule, not schedule_rpc
+ { gen_server, schedule },
+ { url, "http://127.0.0.1:8813" },
{ exo_http_opts, [ { port, 8813 } ] }
]
},
{ authorize,
- [ { url, "http://127.0.0.1:8814" },
+ [
+ { gen_server, authorize_rpc },
+ { url, "http://127.0.0.1:8814" },
{ exo_http_opts, [ { port, 8814 } ] }
]
},
{ protocol,
- [ { url, "http://127.0.0.1:8815" },
+ [
+ { gen_server, protocol_rpc },
+ { url, "http://127.0.0.1:8815" },
{ exo_http_opts, [ { port, 8815 } ] }
]
},
{ data_link,
- [ { url, "http://127.0.0.1:8816" },
+ [
+ { gen_server, data_link_bert_rpc_rpc },
+ { url, "http://127.0.0.1:8816" },
{ exo_http_opts, [ { port, 8816 } ] },
%% The bert_rpc_server port will be used to listen to incoming