Earlier quoted context omitted.
Wait, how does that answer prevent only one instance of the job across the whole system? That's what I'd use Redis or something for - for locking.
You can use tricks like the global spawn option to make processes globally unique. Doesn't scale infinitely, but for a 2->low double digits HA/load balanced system it should be fine.
Lovely Week with Elixir
91–100 of 139 posts
Re: Lovely Week with Elixir
#92Earlier quoted context omitted.
Check out the Elixir "protocol" feature, it's similar to interfaces: https://elixir-lang.org/getting-started/protocols.html
Protocols + the Typeclass library [0] makes for some of the most extensible Elixir code I've worked with. [0] https://github.com/witchcrafters/type_class
Re: Lovely Week with Elixir
#93The first piece is longer, on my journey learning Elixir and building machine learning libraries.
https://fredwu.me/blog/2016-07-24-i-accidentally-some-machin...
The second piece is shorter, on Elixir’s functional aspect and how doctest changes the way I code.
https://fredwu.me/blog/2017-08-07-elixir-and-doctest-help-wr...
Re: Lovely Week with Elixir
#94Re: Lovely Week with Elixir
#95Earlier quoted context omitted.
Protocols + the Typeclass library [0] makes for some of the most extensible Elixir code I've worked with. [0] https://github.com/witchcrafters/type_class
Hi Elixir friend! Have you done a blog post on this by chance? I'd be really interested in reading one.
Re: Lovely Week with Elixir
#96I love Elixir. Phoenix makes web development a pleasure and LiveView is even more exciting. I would love to find a job doing it.
The job posting is a little bit generic, but it's specifically for my team: https://sjobs.brassring.com/TGnewUI/Search/Home/Home?partner...
Feel free to reach out to me (my website is in my profile) if you want more info!
Re: Lovely Week with Elixir
#97If you're interested in using Elixir, jump right into Phoenix with LiveView. It is fantastic for prototyping new tools. Once you learn the basics of LiveView, it's ridiculously easy to create the web UI that interacts with your Elixir back-end. For a while I was using Phoenix Elm as my stack and I enjoy programming in Elm. But there's a lot of boilerplate you have to tediously connect for every input and output on bo…
I really hope there's a book covering more in depth on how to use LiveView. Im a little bit of a noob in programming and mostly learn using book for the first few steps. A lot of my coworker asking me to learn through docs as it seems to be more "full" but I found it's a bit steep learning with it compared to book that usually hold your hand through each concept. This is how I learnt Go web programming about 8 months…
Re: Lovely Week with Elixir
#98On the other hand, it also reflects functional programming is also more straightforward than Object-oriented programming because it's more objective to just model the data, than modeling the data and procedures at the same time. If you have two people writing the same thing, there's a much larger chance they'll yield similar or identical results.
Re: Lovely Week with Elixir
#99Earlier quoted context omitted.
You can use tricks like the global spawn option to make processes globally unique. Doesn't scale infinitely, but for a 2->low double digits HA/load balanced system it should be fine.
Oh wow, so this will work across multiple instances of the BEAM?
Note that this works by taking a transaction lock on the entire cluster, so it's not recommended if you're making requests frequently. It also doesn't respect netsplits, unless you instruct in code to fail with a deficient cluster membership.
Re: Lovely Week with Elixir
#100MIT Licensed. Source: