We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
ElixirConf 2023 - Michael St Clair - Building a database GUI and proxy with Elixir
Building a Database GUI and Proxy with Elixir: Explore the latest ElixirConf 2023 talk by Michael St Clair on building a scalable GUI app and database proxy using Elixir, Phoenix, and Live View.
- Binaries in Elixir are sequences of bytes, which can be encoded using UTF-8.
- The ElixirLang website has a guide on using task supervisors with gen_tcp.
- Live View is used for building a GUI app, which is also very easy to scale with.
- SSL is used for encryption, and SSL.handshake is used to establish a handshake.
- The Postgres protocol uses binaries to communicate.
- The startup message is sent from the client to the proxy, containing details such as the user to connect as.
- SSL.request message is used to request authentication, and SSLsupports is checked.
- The proxy is built using Elixir, with Phoenix and Live View used for the GUI.
- The query desk app uses CodeMir and a custom element to handle queries.
- Code points are used to represent characters in binaries.
- The GUI app uses a custom serializer with protobuf messages.
- Filtering and editing are planned for the GUI app.
- Elixir’s ease of scaling and its use of supervisors make it a good choice for building a GUI app.
- The proxy sends a request to the database, and then handles the response.
- The auth request message is sent from the client to the proxy, and then verified by the proxy.
- Review is required for certain queries.
- In Elixir, Ecto is used for building a GUI that connects to a database, and allows for sorting and filtering.
- Ecto has adapters for Postgres, MySQL, and SQL server.
- The query desk app is built on top of Ecto, but uses custom serializer and protobuf messages.
- The GUI app uses web components, as does the query desk app, but the query desk app also uses CodeMir.
- The proxy uses SSL to encrypt the connection.
- On behave of the client, the GUI app sends a query message to the proxy, and then receives the response.
- The GUI app uses SSL.connect to send a request for authentication.
- SSLsupports is checked, and the client receives the response.
- The client connects to the proxy, which then connects to the database.