1.application definition . Illustration: Mnesia, cowboy, Mochiweb ... is a application. does not affect each other in Erlang, which causes a process to crash and B processes that do not rely on the a process to function properly. And since Erlang's mechanism causes it to know the a process crashes, then if you can restart the A-process, then this system: I tell you, it's a perpetual system, "Who's so wasted that they don't have electricity at night"-by a machine darkroom. Application, is used to do the work of this restart process. application can be seen as an official feature that can be used to ensure that the code you write is able to revert to its original state when a problem occurs, and that the behavior is self-defined. For example, the application can restart the process immediately (the data stored in the process disappears) because the bug causes the program to crash 2.application the directory structure. The following is an example of creating a "server-side Listener port" application. The root directory of the "server-side listener port" app is defined as server/ server/src server ebin server/include server/doc server/priv/docroot 3. In this "server-side Listening port" application, As with the application name, the features we implement include: a. Start a listening port B. The client can send data to this interface on the server C. The server receives the data, performs the corresponding operation, sends the result back to the client after the operation is completed D. Customer-close connection, service-side cleanup the content that the 4.application template must contain. Server_app.erl% Standard Template server_sup.erl % Standard template server.app % Standard template Server_manager.erl% actually we function modules, module names can be arbitrary, To maintain consistency, use the name 5. The main purpose of this sectionIs that a game suit is composed of multiple applicatin to ensure its stability 6. All code files, put on the website: GitHub
3. Basic knowledge, Erlang application-erlang/opt standard behavior simple case