Open sourced web application done by Fiqus for educational and experimental purposes.
The idea was to research and practice about Phoenix LiveView implementation and to play around a little with Phoenix PubSub + Presence for sockets, using Memento as Elixir wrapper to Erlang Mnesia for data storage.
Added clustering support by using libcluster, allowing Phoenix and Mnesia to work as distributed servers.
Live Qchatex is a very simple and quick chat engine that allows you to create and join chat rooms on-the-fly.
Don't need to register, just enter a nickname and you are ready to go!
NOTE: All chats, messages and users are automatically deleted after a certain period of inactivity.
App overview PDF: lqchatex-overview.pdf
Live running demo at: https://lqchatex.fiqus.coop/
Hosted by gigalixir.
You will have to install:
Elixir
1.9 or laterErlang/OTP
22 or laterNode.js
12 or later
- Install dependencies with
mix deps.get
- Install Node.js dependencies with
cd assets && npm install
- Start Phoenix endpoint with
mix phx.server
You can now visit http://localhost:4000 from your browser!
mix mnesia.reset
- remove the mnesia storage directory from disk
make clean
- remove mnesia data, _build/, priv/static/ and clean+unlock depsmake test
- run testsmake server
- run default server instance at server@127.0.0.1 node accessible from http://localhost:4000make server1
- run additional server instance at s1@127.0.0.1 node accessible from http://localhost:4001make server2
- run additional server instance at s2@127.0.0.1 node accessible from http://localhost:4002make release
- build prod release and run it at lqchatex@127.0.0.1 node accessible from http://localhost:4004
Multiple server instances will connect to each other using libcluster with gossip topology!
You can try the cluster by running server
, server1
, server2
and release
at the same time.