3FanYu
Help Me Level Up My Elixir Project?
Hey everyone!
Greetings from Taiwan! I’m new around here and super excited to dive into this awesome community.
I’ve recently jumped into learning Elixir and am loving the journey so far. After getting my feet wet with the basics, I figured, why not build something cool? so I started to build a URL shortener using the Phoenix framework.
I’m all about learning by doing, but I know that going solo can sometimes lead me down the rabbit hole. So I’ve decided to open up a topic and invite everyone who happens to have spare time to review my code. I am open to any types of feedbacks. Whether it’s a high-five for what’s working or a heads-up on where I can improve, all your thoughts are welcome.
If you feel like dropping some wisdom or just want to chat about the project, you can hit me up here or swing by my GitHub. Every bit of feedback will be greatly appreciated.
Cheers,
project:
Trending in Discussions
Other Trending Topics
Latest Phoenix Threads
Chat & Discussions>Discussions
Latest on Elixir Forum
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
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










Most Liked
tj0
Ha, isn’t that the fun part though?
Regarding scaling, you may find this url shortener scaling example handy (still in draft from and completely unfinished from several years ago). It goes over 3 different possible designs. Anyway, I’m not much of a writer, so I never quite finished it. Nor how to build a CDN, a web server, a storage layer, etc.
I personally think the most interesting parts are:
First time sharing anywhere, so if it’s handy, let me know and maybe I’ll clean it up some.
derek-zhou
I read the readme but not the code yet. Since you use a database, why not just use the auto increment key as the key, ie: you could have shortened URL like
https://example.com/url/123Much of the complexity described in the readme would just disappear.tfwright
From your README:
You don’t mention them, so if you’re not aware, Elixir has many built in options to handle memory stores that can be used as a cache, ets, GenServer etc. If you are aware, curious why you thought Redis was a “no brainer”
Great document by the way. Gives nice insight into your thought process which seems very thorough!
EDIT: started looking at your code and looks like you’re using ets after all?
Last Post!
tfwright
Oh for sure, but in English the phrase means almost the opposite of what it sounds like you’re trying to say. Rather than changing your mind because you’re too excited by everything being “half-hearted”, and especially as a general characteristic (“half-hearted man”) implies a lack of enthusiasm in general. Think of an employee doing a task they really don’t want to do, or a person on a date with someone they don’t like that much. Curious if there’s a word you’re translating, because there’s not really a good single word or phrase in English for indecisiveness due to too much enthusiasm. Capricious? Fickle? Not quite… Language is amazing!