mssantosdev
Phoenix Blog Post: LiveMatch: Building a Real-Time App for Soccer with Phoenix LiveView
This post is a guide on how Norba and I are building LiveMatch, a real-time app for soccer to follow multiple games in one place.
https://readyforproduction.dev/livematch-building-real-time-app-soccer-with-phoenix-liveview
Most Liked
Morzaram
Wow, thank you for such an in-depth article. Love the usage of the videos, diagrams, and extensive code snippets of how you implemented this. Thank you!
What do you feel was the hardest part of this?
Do you feel that there could be any best practices taken from the project?
ndrean
mssantosdev
Thank you, @Morzaram!
What do you feel was the hardest part of this?
The most challenging part of the project so far was the Match Transmission Engine. Building it with to match all the requirements took us some time. It was rewarding because we did it entirely using the “Elixir way” - processes, supervisors etc. Also, we can easily port the engine to other sports.
We’re still working on the Distribution piece to have it working 100%, and it’s being a complex thing to do too.
Do you feel that there could be any best practices taken from the project?
I believe there are some things:
- Reusability in the frontend with
Phoenix.Components; - Organizing the code in
Contexts, and delegating the code to “sub-contexts” from the main module of the application; - Communication across processes with PubSub. This + LiveViews is basically where all the magic happens;
- An
Examplesmodule. We don’t talk about it in the post, but we have a module in the app calledLiveMatch.Examples, with the main responsibility of guiding the developers on how the app works. We have functions there that populate the database with teams and matches, start and stop matches etc. It teaches how the app works by using it, like a live documentation. We grabbed the idea from Designing Elixir Systems with OTP. The simulations happening at LiveMatch are built using the Examples module.
Maybe @norbajunior can help me with some other things regarding best-practices.
Sad you forecast a final Brasil Spain…
@ndrean, after Brazil x Cameroon, I’m not so sure about that final anymore. ![]()
Popular in Blog Posts
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex










