サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
災害への備え
blog.plataformatec.com.br
You may have heard that Nubank has acqui-hired Plataformatec. Plataformatec has been working with Nubank over the past few months and Nubank saw great value on the practices and expertise shown by our teams. According to Nubank leaders, Plataformatec consultants have provided restructured rituals and new working agreements to its teams, and also brought improvements through better-planned teams us
If you look at the features listed by Kubernetes (K8s) and compare it to languages that run on the Erlang VM, such as Erlang and Elixir, the impression is that they share many keywords, such as “self-healing”, “horizontal scaling”, “distribution”, etc. This sharing often leads to confusion. Do they provide distinct behaviors? Do they overlap? For instance, is there any purpose to Elixir’s fault to
Flow v0.14 has been recently released with more fine grained control on data emission and tighter integration with GenStage. In this blog post we will start with a brief recap of Flow and go over the new changes. We end the post with a description of the new Elixir Development Subscription service by Plataformatec and how it has helped us bring those improvements to Flow. Quick introduction to Flo
Last week, The Pragmatic Bookshelf started the sales of Learn Functional Programming with Elixir written by me, now in beta. After one year of hard work, we are finally publishing the beta version of the book. In this blog post, I’ll tell you about the motivation for writing a book, its contents and its future. Why Writing a Book? Last year, we were, company-wise, looking for different ways to con
Note: Elixir v1.4 has been released and improves on many points touched by this article. From v1.4, Elixir will automatically infer the list of applications based on your dependencies. For more information, read the official announcement. In my journey as a curious Elixir developer, I’ve come across this seemingly simple question a few times: which applications from third-party libraries do I need
We’ve been talking about deploy and releases with Elixir lately, like how to run migrations on top of a release or how to deal with environment variables. Now it’s time to discover another tool that can help us release our Elixir application. After practicing deploy and tracing through nodes with Exrm, we got more comfortable knowing that there is a tool we can count on for managing production rel
It’s very common (and highly recommended) that application keeps its configuration values separated from its version control. A way of doing this is by using ENV vars (environment variables). They’re being used for improvements mostly on maintainability. The 12-factor app manifesto explains it on its Configuration section: The twelve-factor app stores config in environment variables (often shorten
Today we will continue exploring techniques for debugging and tracing Elixir code that are so important for running and understanding production systems. In the past, we have discussed: how to debug your application how to trace systems with Erlyberly how to use the observer to introspect applications. The examples above always connected to systems running locally. Given Elixir’s and the Erlang VM
We are really glad to announce the release candidate for Ecto 2.0 has been released. The upcoming Ecto version packs many goodies: We have migrated to DBConnection, which considerably improves the performance of how Ecto manages connections to the database as a whole. Improved pool management, faster encoding/decoding, support for prepared queries and more; The effective deprecation of Ecto.Model
It’s common that our first experience with debugging in a new language is by printing values to the terminal. Elixir isn’t different: we can use IO.puts/2 and IO.inspect/2. However, Elixir also provides other approaches to debugging. In this blog post, we’ll show you other 2 options: IEx.pry/0 and :debugger. IEx.pry The name “pry” is an old friend in the Ruby ecosystem but it has a different behav
At Plataformatec, we are always learning new techniques to help our clients introspect and monitor their production systems. Last week, we saw debugging techniques in Elixir and now we will see one of many ways to do tracing in Elixir. For this post, we will use erlyberly. You can see the installation instructions in its README. Tracing gives you all the data you need and doesn’t block your proces
Okay, you’ve been delving into Elixir. That’s good! 🙂 Of course the first question that pops up in your head is not about immutability, concurrency nor functional programming. It is How can I quit the Elixir shell? Today this question will be answered. Ctrl-C When you start your iex sessions, you are greeted with: Interactive Elixir (1.2.2) - press Ctrl+C to exit (type h() ENTER for help) iex(1)>
Ecto v1.1 has been released. Ecto v1.1 brings improvements and bug fixes to Ecto but, more importantly, paves the way for the upcoming Ecto v2.0 release by deprecating functionality that has been said to be error prone or confusing by developers. This article will highlight both improvements and what to expect by Ecto 2.0. For detailed information on the release, please check the CHANGELOG. Let’s
UPDATE: Almost 2 years later we have released a tiny library called Mox for Elixir that follows the guidelines written in this article. A couple days ago I expressed my thoughts regarding mocks on Twitter: Mocks/stubs do not remove the need to define an explicit interface between your components (modules, classes, whatever). [1/4] — José Valim (@josevalim) September 9, 2015 The blame is not on moc
This blog post aims to document how to work with associations in Ecto, covering how to read, insert, update and delete associations and embeds. At the end, we give a more complex example that uses Ecto associations to build nested forms in Phoenix. This article expects basic knowledge Ecto, particularly how repositories, schema and the query syntax work. You can learn more about those in Ecto docs
Functional languages are typically great languages for writing assertive code and Elixir is no exception. In this blog post, I would like to discuss some anti-patterns I have seen in Elixir code and how to rewrite them in a way to make the best of Elixir. Pattern matching Imagine you have a string with format foo=bar&token=value&bar=baz where you want to extract the value for the key token which m
Since microservices have been a common topic lately, there are a lot of questions about how Elixir fits in microservice architectures. On this post, I won’t focus on the merits of microservices, as many have already discussed that to exhaustion. In particular, Martin Fowler’s entry on the topic aligns well with my thoughts and is definitely worth reading. It is also worth mentioning that I have se
Elixir provides the concept of collections, which may be in-memory data structures, as well as events, I/O resources and more. Those collections are supported by the Enumerable protocol, which is an implementation of an abstraction we call “reducees”. In this article, we will outline the design decisions behind such abstraction, often exploring ideas from Haskell, Clojure and Scala that eventually
Microservices has gained popularity recently and some projects I’ve worked on had followed this approach. Basically, it’s an approach of software architecture that allows breaking monolithic applications into smaller decoupled, business-oriented and isolated deployable applications. Each microservice normally is hosted in its own git repository, since it has very defined business boundaries and th
The article below was originally written by Kasper Timm Hansen (@kaspth on github & twitter) about his work during the Google Summer of Code 2013. Kasper and I worked a lot changing the underlying implementation of the sanitize helper to give Rails developers a more robust, faster and secure solution to sanitize user input. This new implementation should be fully backward compatible, with no chang
Rails 4.1 was just released this week and I already had a great experience trying out the release candidates on my latest project, so I decided to write a bit about my favorites features on this release and some things I have learned by using them so far. 1) secrets.yml Placing your configuration in a YAML file isn’t exactly a revolutionary feature, but the usage of the config/secrets.yml file tha
We are glad to announce that Devise 3.1.0.rc is out. On this version, we have focused on some security enhancements regarding our defaults and the deprecation of TokenAuthenticatable. This blog post explains the rationale behind those changes and how to upgrade. Devise 3.1.0.rc runs on both Rails 3.2 and Rails 4.0. There is a TL;DR for upgrading at the end of this post. Note: We have yanked 3.1.0.
Posts tagged "eager load" A couple weeks ago, Aaron Patterson (aka @tenderlove) wrote about getting rid of config.threadsafe! on Rails 4. When discussing multi-process and multi-threaded servers in production, one important aspect of the discussion that came up in the blog post was code loading. This blog post is about which code loading strategies exist in a Rails application, … » Tags: eager loa
Here at Plataformatec we use Github Pull Requests a lot for code review and this usually yields tons of constructive comments and excellent discussions from time to time. One of the recent topics was about whether we should use scopes or class methods throughout the project to be consistent. It’s also not hard to find discussions about it all over the internet. The classic comment usually boils do
Hi everybody. I’d like to announce that Devise v2.2.3, v2.1.3, v2.0.5 and v1.5.4 have been released with a security patch. Upgrade immediately unless you are using PostgreSQL or SQLite3. Users of all other databases (including NoSQL ones) require immediate upgrade. Using a specially crafted request, an attacker could trick the database type conversion code to return incorrect records. For some tok
A couple weeks ago, Aaron Patterson (aka @tenderlove) wrote about getting rid of config.threadsafe! on Rails 4. When discussing multi-process and multi-threaded servers in production, one important aspect of the discussion that came up in the blog post was code loading. This blog post is about which code loading strategies exist in a Rails application, how they affect multi-process and multi-threa
I’d like to start with a question: Have you ever seen code like this? class User I have. But what few developers know is that many methods in Active Record already accept a block, so you don't need to invoke tap in the first place. And that's all because Active Record loves blocks! Let's go through some examples. Using blocks with Active Record When creating an Active Record object, either by usin
Update 08/13/2012 Since the new deprecation policy the composed_of removal was reverted. We are still discussing the future of this feature. The reason A few days ago we started a discussion about the removal of the composed_of method from Active Record. I started this discussion because when I was tagging every Rails issue according to its framework, I found some of them related to composed_of, t
Or, even better, why your web framework should not adopt a CGI-based API. For the past few years I have been studying and observing the development of different emerging languages closely with a special focus on web frameworks/servers. Unfortunately, most of the new web frameworks are following the Rack/WSGI specification which may be a mistake depending on the platform you are targeting (particul
次のページ
このページを最初にブックマークしてみませんか?
『Plataformatec Blog』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く