Rebar Version: rebar3
- Custom behaviour gen_msg more faster than gen_server.
- Message transform form one client to other client cost less than 300 microsecond.
- I use toml as transmission protocol instead of xml or json. It is much faster than json or xml(I use my own toml helper for toml to erlang terms instead of kalta/etoml, because it do not support Array of Tables, like <<"[[products]] sku = 738594937">>, and faster than etoml), contain more meanings in smaller size of binary.
- Use dets to store session, it is much faster than redis or ssdb, much faster than mnesia when multiple nodes are connected.
- All slow request will handle by http service, IM service only do one thing: transmission message.
- Less processes to carry more user, because there is only be one process for one user's multiple devices.
- Use SSL/TLS for both HTTP and TCP connection by default.
- Multiple listener for one IM node, make it easy to accept more clients in less time.
- Reconnect will not create new process, but reuse the old one.