summaryrefslogtreecommitdiff
path: root/rvi_backend.config
blob: 1bbf72f8f1358028b02ffa280567b23bd0912822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
%% -*- erlang -*-

%% Copyright (C) 2014, Jaguar Land Rover
%%
%% This program is licensed under the terms and conditions of the
%% Mozilla Public License, version 2.0.  The full text of the 
%% Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
%%
%% Configuration file for the (in-vehicle) IVI used by the hvac_demo
%% See ../hvac_demo/README.md for detai;s
%% 

%% -----------------------------------------------
%% See vehicle.config file for documentation and hints
%% -----------------------------------------------

[
 {apps,
  [kernel,
   stdlib,
   sasl,
   {setup, load},
   syntax_tools,
   lager,
   crypto,
   public_key,
   exo,
   compiler,
   ssl,
   asn1,
   
   rvi, 
   rvi_common,
   service_discovery,
   service_edge,
   authorize,
   schedule,
   dlink_tcp,
   proto_bert,
   proto_json
   ]},

 {env,
  [
   {lager, 
    [ { handlers, 
	[{lager_console_backend, debug}]
	}
    ]
   },
      
   {rvi, 
    [
     { node_address, "38.129.64.31:8807" }, 
     { node_service_prefix, "jlr.com/backend/"},


     { routing_rules,
       [
	%% Make sure to have a default if you don't want your message
	%% to error out immediately. With a default the message will 
	%% be queued until it times out, waiting for a remote node
	%% to connect and announce that it can handle the targeted service.
	{ "", 
	  [
	   { proto_bert_rpc, dlink_tcp_rpc}
	  ]
	}
       ]
     },	

     { components, 
       [
	{ 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.
	  [ { service_edge_rpc, gen_server,
	    [ 
	      { json_rpc_address, { "127.0.0.1", 8801 } },
	      { websocket, [ { port, 8808}]}
	    ]
	    }
	  ]
	},
	{ service_discovery, 
	  [ { service_discovery_rpc, gen_server, 
	      [
	       { json_rpc_address, { "127.0.0.1", 8802 }}
	      ]
	    }
	  ]
	},
	{ schedule, 
	  [ { schedule_rpc, json_rpc, 
	      [
	       { json_rpc_address, { "127.0.0.1", 8803 }}
	      ]
	    }
	  ]
	},
	{ authorize, 
	  [ { authorize_rpc, gen_server,
	      [ 
		{ json_rpc_address, { "127.0.0.1", 8804 } }
	      ]
	    }
	  ]
	},
	{ protocol, 
	  [ { proto_bert_rpc, gen_server,
	      [ 
		{ json_rpc_address, { "127.0.0.1", 8805 } }
	      ]
	    }
	  ]
	},
	{ data_link, 
	  [ { dlink_tcp_rpc, gen_server,
	      [ 
		{ json_rpc_address, { "127.0.0.1", 8806 } },
		%% Bert_rpc server specifies the port we should
		%% listen to for incoming connections
		%% from other rvi nodes.
		%% A specific NIC address can also be specified
		%% through the {ip, "192.168.0.1" } tuple.
		{ server_opts, [ { port, 8807 }]}
	      ]
	    }
	  ]
	}
       ]
     }
    ]}
]}

].