From back-end OTP app into a Phoenix 1.3 app, Part 1
In this episode, we migrate StatWatch, a purely back-end OTP app into a new Phoenix 1.3 project in the following phases:
Generate the Phoenix app Copy StatWatch into the Phoenix app https://youtu.be/DSpKssTF60cMake some small improvements
Add it and its child worker to the supervision tree Organize the app into Phoenix 1.3 Contexts Hook it up to the DB Set up some basic CRUD
In Part 2, we’ll set up an auth system, sessions, put the remaining pieces together and do some styling.
You can see the finished project at http://statwatch.me
guards in Elixir 1.6
https://swanros.com/2018/01/25/elixir-1-6/
Elixir 1.6 has been released with a lot of nice additions to the language, but without a doubt, what I’m most pumped about is real guard support in the language.
I wrote just a little bit about guards in Elixir, how they compare with Swift’s implementation, and why I like Elixir’s approach better.
Thanks for reading!
Generating Bitcoin Private Keys and Public Addresses with Elixir
Elixir ships with all of the tools required to generate secure Bitcoin private keys and transform them into shareable public addresses. This article walks through the process one step at a time.
New payment processor package in Elixir
The story about the implementation of Apple Pay and Android Pay payments using CyberSource payment processor SOAP API.
GitHub: https://github.com/coletiv/cybersource-sdk Hexdocs: https://hexdocs.pm/cybersource_sdk/api-reference.html
StrawHat.Mailer for Email Management (Powered by Swoosh )
Add Email Template and in the near future programmatically emails. Using Swoosh under the hood for Email Providers integration and Mustache for the templates.
https://github.com/straw-hat-team/straw_hat_mailer
Add the concept of partials in a template, it will allow you to create dynamic sections on your template so it makes it easier to update the boilerplate code for your company.
You could replace your Phoenix Email templates so no more deployment for Email changes 💜
StrawHat.Mailer relay on Swoosh.Email so you could do anything you could do with Swoosh.
Documentation feedbacks and contributions are welcome.
ExVenture (a MUD) Updates for January 2018
There have been some big updates in the last month, namely questing and conversing with NPCs!
AC Side Projects: Launching StatWatch.me
After sorting through organizing an externally added OTP app in a Phoenix 1.3 project, StatWatch.me is finally launched!
It’s a free web app that logs your number of YouTube subscribers, channel views, Twitter followers and Alexa rank each day. Just a side project, with restricted signups so it stays within the free API limits.
EventBus v1.0.0 released 🎉🎊
https://github.com/mustafaturan/event_bus
EventBus library is a traceable, extendable and minimalist event bus implementation for Elixir with built-in event store and event watcher based on ETS. It allows basic pub/sub for internal process communication. It is designed for low memory footprint and speed.
Some of the features
-
Fast data writes with enabled concurrent writes to ETS.
-
Fast data reads with enabled concurrent reads from ETS.
-
Fast by design. Almost all implementation data accesses have O(1) complexity.
-
Memory friendly. Instead of pushing event data, pushes event shadow(event id and topic) to only interested subscribers.
-
Applies queueing theory to handle inputs.
-
Extendable with addons.
-
Traceable with optional attributes. Optional attributes compatible with opentracing platform.
-
Minimal with required attributes(Incase, you want it to work minimal use 3 required attributes to deliver your events).
WebSockex 0.4.1 Released!
Enhancements
-
Allow
:via
and:global
tuples for named registration.-
This includes handling for
cast/2
andsend_frame/2
.
-
This includes handling for
-
Add access to response headers during
handle_connect/2
viaConn.resp_headers
. -
Add
Conn.parse_url/1
to handle url to URI conversion. -
Allow
Conn.new/2
to use a url string instead of aURI
struct. -
Automatically add a “/“ path to a pathless url.
- The HTTP request will break without a valid path!
-
Add
child_spec
definitions for Elixir 1.5+-
Or any version that exports
Supervisor.child_spec/2
-
Or any version that exports
- Some documentation tweaks
Bug Fixes
-
No longer invoke
handle_disconnect
if there is reason to exit from invoking a callback. (e.g. an exception was raised) -
Properly handle unexpected SSL socket termination.
- This seems pretty important, but I don’t know…
-
Return a descriptive error when trying to use
send_frame/2
in a callback.
Take a look at the v0.4.0…v0.4.1
diff or the release on hex.pm
for more information.
Burnex 1.0 release - Burner email detector
Though burner emails (temporary addresses) are great to avoid being spammed, they can become a burden if you run a legit service that relies on your users addresses to confirm their identities and ensure they will not create too much trash accounts in a limited time.
Burnex is a very simple library that check emails against 3700+ burner email domains ( based on this list ).
Hex.pm: https://hex.pm/packages/burnex <br> Sources: https://github.com/Betree/burnex
A journey on using Env vars on a Mix project
Coming from Ruby, Rails, I naively expected Environment vars to just work :D http://codebikeandmore.com/code/2018/01/20/using-env-vars-in-elixir.html
ElixirCamp Australia is on in March
It’s on the beach just outside of sunny Melbourne.
Tickets are on sale now. More details at http://elixir.camp/
My recent performance story on Elixir
Perf tools in Elixir are wonderful! https://medium.com/@victor.nascimento/an-elixir-performance-tooling-story-c5c85479063a
Integration testing Phoenix application with Circle CI 2.0
How to run your Phoenix integration tests on Circle CI 2.0 with headless browser mode?
Check this blog: https://dev.to/vinhnglx/integration-testing-phoenix-application-with-circle-ci-20-50md
Swoosh 0.13.0 is out! With a Dyn adapter.
The highlight of this new version is the addition of a Dyn adapter, thanks to a contribution from @jann.
Please give it a try and feel free to open an issue in the Swoosh repo if you run into any trouble.
People are Processes
When designing your Elixir systems, think about the processes as people. Now think of these people in an office all working together to serve the customer. That is how you can build your software systems in Elixir. It’s natural and intuitive!
Talking about system design, how processes work, some benefits of Elixir and Phoenix, and concurrency!
https://brainlid.org/elixir/2018/01/17/people-are-processes.html
Automated dependency update PRs with Dependabot
I just added support for Elixir to Dependabot!
Each day it will pull down your mix.exs
and mix.lock
files and check whether the dependencies in them are up-to-date. If there are any that could do with a bump it will create individual PRs for each update for you.
Would love beta testers - Dependabot has created a lot of Ruby and JS pull requests, but support for Elixir is brand new.