This document discusses using containers for local development and production of Elixir applications. It recommends using containers to provide consistent environments for development teams. It also describes building and deploying multi-stage Docker images for Elixir apps with Umbrella projects using tools like Distillery, and testing container images with tools like container-structure-test. Containers provide isolation that helps ensure consistency across environments from development to production.
This document demonstrates how to build and deploy a serverless application using faastRuby. It initializes a new project called "hello", adds Ruby and Crystal functions, then deploys the project. Benchmark tests show the Crystal function performing slightly faster than the Ruby function in most cases, with differences of only a few milliseconds. The document concludes that while Crystal is a little faster, the differences are small and performance is likely limited by Nginx rate limiting.
This document discusses using containers for local development and production of Elixir applications. It recommends using containers to provide consistent environments for development teams. It also describes building and deploying multi-stage Docker images for Elixir apps with Umbrella projects using tools like Distillery, and testing container images with tools like container-structure-test. Containers provide isolation that helps ensure consistency across environments from development to production.
This document demonstrates how to build and deploy a serverless application using faastRuby. It initializes a new project called "hello", adds Ruby and Crystal functions, then deploys the project. Benchmark tests show the Crystal function performing slightly faster than the Ruby function in most cases, with differences of only a few milliseconds. The document concludes that while Crystal is a little faster, the differences are small and performance is likely limited by Nginx rate limiting.
This document introduces FaaStRuby, a framework for building serverless backends using Ruby. It provides instructions for creating a sample FaaStRuby project with different functions. It also discusses using ERB templates to add frontends to FaaStRuby projects and using Opal to build frontends in Ruby. Inesita is introduced as a way to build frontends with a virtual DOM implemented in Ruby via Opal. Crystal is mentioned as a language that FaaStRuby supports and that could work well with Ruby.
The document discusses dependency injection (DI) and different approaches to implementing DI in Ruby. It explores how to make DI composable by managing object state and resolving dependency graphs. Various Ruby techniques are presented for implementing DI containers, including instance_eval, define_singleton_method, method_missing, and TracePoint to dynamically inject dependencies at object initialization time. The goal is to think creatively about object-oriented and functional programming patterns in Ruby's dynamic context.
To make spaghetti, take dry spaghetti and salt from the refrigerator and put them into a pot of boiling water. Boil the spaghetti until it is cooked, then serve it. Software code can become complicated but it is better if the code is simple, with single concepts and single tasks, rather than complex with many interleaved concepts and tasks.
1. Phoenix can scale out servers easily by using load balancers and Kubernetes.
2. The default Phoenix.PubSub adapter broadcasts all messages to all servers, which does not scale.
3. Splitting the key-value store and pub-sub functionality across multiple Redis instances and using connection pooling helps scale Redis and the overall system.
The document discusses the programming languages Elixir and Erlang. It notes that Elixir's syntax and standard library are like Ruby, while it is a functional programming language with immutable data like Erlang. Elixir also has Erlang's supervisor architecture for building fault-tolerant applications with processes, messages and linking. While Elixir provides advantages for parallel and reliable applications, testing and debugging distributed systems remains challenging.
The document discusses concurrency and parallelism in various programming languages. It provides examples of using concurrent and parallel features in Node.js, Crystal, Ruby, Go, Elixir and other languages. It also discusses libraries like Concurrent Ruby and parallel that enable concurrent or parallel programming.
This document discusses using Elixir and the Hedwig framework for building chat bots as an alternative to Node.js and frameworks like Botkit. It provides an example of a simple ping-pong bot built with Hedwig. It then compares the key differences between Botkit and Hedwig, noting that Hedwig runs processes concurrently for better performance and fault tolerance compared to the single-threaded event loop model of Botkit. Finally it demonstrates the difference in resilience through a benchmark that shows Hedwig can recover more quickly from errors.
The document discusses various Ruby-like languages and their performance in handling concurrent ping-pong requests. CoffeeScript, Crystal, Elixir, Groovy, JRuby, Opal, and Ruby implementations using Puma and Unicorn were tested under different concurrency levels. CoffeeScript, Crystal, Elixir and Puma performed well with low response times and no errors under all load levels. Node.js and Unicorn had higher error rates and slower response times, especially under high concurrency.
This document introduces FaaStRuby, a framework for building serverless backends using Ruby. It provides instructions for creating a sample FaaStRuby project with different functions. It also discusses using ERB templates to add frontends to FaaStRuby projects and using Opal to build frontends in Ruby. Inesita is introduced as a way to build frontends with a virtual DOM implemented in Ruby via Opal. Crystal is mentioned as a language that FaaStRuby supports and that could work well with Ruby.
The document discusses dependency injection (DI) and different approaches to implementing DI in Ruby. It explores how to make DI composable by managing object state and resolving dependency graphs. Various Ruby techniques are presented for implementing DI containers, including instance_eval, define_singleton_method, method_missing, and TracePoint to dynamically inject dependencies at object initialization time. The goal is to think creatively about object-oriented and functional programming patterns in Ruby's dynamic context.
To make spaghetti, take dry spaghetti and salt from the refrigerator and put them into a pot of boiling water. Boil the spaghetti until it is cooked, then serve it. Software code can become complicated but it is better if the code is simple, with single concepts and single tasks, rather than complex with many interleaved concepts and tasks.
1. Phoenix can scale out servers easily by using load balancers and Kubernetes.
2. The default Phoenix.PubSub adapter broadcasts all messages to all servers, which does not scale.
3. Splitting the key-value store and pub-sub functionality across multiple Redis instances and using connection pooling helps scale Redis and the overall system.
The document discusses the programming languages Elixir and Erlang. It notes that Elixir's syntax and standard library are like Ruby, while it is a functional programming language with immutable data like Erlang. Elixir also has Erlang's supervisor architecture for building fault-tolerant applications with processes, messages and linking. While Elixir provides advantages for parallel and reliable applications, testing and debugging distributed systems remains challenging.
The document discusses concurrency and parallelism in various programming languages. It provides examples of using concurrent and parallel features in Node.js, Crystal, Ruby, Go, Elixir and other languages. It also discusses libraries like Concurrent Ruby and parallel that enable concurrent or parallel programming.
This document discusses using Elixir and the Hedwig framework for building chat bots as an alternative to Node.js and frameworks like Botkit. It provides an example of a simple ping-pong bot built with Hedwig. It then compares the key differences between Botkit and Hedwig, noting that Hedwig runs processes concurrently for better performance and fault tolerance compared to the single-threaded event loop model of Botkit. Finally it demonstrates the difference in resilience through a benchmark that shows Hedwig can recover more quickly from errors.
The document discusses various Ruby-like languages and their performance in handling concurrent ping-pong requests. CoffeeScript, Crystal, Elixir, Groovy, JRuby, Opal, and Ruby implementations using Puma and Unicorn were tested under different concurrency levels. CoffeeScript, Crystal, Elixir and Puma performed well with low response times and no errors under all load levels. Node.js and Unicorn had higher error rates and slower response times, especially under high concurrency.