Guest User

rvi_core release-0.4.0 ==> backend.conf removed bt

a guest
Jul 22nd, 2015
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.56 KB | None | 0 0
  1. %% -*- erlang -*-
  2.  
  3. %% Copyright (C) 2014, Jaguar Land Rover
  4. %%
  5. %% This program is licensed under the terms and conditions of the
  6. %% Mozilla Public License, version 2.0.  The full text of the
  7. %% Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
  8. %%
  9. %% Configuration file for the (in-vehicle) IVI used by the hvac_demo
  10. %%
  11. %% See ../hvac_demo/README.md for details on the demo.
  12. %%
  13. %% See ../CONFIGURE.md for a details on the configuration process
  14. %% itself.
  15. %%
  16. [
  17.  %% All erlang apps needed to fire up a node. Do not touch.
  18.  {apps,
  19.   [kernel,
  20.    stdlib,
  21.    sasl,
  22.    {setup, load},
  23.    syntax_tools,
  24.    lager,
  25.    crypto,
  26.    public_key,
  27.    exo,
  28.    compiler,
  29.    ssl,
  30.    asn1,
  31.    %% RVI-specific apps.
  32.  
  33.    %% Do not touch unless you are replacing apps with your own
  34.    %% version.  If you are replacing an app with a non-Erlang version,
  35.    %% it still has to be loaded in order to resolve.
  36.    %% If, for example, you want to deploy your own scheduler
  37.    %% outside Erlang, replace
  38.    %%
  39.    %%     schedule,
  40.    %% with
  41.    %%     { schedule, load },
  42.    %%
  43.    rvi,
  44.    rvi_common,
  45.    service_discovery,
  46.    service_edge,
  47.    authorize,
  48.    schedule,
  49.    dlink_tcp,
  50. %%   { bt, load},         %% Not needed in a server
  51. %%   { dlink_bt, load },  %% Not needed in a server
  52.    { proto_bert, load}, %% Superseded by proto_json
  53.    proto_json
  54.   ]},
  55.  
  56.  %%
  57.  %% Custom environment settings
  58.  %% for all apps running on the node.
  59.  %%
  60.  {env,
  61.   [
  62.    %% Lager is the main logging mechanism.
  63.    %% See https://github.com/basho/lager for details.
  64.    %%
  65.    {lager,
  66.     [ { handlers,
  67.     %% Change this to debug, info, notice, warning, or error in
  68.     %% order to lower the console chatter.
  69.     [ {lager_console_backend, info} ]
  70.       }
  71.     ]
  72.    },
  73.      
  74.    %% All RVI configuration is done here.
  75.    %% Please note that the rvi_node.sh launch script
  76.    %% can still override the port range and static nodes
  77.    %% through its command line parameters.
  78.    %%
  79.    {rvi,
  80.     [
  81.  
  82.      %% Specify the node address that data_link uses to listen to
  83.      %% incoming traffic from other rvi nodes.
  84.      %%
  85.      %% This is the address that is announced to
  86.      %% other rvi nodes during service discovery and should be
  87.      %% forwarded through firewalls and port forwarding to to the port
  88.      %% specified by the configuration entry rvi -> components ->
  89.      %% data_link -> bert_rpc_server (see below).
  90.      %%
  91.      %% If this node is sitting behind a firewall and cannot
  92.      %% receive incomign connections on any address, its
  93.      %% node_address should be set to "0.0.0.0:0" to inform
  94.      %% the remote node that it should not attempt to
  95.      %% connect back to self.
  96.  
  97.      { node_address, "38.129.64.31:8807" }, %% rvi-test1.nginfotpdx.net
  98.  
  99.      %% Specify the prefix of all services that this rvi node is hosting.
  100.      %%
  101.      %% All local services regsitering with service edge will be prefixed with
  102.      %% the string below when they are announced to remote rvi nodes
  103.      %% that connect to this node (using the address specified
  104.      %% by node_address above).
  105.      %%
  106.      %% If a locally connected service registers itself as
  107.      %% "hvac/fan_speed", and the node_service_prefix is
  108.      %% "jlr.com/vin/1234/", this node will announce the service
  109.      %% "jlr.com/vin/1234/hvac/fan_speed" as being available
  110.      %% to remotely connected rvi nodes.
  111.      %%
  112.      %% Two rvi nodes should never have the same node_service_prefix
  113.      %% value unless all services add a system-wide unique name
  114.      %% to it.
  115.      %%
  116.      { node_service_prefix, "jlr.com/backend"},
  117.      
  118.      %% Routing rules specifying how to reach services
  119.      %% starting with given prefixes.
  120.      { routing_rules,
  121.        [
  122.     %% Make sure to have a default if you don't want your message
  123.     %% to error out immediately. With a default the message will
  124.     %% be queued until it times out, waiting for a remote node
  125.     %% to connect and announce that it can handle the targeted service.
  126.     { "",
  127.       [
  128.        { proto_json_rpc, dlink_tcp_rpc}
  129.       ]
  130.     }
  131.       ]
  132.      },
  133.     { components,
  134.       [
  135.     %% A note about JSON-RPC calls vs gen_server calls:
  136.     %%
  137.     %% All locally connected services communicate with Service Edge
  138.     %% through JSON-RPC, as specified below.
  139.     %%
  140.     %% Communication between the RVi components, however, can be
  141.     %% either JSON-RPC or gen_server calls.
  142.     %%
  143.     %% JSON-RPC calls provide compatability with replacement components
  144.     %% written in languages other than Erlang.
  145.     %%
  146.     %% Gen_server calls provide native erlang inter-process calls that
  147.     %% are about 4x faster than JSON-RPC when transmitting large data volumes.
  148.     %%
  149.     %% If one or more of the components below are replaced with external
  150.     %% components, use JSON-RPC by specifying url and exo_http_opts
  151.     %% for all components.
  152.     %%
  153.     %% If you are running an all-native erlang system, use gen_server calls
  154.     %% by configuring gen_server.
  155.     %%
  156.     %% If you specify both gen_server and url/exo_http_opts, the gen_server
  157.     %% communicaiton path will be used for inter component communication.
  158.     %%
  159.     %% Please note that communication between two RVI nodes are
  160.     %% not affected by this since data_link_bert_rpc will use
  161.     %% BERT-RPC to communicate ( using the address/port specified
  162.     %% by bert_rpc_server).
  163.     %%
  164.  
  165.     {service_edge,
  166.       [
  167.         %% Service_edge_rpc component is used as a gen_server
  168.         { service_edge_rpc, gen_server,
  169.         [
  170.           %% JSON-RPC address will be translated to
  171.           %% an URL looking like this:
  172.           %% http://127.0.0.1:8801
  173.           %%
  174.           %% This URL is used both for communication with
  175.           %% locally connected services and for intra-component
  176.           %% communication in case the access method for
  177.           %% service_edge_rpc is specified as json_rpc.
  178.           { json_rpc_address, { "127.0.0.1", 8801 } },
  179.  
  180.           %% Websocket is used for websocket access, preferably
  181.           %% through the rvi.js package available for Javascript
  182.           %% apps in browsers and crosswalk who wants to interface
  183.           %% RVI.
  184.           { websocket, [ { port, 8808}]}
  185.         ]
  186.         }
  187.       ]
  188.     },
  189.     { service_discovery,
  190.       [
  191.         { service_discovery_rpc, gen_server, [] }
  192.       ]
  193.     },
  194.     { schedule,
  195.       [
  196.         { schedule_rpc, gen_server, [] }
  197.       ]
  198.     },
  199.     { authorize,
  200.       [
  201.         { authorize_rpc, gen_server, [] }
  202.       ]
  203.     },
  204.     { protocol,
  205.       [
  206.         { proto_json_rpc, gen_server, [] }
  207.       ]
  208.     },
  209.     { data_link,
  210.       [
  211.         { dlink_tcp_rpc, gen_server,
  212.           [
  213.         { server_opts, [ { port, 8807 }]}
  214.         %% { persistent_connections, [ "38.129.64.13:8807" ]}
  215.           ]
  216.         }
  217.       ]
  218.     }
  219.       ]
  220.     }
  221.    ]}
  222. ]}
  223. ].
Advertisement
Add Comment
Please, Sign In to add comment