Building Aggregates in Elixir and PostgreSQL
In this article, we will describe the roles and implementation of aggregates in Elixir and PostgreSQL.
ThinkingElixir 056: Fly-ing Elixir Close to Users with Kurt Mackey
In episode 56 of Thinking Elixir, Kurt Mackey, founder at Fly.io talks about what makes the Fly platform unique and why hosting Elixir applications there makes a lot of sense. They started out looking to make a better CDN for developers and this pushed them to try deploying Full Stack applications closer to users, not just the static assets! We learn about the tech behind the networking, how databases can be moved closer to users, and how LiveView is even more awesome when it is close to users. Kurt also shares what he sees as the future for databases as the industry continues to move into globally distributed applications.
https://thinkingelixir.com/podcast-episodes/056-fly-ing-elixir-close-to-users-with-kurt-mackey/
Objext: An alternative to Struct and Protocol
I’ve always wanted Structs to be opaque by default.
So I built Objext which allows user to define opaque data structures.
For an “objext”, only the module that defines it can access its internal state, the other modules can only access these states via public functions.
Objext also provides macros to:
- define Protocol-like interfaces for “Objexts”.
- create mocks for testing purpose
Check it out and give it a try: https://github.com/dsdshcym/objext
Senior Elixir Engineer at MEDWING
Dear Elixir community,
Founded in August 2017, MEDWING is a fast-growing healthcare start-up. Our mission is to serve as the most trusted and convenient platform for finding opportunities and working in healthcare.
Currently, we are looking for a Senior Engineer specialized in Elixir to join our team. Remote work is possible. If you’re looking for an onsite role, we will also support you with the relocation and visa process. https://apply.workable.com/medwing/j/AAA50BC5F2/
Please feel free to reach out to me at ipek.tosun@medwing.com or directly apply from the link above - if this new challenge sounds interesting to you :)
Best regards, İpek Tosun
ThinkingElixir 055: Learning from Failure with Philipp Schmieder
In episode 55 of Thinking Elixir, Philipp Schmieder shares his experience of creating a LiveView application for a political party’s convention and then watching the app blow up! We learn how he recovered, why it failed, and how he fixed it going forward. We also discuss some other application architecture ideas and how they might work. It’s a great post-mortem discussion where Philipp shares his wisdom so others learn from the mistakes. After experiencing all this, find out why he’s still bullish on LiveView and Elixir!
https://thinkingelixir.com/podcast-episodes/055-learning-from-failure-with-philipp-schmieder/
Elixir: Practical Concurrency Cookbook
While the Erlang runtime is known for being a highly concurrent platform to which Elixir compiles, most of us end up solving the same problems in our daily jobs. We use Phoenix to bootstrap our web applications, write JSON APIs and sprinkle our pages with some javascript. And although it is true that simply by using Phoenix we’re already getting for free the whole concurrency model, the majority of the features we develop for our products don’t leverage all that often distributed Erlang, complex supervision trees or fleets of GenServers.
In this post, my intention is to highlight some common scenarios where we can leverage Erlang’s concurrency model as well as Elixir’s abstractions to build better, faster and more secure software. Think of it like… A cookbook.
https://functional.works-hub.com/learn/elixir-practical-concurrency-3794f
IntelliJ Elixir v11.12.0
Bug Fixes
-
Only descend into modular children of modular for Module scope. Prevents recursion loops on
usecalls. -
Don’t search for unquoted variable value if variable is value for
do:. -
Protect from
IndexNotReadyinresolver.Module.multiResolveProject. - Stop walking unquoted variable that resolves to a parameter.
-
Walk case in
__using__to find quote in any clause. Fixes resolving test macro fromuse PowerAssert -
Resolve functions declared in
quote‘s scope whenblockinjected withunquote(block). Fixes resolvingfield,timestamps, andindexinschemaforuse Yacto.Schemaas it makes theblocksee theimport Yacto.Schemaaboveunquote(block)in thequoteinschema(…, do: block). - Convert MissingSDK errors for Dialyzer into Notifications.
-
Log element in psi.scope.Type instead of using
TODO() - Add missing mix deps options to non-path influencing list.
-
Fix incorrect
OuterElementTypeineex.lexer.TemplateData. -
Run
QualifiedAlias#textinrunReadActionforQualifiedAlias#name -
Return
nullChunkinstead of throwingIOExceptionwhen read incomplete due to partially written file. -
Use
TabbedPaneWrapper.AsJBTabsinstead ofJBTabbedPanefor “BEAM Chunks” tabs to fix labels not showing up. -
Don’t require Alias qualifier to be a
PsiNamedElementto supportElixirAtomqualifiers. -
Any.isDecompiledforCallDefinitionHead.
Enhancements
-
Find
Deps in function calls in thedeps()list. -
Dep.putPathfrom a variable. -
Treat
Memoizedefmemoasdefanddefmemopasdefp. -
Resolve
exception/1andmessage/1todefexception. - Resolve to callbacks when searching in any module.
-
Support arity intervals for
unquote_splicingin parameters.
LiveView course: Bindings, Click and Form events, Debounce, Live Flash messages
A new lesson of the free LiveView course in which we see how to start coding user interactions with bindings, debounce, live flash messages, click and form events etc.
Bindings, Click and Form events, Debounce, Live Flash messages
Monitoring Elixir Apps on Fly.io With Prometheus and PromEx
Monitoring application performance in production is important for staying ahead of customer reported issues. The prom_ex library helps expose key metrics (and custom ones too). But you need a Prometheus compatible system to gather and aggregate those metrics. Then Grafana can make it pretty to look at and see trends. Alex Koutmos, author of prom_ex, shows how to do that on the Fly.io platform using Fly’s built-in Prometheus metrics gathering and goes further showing how to get that data into Grafana.
I’ve set this up myself before in a Kubernetes cluster… but I’ve got to say, this is waaaaay easier!
https://fly.io/blog/monitoring-your-fly-io-apps-with-prometheus/
ThinkingElixir 054: AST Parsing using Sourceror with Lucas San Román
In episode 54 of Thinking Elixir, Lucas San Román explains his library Sourceror and how it was created to solve some AST parsing limitations. The Elixir parser discards code comments, so it can’t be used for re-writing Elixir code when refactoring. IDE’s often include more advanced refactoring tools and the ability to provide that requires a smarter parser. Sourceror keeps the comments while also providing advanced features like a Zipper API to more easily navigate around the source tree while inserting and removing nodes. Learn what Sourceror can do and what it can enable for future Elixir tools!
https://thinkingelixir.com/podcast-episodes/054-ast-parsing-using-sourceror-with-lucas-san-roman/
Three real-world examples of distributed Elixir (pt. 4)
👋 Hi there!
Here’s the fourth and last part of the Three real-world examples of distributed Elixir series. We will implement a distributed application version observer that broadcasts messages to the front-end recommending refreshing the browser when new versions containing potential breaking changes get deployed.
https://bigardone.dev/blog/2021/06/27/three-real-world-examples-of-distributed-elixir-pt-4
Happy coding!
What I learned from implementing Combinators in 3 Elixir patterns
In a recent project, I implemented combinator pattern with anonymous functions, behaviour modules, and protocols.
This process completely changed my understanding of functions and data.
Read the blog post for more details! https://yiming.dev/blog/2021/06/13/what-i-learned-from-implementing-combinators-in-3-elixir-patterns/
Rube - A multi-chain DeFi development toolkit for Elixir
Build upon the configuration DSL provided by slurp then control your on-chain event & transaction subscriptions via the slurpee and rube GUI’s.
Ships with support for the following DeFi protocols, with more on the way:
- ERC20 Tokens
- Chainlink
- AMM’s (Uniswap/Sushiswap/Pancakeswap etc…)
- Money Markets (Aave, Compound, C.R.E.A.M etc…)
An Elixir Adoption Success Story
How one small team that was new to Elixir managed to over-deliver on a complex project in just three months. https://www.thegreatcodeadventure.com/an-elixir-adoption-success-story/
IntelliJ Elixir v11.11.0
- Fix Go To Declaration broken by JetBrains API change
-
Reference Resolution Round-Up
- All parts of Alias chains
- Functions, Assigns, and Aliases in LiveComponent/View LEEx templates.
- Ecto Query and API
- Types
How to Test WebSocket Clients in Elixir with a Mock Server
In this post, you’ll get a high-level overview of how to implement a long-running connection between two services with WebSocket, and then you’ll write unit tests for functionality.
ThinkingElixir 053: SOLID Elixir with Ilya Averyanov
In episode 53 of Thinking Elixir, Ilya Averyanov talks about how the SOLID principles, typically associated with OOP, can apply to Elixir. We talk about Ilya’s blog post where he applied these principles to his Github project and how that helped in PR discussions. We also talk about testing, architecture, and more.
https://thinkingelixir.com/podcast-episodes/053-solid-elixir-with-ilya-averyanov/
Onboarding to Elixir
I’ve worked with a number of clients on Elixir projects and I’ve onboarded myself, I’ve been onboarded and I’ve onboarded others. And compared to my experiences with PHP/Python/Javascript and my limited experience with C#/.Net I have experienced quite a difference.
Vetspire is hiring Senior Software Engineers & Senior DevOps Engineer (remote)
Vetspire is an Artificial Intelligence driven veterinary medical records and practice management platform. We’re a startup reimagining the way that veterinarians use technology, impacting every aspect of patient care from AI assistance in the exam room to managing client communications and clinical analytics. As part of our team, you’ll be designing the future of what veterinary technology should and can be, and you’ll be joining a founding team out of the Stanford Artificial Intelligence Laboratory building a research platform for evidence-based veterinary medicine.
Our backend is 100% written in Elixir, with Phoenix and Absinthe covering our business logic and a GraphQL API, which we use to build out the web app written in ReactJS and have our partners use the same API to build further tooling on top. It’s all relatively modern, built up from scratch over the last 4 years.
Senior Software Engineer: https://jobs.lever.co/vetspire/a13274ee-0037-410e-bd38-ee53ddbf0986
Senior DevOps Engineer: https://jobs.lever.co/vetspire/8453eadd-8a31-4d6a-acc1-7277aa921161
Paycheck, events, idempotency and Elixir
Example of modeling complex business scenario spanning across two separate contexts with event-driven architecture, Ecto and unique indexes.
https://appunite.com/blog/paycheck-events-idempotency-and-elixir
