Current section

Files

Jump to
chat doc dist search_items-dbca3bbc68.js
Raw

doc/dist/search_items-dbca3bbc68.js

searchNodes=[{"ref":"CHAT.html","title":"CHAT","type":"module","doc":"CHAT is the front API module for application. It provides records defititions, KVS mentainformation and useful functions."},{"ref":"CHAT.html#Ack/1","title":"CHAT.Ack/1","type":"macro","doc":""},{"ref":"CHAT.html#Ack/2","title":"CHAT.Ack/2","type":"macro","doc":""},{"ref":"CHAT.html#Adr/1","title":"CHAT.Adr/1","type":"macro","doc":""},{"ref":"CHAT.html#Adr/2","title":"CHAT.Adr/2","type":"macro","doc":""},{"ref":"CHAT.html#Cut/1","title":"CHAT.Cut/1","type":"macro","doc":""},{"ref":"CHAT.html#Cut/2","title":"CHAT.Cut/2","type":"macro","doc":""},{"ref":"CHAT.html#FTP/1","title":"CHAT.FTP/1","type":"macro","doc":""},{"ref":"CHAT.html#FTP/2","title":"CHAT.FTP/2","type":"macro","doc":""},{"ref":"CHAT.html#MUC/1","title":"CHAT.MUC/1","type":"macro","doc":""},{"ref":"CHAT.html#MUC/2","title":"CHAT.MUC/2","type":"macro","doc":""},{"ref":"CHAT.html#N2O/1","title":"CHAT.N2O/1","type":"macro","doc":""},{"ref":"CHAT.html#N2O/2","title":"CHAT.N2O/2","type":"macro","doc":""},{"ref":"CHAT.html#Nak/1","title":"CHAT.Nak/1","type":"macro","doc":""},{"ref":"CHAT.html#Nak/2","title":"CHAT.Nak/2","type":"macro","doc":""},{"ref":"CHAT.html#P2P/1","title":"CHAT.P2P/1","type":"macro","doc":""},{"ref":"CHAT.html#P2P/2","title":"CHAT.P2P/2","type":"macro","doc":""},{"ref":"CHAT.html#Pub/1","title":"CHAT.Pub/1","type":"macro","doc":""},{"ref":"CHAT.html#Pub/2","title":"CHAT.Pub/2","type":"macro","doc":""},{"ref":"CHAT.html#Sub/1","title":"CHAT.Sub/1","type":"macro","doc":""},{"ref":"CHAT.html#Sub/2","title":"CHAT.Sub/2","type":"macro","doc":""},{"ref":"CHAT.html#bin/1","title":"CHAT.bin/1","type":"function","doc":""},{"ref":"CHAT.html#metainfo/0","title":"CHAT.metainfo/0","type":"function","doc":""},{"ref":"CHAT.html#user/1","title":"CHAT.user/1","type":"function","doc":""},{"ref":"CHAT.Application.html","title":"CHAT.Application","type":"module","doc":"CHAT.Application is an Erlang/OTP application powered by N2O messaging protocol. It is implemented as a ring of protocol nodes."},{"ref":"CHAT.Application.html#initialize/0","title":"CHAT.Application.initialize/0","type":"function","doc":"Manual startup and conifiguring during startup the following Erlang/OTP applications: :cowboy, :syn, :kvs and :n2o. Example: iex(1)> Supervisor.which_children(:n2o) [ {{:ws, 4}, #PID<0.258.0>, :worker, [:n2o_wsnode]}, {{:ws, 3}, #PID<0.257.0>, :worker, [:n2o_wsnode]}, {{:ws, 2}, #PID<0.256.0>, :worker, [:n2o_wsnode]}, {{:ws, 1}, #PID<0.255.0>, :worker, [:n2o_wsnode]}, {{:caching, 'timer'}, #PID<0.201.0>, :worker, [:n2o]} ] In example you see two rings: mqtt and ws for MQTT and WebSocket workers respectively. File config/config.exs should contain proto N2O parameter, the module which contains N2O protocol that will be runned inside ring worker: config :n2o, proto: CHAT.Server, ws_server: false In CHAT application this :n2o_wsnode worker is CHAT.Server module. Also we need to disable WebSocket ring creationg at N2O startup and create it manually during CHAT startup as PI protocol :init function contains SYN registration which is dependency only for CHAT, the higher level that N2O, which is zero-dependency library."},{"ref":"CHAT.Application.html#start/2","title":"CHAT.Application.start/2","type":"function","doc":"Called when an application is started. This function is called when an application is started using Application.start/2 (and functions on top of that, such as Application.ensure_started/2). This function should start the top-level process of the application (which should be the top supervisor of the application's supervision tree if the application follows the OTP design principles around supervision). start_type defines how the application is started: :normal - used if the startup is a normal startup or if the application is distributed and is started on the current node because of a failover from another node and the application specification key :start_phases is :undefined. {:takeover, node} - used if the application is distributed and is started on the current node because of a failover on the node node. {:failover, node} - used if the application is distributed and is started on the current node because of a failover on node node, and the application specification key :start_phases is not :undefined. start_args are the arguments passed to the application in the :mod specification key (e.g., mod: {MyApp, [:my_args]}). This function should either return {:ok, pid} or {:ok, pid, state} if startup is successful. pid should be the PID of the top supervisor. state can be an arbitrary term, and if omitted will default to []; if the application is later stopped, state is passed to the stop/1 callback (see the documentation for the c:stop/1 callback for more information). use Application provides no default implementation for the start/2 callback. Callback implementation for Application.start/2."},{"ref":"CHAT.Server.html","title":"CHAT.Server","type":"module","doc":"The CHAT.Server is a ring node implemented as :n2o_pi worker that handle all the incoming requests though hash function and implements RPC over MQ pattern. It suports both SYN and GPROC message buses (QoS=0)."},{"ref":"CHAT.Server.html#info/3","title":"CHAT.Server.info/3","type":"function","doc":"N2O protocol implementation (server part)."},{"ref":"CHAT.TXT.html","title":"CHAT.TXT","type":"module","doc":"CHAT.TXT is a WebSocket client interface and client socket protocol (session level) representation and textual protocol termination."},{"ref":"CHAT.TXT.html#info/3","title":"CHAT.TXT.info/3","type":"function","doc":"N2O protocol implementation (client, session part)."}]