A dive into the highlights of Elixir that make it the ideal platform for the web...and how all these questions were answered figured out 30 years ago. Presented to Upstate Elixir in Greenville, SC on Nov 16.
This document provides an overview of Elixir and functional programming presented by Anton Mishchuk at an Elixir meetup. It discusses the software crisis driven by increasing hardware capabilities, the resurgence of functional programming like Erlang to address this, and how Elixir builds upon Erlang with a Ruby-like syntax and metaprogramming capabilities. While sharing a "programmer happiness" philosophy with Ruby, Elixir differs in being functional and using Erlang's actor model for concurrency over mutable state and threads. The presentation encourages trying Elixir to build software for modern multicore systems and IoT given these advantages.
Lock-free algorithms for Kotlin CoroutinesRoman Elizarov
The document discusses lock-free algorithms for Kotlin coroutines. It covers the implementation of a lock-free doubly linked list using single-word compare-and-swap operations. It also discusses how to build more complex atomic operations, like a multi-word compare-and-swap, to enable select expressions in Kotlin coroutines.
Reuven Lerner is a web developer and consultant who primarily works with Ruby on Rails and PostgreSQL. He teaches Rails courses and uses various tools like iTerm2, RVM, IRB gems, Emacs, Firefox plugins, Growl, and Pow in his development environment. Emacs is his editor of choice, which he has highly customized over the years using Lisp functions and key bindings.
Messaging, interoperability and log aggregation - a new frameworkTomas Doran
In this talk, I will talk about why log files are horrible, logging log lines, and more structured performance metrics from large scale production applications as well as building reliable, scaleable and flexible large scale software systems in multiple languages.
Why (almost) all log formats are horrible will be explained, and why JSON is a good solution for logging will be discussed, along with a number of message queuing, middleware and network transport technologies, including STOMP, AMQP and ZeroMQ.
The Message::Passing framework will be introduced, along with the logstash.net project which the perl code is interoperable with. These are pluggable frameworks in ruby/java/jruby and perl with pre-written sets of inputs, filters and outputs for many many different systems, message formats and transports.
They were initially designed to be aggregators and filters of data for logging. However they are flexible enough to be used as part of your messaging middleware, or even as a replacement for centralised message queuing systems.
You can have your cake and eat it too - an architecture which is flexible, extensible, scaleable and distributed. Build discrete, loosely coupled components which just pass messages to each other easily.
Integrate and interoperate with your existing code and code bases easily, consume from or publish to any existing message queue, logging or performance metrics system you have installed.
Simple examples using common input and output classes will be demonstrated using the framework, as will easily adding your own custom filters. A number of common messaging middleware patterns will be shown to be trivial to implement.
Some higher level use-cases will also be explored, demonstrating log indexing in ElasticSearch and how to build a responsive platform API using webhooks.
Interoperability is also an important goal for messaging middleware. The logstash.net project will be highlighted and we'll discuss crossing the single language barrier, allowing us to have full integration between java, ruby and perl components, and to easily write bindings into libraries we want to reuse in any of those languages.
This document discusses using ZeroMQ and Elasticsearch for log aggregation. It proposes using ZeroMQ to transmit structured log data from application servers to a central Logstash server, which would then insert the logs into Elasticsearch for querying and analysis. This approach aims to provide a lightweight logging solution that doesn't block application servers like traditional logging to databases can. The document also provides background on tools like Logstash, Elasticsearch, and Splunk.
In this talk I will introduce attendees to the basics of messaging queues, their goals and applications from CFML. Messaging enables software applications to connect and scale. Thus, providing applications to connect to each other as components of a larger application, or to user devices and data. Messaging is asynchronous, and can decouple your software concerns with ease. However, messaging is much more than the traditional publish/subscribe patterns but also the ability to create work queues, routing and much more.
This document provides an overview of Elixir and functional programming presented by Anton Mishchuk at an Elixir meetup. It discusses the software crisis driven by increasing hardware capabilities, the resurgence of functional programming like Erlang to address this, and how Elixir builds upon Erlang with a Ruby-like syntax and metaprogramming capabilities. While sharing a "programmer happiness" philosophy with Ruby, Elixir differs in being functional and using Erlang's actor model for concurrency over mutable state and threads. The presentation encourages trying Elixir to build software for modern multicore systems and IoT given these advantages.
Lock-free algorithms for Kotlin CoroutinesRoman Elizarov
The document discusses lock-free algorithms for Kotlin coroutines. It covers the implementation of a lock-free doubly linked list using single-word compare-and-swap operations. It also discusses how to build more complex atomic operations, like a multi-word compare-and-swap, to enable select expressions in Kotlin coroutines.
Reuven Lerner is a web developer and consultant who primarily works with Ruby on Rails and PostgreSQL. He teaches Rails courses and uses various tools like iTerm2, RVM, IRB gems, Emacs, Firefox plugins, Growl, and Pow in his development environment. Emacs is his editor of choice, which he has highly customized over the years using Lisp functions and key bindings.
Messaging, interoperability and log aggregation - a new frameworkTomas Doran
In this talk, I will talk about why log files are horrible, logging log lines, and more structured performance metrics from large scale production applications as well as building reliable, scaleable and flexible large scale software systems in multiple languages.
Why (almost) all log formats are horrible will be explained, and why JSON is a good solution for logging will be discussed, along with a number of message queuing, middleware and network transport technologies, including STOMP, AMQP and ZeroMQ.
The Message::Passing framework will be introduced, along with the logstash.net project which the perl code is interoperable with. These are pluggable frameworks in ruby/java/jruby and perl with pre-written sets of inputs, filters and outputs for many many different systems, message formats and transports.
They were initially designed to be aggregators and filters of data for logging. However they are flexible enough to be used as part of your messaging middleware, or even as a replacement for centralised message queuing systems.
You can have your cake and eat it too - an architecture which is flexible, extensible, scaleable and distributed. Build discrete, loosely coupled components which just pass messages to each other easily.
Integrate and interoperate with your existing code and code bases easily, consume from or publish to any existing message queue, logging or performance metrics system you have installed.
Simple examples using common input and output classes will be demonstrated using the framework, as will easily adding your own custom filters. A number of common messaging middleware patterns will be shown to be trivial to implement.
Some higher level use-cases will also be explored, demonstrating log indexing in ElasticSearch and how to build a responsive platform API using webhooks.
Interoperability is also an important goal for messaging middleware. The logstash.net project will be highlighted and we'll discuss crossing the single language barrier, allowing us to have full integration between java, ruby and perl components, and to easily write bindings into libraries we want to reuse in any of those languages.
This document discusses using ZeroMQ and Elasticsearch for log aggregation. It proposes using ZeroMQ to transmit structured log data from application servers to a central Logstash server, which would then insert the logs into Elasticsearch for querying and analysis. This approach aims to provide a lightweight logging solution that doesn't block application servers like traditional logging to databases can. The document also provides background on tools like Logstash, Elasticsearch, and Splunk.
In this talk I will introduce attendees to the basics of messaging queues, their goals and applications from CFML. Messaging enables software applications to connect and scale. Thus, providing applications to connect to each other as components of a larger application, or to user devices and data. Messaging is asynchronous, and can decouple your software concerns with ease. However, messaging is much more than the traditional publish/subscribe patterns but also the ability to create work queues, routing and much more.
Flink Forward SF 2017: Tzu-Li (Gordon) Tai - Joining the Scurry of Squirrels...Flink Forward
Since graduation from the Apache Incubator some 2 years ago, Apache Flink has been thriving as a pioneering data streaming engine used in production across a wide range of organizations. Powering this momentum of growing traction is a community-wide effort driven by over 260 worldwide contributors (as of January 2017). This talk aims at providing information on the many ways that one can also join the community and start contributing to Flink. Like any other successful project, there are some simple guidelines for contributors to allow easier reviewing and pull request merging. We will go through the best practices of the contribution process, introducing the Apache Way of how the community collaborates, as well as some procedures that the community uses for discussions such as FLIPs (Flink Improvement Proposals). Another main objective of this talk is to promote parts of the project that are currently undergoing heavy development and is welcoming to extra pairs of helping hands.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
This document discusses various techniques for IPv6 transition and coexistence with IPv4, including:
- Dual-stack which allows simultaneous support of both IPv4 and IPv6.
- Tunnels which encapsulate IPv6 packets in IPv4 packets to provide IPv6 connectivity through IPv4 networks.
- Translation techniques like NAT64 which allow communication between IPv4-only and IPv6-only nodes.
The document introduces coroutines in Kotlin. It discusses how coroutines make asynchronous code easier to write by allowing suspending functions and avoiding callback hell. Coroutines were introduced in early languages like Simula but fell out of favor due to multithreading. They are now regaining popularity for writing asynchronous non-blocking code. The document then covers how coroutines work in Kotlin, including suspending functions, coroutine builders like launch and async, and how coroutines avoid issues with approaches like callbacks and futures. It notes that coroutines in Kotlin are currently experimental but can be used in production code.
Talk presented by Aarón Fas & Andrés Viedma at the JBcnConf 2015.
'Microservices' is one of the most popular buzzwords in the industry now, but are they really a step forward? Or they might be more a problem than a solution? When are they really helpful? How should they be addressed? What challenges will we face if we decide to implement a microservices based architecture?
One year ago, Tuenti moved from a monolithic PHP backend to a Java + PHP microservices architecture. In this talk, we'll share our experiences so far: how we addressed the change, how we implemented it, why we think it's been valuable for us (and how is that related to the company culture), why it might not be a good idea for your company / application and, mostly, what lessons we have learned from this experience.
Ruby developers need to stop using EventMachine. It's the wrong direction.
Lost in the "Threads vs Event Driven vs Process Spawning" debate is that you can combine them! Learn how Celluloid is improving thread programming by abstracting them using a higher level framework called Celluloid, how you can use Celluloid::IO to throw a reactor pattern into a thread. Using this approach, you can take advantage of threading and use all CPU power on a machine with JRuby or Rubinius. I also discuss the future of distributed objects and computing, and where I think things are going.
Come discover what in the world are RESTFul services and what are its benefits over other API building technologies. We will cover the basics of HTTP representation protocols, RESTful routing, security, authentication and testing. We will then move to modeling RESTful resources via an open source tool called Relax; Restful Tools For Lazy Experts and finally scaling it with the Adobe API Manager.
Erlang plus BDB: Disrupting the Conventional Web Wisdomguest3933de
The document discusses using Erlang, Erlang Driver Toolkit (EDTK), and Berkeley DB (BDB) to build disruptive internet services. Erlang is a programming language designed for building highly concurrent and reliable systems. EDTK allows Erlang to interface with external libraries like BDB in a way that meshes with Erlang's concurrency model. This talk argues that combining these technologies allows building internet services with better performance, reliability, and scalability compared to traditional approaches.
jRuby fixes some issues with the Ruby programming language like memory leaks and lack of kernel level threading by running Ruby code on the Java Virtual Machine which has features like a sophisticated garbage collector, just-in-time compilation for improved performance, and native threading; benchmarks show jRuby provides much higher concurrency and better performance than Ruby for background processing and web applications; deploying a Ruby application using jRuby and a Java application server like Torquebox allows it to take advantage of the reliability, scalability and deployment features of the Java platform.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1SJ7PSV.
Alex Blewitt talks about Swift, the open source released in December 2015 and available on Linux as well as OSX and iOS. He looks at the open-source project, how applications and libraries can be built for both platforms, the differences between the different builds and how Swift works under the hood. Filmed at qconlondon.com.
Alex Blewitt has over 20 years of experience in Objective-C and has been using Apple frameworks since NeXTSTEP 3.0. He currently works for a financial company in London and writes for the online technology news site InfoQ, as well as other books for Packt Publishing. He also has a number of apps on the App Store through Bandlem Limited.
Making Symfony Services async with RabbitMq (and more Symfony)Gaetano Giunta
This document discusses using RabbitMQ and Symfony to generate Microsoft Office documents asynchronously from XML content. Currently, using just LibreOffice is slow, unreliable, and does not scale well. The proposed solution is to use RabbitMQ with Symfony services to queue document generation jobs and process them in parallel with multiple worker processes. This improves performance, reliability and allows the process to scale. Some challenges that still need to be addressed are network security, throughput and determining if a existing solution could be used instead of a custom one.
This document discusses why Ruby is a good programming language for security projects. It provides examples of security tools and frameworks built with Ruby, including Metasploit, BeEF, Arachni, Brakeman, WPScan, and RailsGoat. Ruby offers features like an easy-to-read syntax, package management with RubyGems, powerful object-oriented capabilities, platform independence, and support for domains like network protocols that make it well-suited for security applications.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1GHc3rO.
Alex Blewitt introduces the history behind Swift, why it was created, how it differs from Objective-C and how Swift is compiled and executed under the covers. Alex goes into details about how LLVM is used, the way that memory is managed, how objects are laid out, and a prediction of the way Swift and Objective-C will evolve over time. Filmed at qconlondon.com.
Dr Alex Blewitt has over 20 years of experience in Objective-C and has been using Apple frameworks since NeXTSTEP 3.0. He upgraded his NeXTstation for a TiBook when Apple released Mac OS X in 2001 and has been developing on it ever since. He is author of the recently published Swift Essentials.
This document discusses decoupling applications and scaling with enterprise messaging. It introduces messaging concepts like producers, consumers, and message brokers. It focuses on the AMQP protocol and RabbitMQ as a messaging implementation. Key points covered include RPC vs messaging styles, decoupling applications, cross-platform communication, and load balancing. The presenter demonstrates a messaging example using Java, CFML, Node.js, and JavaScript producers and consumers communicating via a RabbitMQ broker.
Erlang is a functional programming language built for concurrency, distribution, and fault tolerance. It uses an immutable data structure and avoids loops with tail recursion. The OTP framework provides tools like supervision trees, behaviors, and hot code swapping. While Erlang syntax looks like Prolog, it can integrate with Ruby via bridges or messaging and runs on Heroku. The document recommends resources for learning Erlang and OTP and participating in the local Erlang meetup.
Balázs Bucsay - XFLTReaT: Building a Tunnelhacktivity
XFLTReaT is an open-source tunnelling framework that handles all the boring stuff and offers the capability to the users to take care of only those things that matter. It provides significant improvements over existing tools. From now on there is no need to write a new tunnel for each and every protocol or to deal with interfaces and routing. Any protocol can be converted to a module, which works in a plug-and-play fashion; authentication and encryption can be configured and customised on all traffic and it is also worth mentioning that the framework was designed to be easy to configure, use and develop. In case there is a need to send packets over ICMP, RDP or SSH then this can be done in a matter of minutes, instead of developing a new tool from scratch. The potential use (or abuse) cases are plentiful, such as bypassing network restrictions of an ISP, the proxy of a workplace or obtaining Internet connectivity through bypassing captive portals in the middle of the Atlantic Ocean or at an altitude of 12km on an airplane.
This framework is not just a tool; it unites different technologies in the field of tunnelling. It will be show how to tunnel data over a Windows jumpbox utilising RDP (including the dirty low level "secrets") or how to exfiltrate data over ICMP from barely secured networks. We have simplified the whole process and created a framework that is responsible for everything but the communication itself, we rethought the old way of tunnelling and tried to give something new to the community. After the initial setup the framework takes care of everything. With the check functionality we can even find out, which module can be used on the network, there is no need for any low-level packet fu and hassle. I guarantee that you won’t be disappointed with the tool and the talk, actually you will be richer with an open-source tool.
EKON20 WorkShop, November 2016
The Open Source mORMot framework is a huge set of units, with a lot of features. It allows Delphi and FPC to eb true competitors for business projects. In this workshop, we will present how its ORM leverages SQL and NoSQL databases, and how interface-based services ease SOA development. We will show some several cross-cutting features, like SynTests (and stubs/mocks), SynLog, SynMustache, SynDB, SynMongoDB, SynSM, SynPDF, SynCrypto or SynEcc. High-level presentation of the involved concepts will always be followed by some sample code.
PostgreSQL - It's kind've a nifty databaseBarry Jones
This presentation was given to a company that makes software for churches that is considering a migration from SQL Server to PostgreSQL. It was designed to give a broad overview of features in PostgreSQL with an emphasis on full-text search, various datatypes like hstore, array, xml, json as well as custom datatypes, TOAST compression and a taste of other interesting features worth following up on.
Flink Forward SF 2017: Tzu-Li (Gordon) Tai - Joining the Scurry of Squirrels...Flink Forward
Since graduation from the Apache Incubator some 2 years ago, Apache Flink has been thriving as a pioneering data streaming engine used in production across a wide range of organizations. Powering this momentum of growing traction is a community-wide effort driven by over 260 worldwide contributors (as of January 2017). This talk aims at providing information on the many ways that one can also join the community and start contributing to Flink. Like any other successful project, there are some simple guidelines for contributors to allow easier reviewing and pull request merging. We will go through the best practices of the contribution process, introducing the Apache Way of how the community collaborates, as well as some procedures that the community uses for discussions such as FLIPs (Flink Improvement Proposals). Another main objective of this talk is to promote parts of the project that are currently undergoing heavy development and is welcoming to extra pairs of helping hands.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
This document discusses various techniques for IPv6 transition and coexistence with IPv4, including:
- Dual-stack which allows simultaneous support of both IPv4 and IPv6.
- Tunnels which encapsulate IPv6 packets in IPv4 packets to provide IPv6 connectivity through IPv4 networks.
- Translation techniques like NAT64 which allow communication between IPv4-only and IPv6-only nodes.
The document introduces coroutines in Kotlin. It discusses how coroutines make asynchronous code easier to write by allowing suspending functions and avoiding callback hell. Coroutines were introduced in early languages like Simula but fell out of favor due to multithreading. They are now regaining popularity for writing asynchronous non-blocking code. The document then covers how coroutines work in Kotlin, including suspending functions, coroutine builders like launch and async, and how coroutines avoid issues with approaches like callbacks and futures. It notes that coroutines in Kotlin are currently experimental but can be used in production code.
Talk presented by Aarón Fas & Andrés Viedma at the JBcnConf 2015.
'Microservices' is one of the most popular buzzwords in the industry now, but are they really a step forward? Or they might be more a problem than a solution? When are they really helpful? How should they be addressed? What challenges will we face if we decide to implement a microservices based architecture?
One year ago, Tuenti moved from a monolithic PHP backend to a Java + PHP microservices architecture. In this talk, we'll share our experiences so far: how we addressed the change, how we implemented it, why we think it's been valuable for us (and how is that related to the company culture), why it might not be a good idea for your company / application and, mostly, what lessons we have learned from this experience.
Ruby developers need to stop using EventMachine. It's the wrong direction.
Lost in the "Threads vs Event Driven vs Process Spawning" debate is that you can combine them! Learn how Celluloid is improving thread programming by abstracting them using a higher level framework called Celluloid, how you can use Celluloid::IO to throw a reactor pattern into a thread. Using this approach, you can take advantage of threading and use all CPU power on a machine with JRuby or Rubinius. I also discuss the future of distributed objects and computing, and where I think things are going.
Come discover what in the world are RESTFul services and what are its benefits over other API building technologies. We will cover the basics of HTTP representation protocols, RESTful routing, security, authentication and testing. We will then move to modeling RESTful resources via an open source tool called Relax; Restful Tools For Lazy Experts and finally scaling it with the Adobe API Manager.
Erlang plus BDB: Disrupting the Conventional Web Wisdomguest3933de
The document discusses using Erlang, Erlang Driver Toolkit (EDTK), and Berkeley DB (BDB) to build disruptive internet services. Erlang is a programming language designed for building highly concurrent and reliable systems. EDTK allows Erlang to interface with external libraries like BDB in a way that meshes with Erlang's concurrency model. This talk argues that combining these technologies allows building internet services with better performance, reliability, and scalability compared to traditional approaches.
jRuby fixes some issues with the Ruby programming language like memory leaks and lack of kernel level threading by running Ruby code on the Java Virtual Machine which has features like a sophisticated garbage collector, just-in-time compilation for improved performance, and native threading; benchmarks show jRuby provides much higher concurrency and better performance than Ruby for background processing and web applications; deploying a Ruby application using jRuby and a Java application server like Torquebox allows it to take advantage of the reliability, scalability and deployment features of the Java platform.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1SJ7PSV.
Alex Blewitt talks about Swift, the open source released in December 2015 and available on Linux as well as OSX and iOS. He looks at the open-source project, how applications and libraries can be built for both platforms, the differences between the different builds and how Swift works under the hood. Filmed at qconlondon.com.
Alex Blewitt has over 20 years of experience in Objective-C and has been using Apple frameworks since NeXTSTEP 3.0. He currently works for a financial company in London and writes for the online technology news site InfoQ, as well as other books for Packt Publishing. He also has a number of apps on the App Store through Bandlem Limited.
Making Symfony Services async with RabbitMq (and more Symfony)Gaetano Giunta
This document discusses using RabbitMQ and Symfony to generate Microsoft Office documents asynchronously from XML content. Currently, using just LibreOffice is slow, unreliable, and does not scale well. The proposed solution is to use RabbitMQ with Symfony services to queue document generation jobs and process them in parallel with multiple worker processes. This improves performance, reliability and allows the process to scale. Some challenges that still need to be addressed are network security, throughput and determining if a existing solution could be used instead of a custom one.
This document discusses why Ruby is a good programming language for security projects. It provides examples of security tools and frameworks built with Ruby, including Metasploit, BeEF, Arachni, Brakeman, WPScan, and RailsGoat. Ruby offers features like an easy-to-read syntax, package management with RubyGems, powerful object-oriented capabilities, platform independence, and support for domains like network protocols that make it well-suited for security applications.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1GHc3rO.
Alex Blewitt introduces the history behind Swift, why it was created, how it differs from Objective-C and how Swift is compiled and executed under the covers. Alex goes into details about how LLVM is used, the way that memory is managed, how objects are laid out, and a prediction of the way Swift and Objective-C will evolve over time. Filmed at qconlondon.com.
Dr Alex Blewitt has over 20 years of experience in Objective-C and has been using Apple frameworks since NeXTSTEP 3.0. He upgraded his NeXTstation for a TiBook when Apple released Mac OS X in 2001 and has been developing on it ever since. He is author of the recently published Swift Essentials.
This document discusses decoupling applications and scaling with enterprise messaging. It introduces messaging concepts like producers, consumers, and message brokers. It focuses on the AMQP protocol and RabbitMQ as a messaging implementation. Key points covered include RPC vs messaging styles, decoupling applications, cross-platform communication, and load balancing. The presenter demonstrates a messaging example using Java, CFML, Node.js, and JavaScript producers and consumers communicating via a RabbitMQ broker.
Erlang is a functional programming language built for concurrency, distribution, and fault tolerance. It uses an immutable data structure and avoids loops with tail recursion. The OTP framework provides tools like supervision trees, behaviors, and hot code swapping. While Erlang syntax looks like Prolog, it can integrate with Ruby via bridges or messaging and runs on Heroku. The document recommends resources for learning Erlang and OTP and participating in the local Erlang meetup.
Balázs Bucsay - XFLTReaT: Building a Tunnelhacktivity
XFLTReaT is an open-source tunnelling framework that handles all the boring stuff and offers the capability to the users to take care of only those things that matter. It provides significant improvements over existing tools. From now on there is no need to write a new tunnel for each and every protocol or to deal with interfaces and routing. Any protocol can be converted to a module, which works in a plug-and-play fashion; authentication and encryption can be configured and customised on all traffic and it is also worth mentioning that the framework was designed to be easy to configure, use and develop. In case there is a need to send packets over ICMP, RDP or SSH then this can be done in a matter of minutes, instead of developing a new tool from scratch. The potential use (or abuse) cases are plentiful, such as bypassing network restrictions of an ISP, the proxy of a workplace or obtaining Internet connectivity through bypassing captive portals in the middle of the Atlantic Ocean or at an altitude of 12km on an airplane.
This framework is not just a tool; it unites different technologies in the field of tunnelling. It will be show how to tunnel data over a Windows jumpbox utilising RDP (including the dirty low level "secrets") or how to exfiltrate data over ICMP from barely secured networks. We have simplified the whole process and created a framework that is responsible for everything but the communication itself, we rethought the old way of tunnelling and tried to give something new to the community. After the initial setup the framework takes care of everything. With the check functionality we can even find out, which module can be used on the network, there is no need for any low-level packet fu and hassle. I guarantee that you won’t be disappointed with the tool and the talk, actually you will be richer with an open-source tool.
EKON20 WorkShop, November 2016
The Open Source mORMot framework is a huge set of units, with a lot of features. It allows Delphi and FPC to eb true competitors for business projects. In this workshop, we will present how its ORM leverages SQL and NoSQL databases, and how interface-based services ease SOA development. We will show some several cross-cutting features, like SynTests (and stubs/mocks), SynLog, SynMustache, SynDB, SynMongoDB, SynSM, SynPDF, SynCrypto or SynEcc. High-level presentation of the involved concepts will always be followed by some sample code.
PostgreSQL - It's kind've a nifty databaseBarry Jones
This presentation was given to a company that makes software for churches that is considering a migration from SQL Server to PostgreSQL. It was designed to give a broad overview of features in PostgreSQL with an emphasis on full-text search, various datatypes like hstore, array, xml, json as well as custom datatypes, TOAST compression and a taste of other interesting features worth following up on.
An overview of Ruby, jRuby, Rails, Torquebox, and PostgreSQL that was presented as a 3 hour class to other programmers at The Ironyard (http://theironyard.com) in Greenville, SC in July of 2013. The Rails specific sections are mostly code samples that were explained during the session so the real focus of the slides is Ruby, "the rails way" / workflow / differentiators and PostgreSQL.
Barry Jones introduces himself as the instructor for the Ruby on Rails and PostgreSQL course. He has experience developing applications using various languages and databases. He wishes a course like this had been available when he took over a large Perl to Rails conversion project without knowing Rails or PostgreSQL, which led to issues he later had to fix. The goal of the course is to help students gain proficiency with Rails and PostgreSQL faster to avoid similar mistakes.
PostgreSQL has kept up the momentum around JSON with version 9.4 featuring JSONB as demand for working with unstructured data continues to grow. In this talk delivered during Postgres Open 2014, Vibhor Kumar, principal systems engineer at EnterpriseDB, offered some scenarios for working with JSON in PostgreSQL and demonstrated performance metrics. This session also gave some instruction on how to use different operations and explored comparisons to BSON.
The document discusses best practices for using RSpec, a testing library for Ruby projects. It provides examples of good and bad ways to write RSpec tests and describes techniques like using contexts and shared examples to organize tests and DRY up code. The document emphasizes testing edge cases, mocking only when needed, creating data dynamically in tests rather than using fixtures, and following practices like describing methods under test and having single-expectation tests. It encourages starting to use RSpec and provides contact information for the author to learn more.
Testing metrics provide objective measurements of software quality and the testing process. They measure attributes like test coverage, defect detection rates, and requirement changes. There are base metrics that directly capture raw data like test cases run and results, and calculated metrics that analyze the base metrics, like first run failure rates and defect slippage. Tracking these metrics throughout testing provides visibility into project readiness, informs management decisions, and identifies areas for improvement. Regular review and interpretation of the metrics is needed to understand their implications and make changes to the development lifecycle.
Multicore processors are becoming prevalent due to the limitations of increasing single core clock speeds. This presents challenges for software to effectively utilize multiple cores. Functional programming is one option that avoids shared state and parallel access issues, but requires a significant mindset shift. Refactoring existing code using tools is another option to incrementally introduce parallelism. Hybrid approaches combining paradigms may also help transition. Key application areas currently benefiting include servers, scientific computing, and packet processing. However, significant existing code is not easily parallelized and performance gains have yet to be fully realized.
Erlang factory SF 2011 "Erlang and the big switch in social games"Paolo Negri
talk given at erlang factory 2011 about using erlang to build social games backends
Watch the video of this presentation http://vimeo.com/22144057#at=0
Online games backend are challenging applications, a single user generates one http call every few seconds, usage volume can spike very quickly and balance between data read and write is close to 50/50 which make the use of write through cache or other common scaling approaches not so effective.
Follow how in our quest for a better architecture to serve millions of games sessions daily and reduce our resource usage we took the decision to write in Erlang our third generation game backend, see how we’re leveraging the actor model in order to change how we use and conceive our persistency layer. See also how introducing Erlang as a new tool in a company is working out, what we found hard from an organizational and technical point of view, which obstacle we hit and how as technical guys we convinced our management to take the risk of bringing in house a different technology.
This document discusses the benefits of using the Erlang programming language and its Open Telecommunications Platform (OTP) for building reliable server applications and services. It highlights key aspects of Erlang such as process isolation, easy process spawning and supervision, lightweight virtual machine, and built-in tools for debugging and hot code loading. Erlang processes are similar to operating system processes and can fail independently without bringing down the whole system. The OTP framework in Erlang provides behaviors and tools for declaring restart rules to automatically recover from failures without operator intervention.
This document provides an overview of Elixir and the Phoenix framework. It discusses how Elixir runs on the Erlang VM and inherits properties like high availability and distribution. Phoenix is introduced as a web framework for Elixir that focuses on productivity, reliability, and speed. Key Phoenix concepts like the request pipeline, router, controllers, models and views are briefly outlined.
This is the story of how we managed to scale and improve Tappsi’s RoR RESTful API to handle our ever-growing load - told from different perspectives: infrastructure, data storage tuning, web server tuning, RoR optimization, monitoring and architecture design.
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
The document discusses introducing polyglot and functional programming concepts to Java developers. It explains that while Java is a powerful language, other JVM languages can offer advantages like more rapid development, concise coding, and taking advantage of non-object oriented and dynamic approaches. It provides examples of using functional concepts like map and filter to more declaratively operate on collections of data in a Java program. The document suggests exposing developers to these concepts through libraries and by experimenting with other JVM languages.
Concurrent Programming with Ruby and Tuple Spacesluccastera
Ruby threads are limited due to the Global Interpreter Lock. Therefore, the best way to do parallel computing with Ruby is to use multiple processes but how do you get these processes to communicate?
This session will provide some strategies for handling multi-process communication in Ruby, with a focus on the use of TupleSpaces. A TupleSpace provides a repository of tuples that can be accessed concurrently to implement a Blackboard system. Ruby ships with a built-in implementation of a TupleSpace with the Rinda library.
During the session, Luc will demonstrate how to use Rinda and will highlight other libraries/projects that facilitate interprocess communication and parallel computing in Ruby.
The document discusses asynchronous programming with async and await in C#. It explains that async and await were introduced to address issues with threading like overhead and blocking. Async methods use threads efficiently from the thread pool rather than creating new threads. Await yields threads rather than blocking them. The document demonstrates async programming and best practices like using Task instead of async void. It recommends using async for I/O bound work since it can improve performance over synchronous code.
This document discusses concurrency and parallelism in Ruby. It defines concurrency as performing two operations in tandem, while parallelism refers to performing two operations literally at the same time using multiple cores. The document examines traditional approaches to concurrency like threads and locks in Ruby and their limitations. It advocates for adopting models from other languages like actors and software transactional memory that can provide safer concurrency through message passing and transactions rather than shared mutable state and locks. The document reviews several Ruby libraries that implement actors and proposes areas for further improvement in Ruby's core support for concurrent programming.
The document discusses modern Java concurrency. It introduces the topic and explains why developers may want to utilize modern Java concurrency features. It discusses the java.util.concurrent library and how it provides building blocks for concurrent and thread-safe code like ReentrantLock, Condition, ConcurrentHashMap. It provides examples of using constructs like CountDownLatch, ThreadPoolExecutor, ForkJoin to write concurrent applications in a safer and more performant way compared to traditional locking approaches.
This document provides an overview of concurrency and the Task module in Elixir. It introduces the speakers and defines concurrency as doing more than one thing at once. It discusses why concurrency is important for performance, flexibility, and expressiveness. It then covers the actor model and how Elixir supports actors via processes. It presents send and receive as low-level ways to communicate between processes, and introduces Task as a lightweight abstraction over processes. It provides examples of Task.async and Task.await for asynchronous work. It also demonstrates Task.async_stream for parallel processing of filenames into compressed files with checksums.
Speaker:
Alex Cruise (Dir. Architecture, Metafor Software)
Abstract:
The rise of the DevOps movement has brought into welcome focus something that is often learned only through painful experience and expense: the success of a software product critically depends not only on its implementation, maintenance and enhancement, but also on how it’s deployed and operated.
Distributed systems are hard, but you can’t escape them: you need to scale out, but wrapping proxy interfaces around remote resources so they look local is a recipe for a fragile system. Plus, as the complexity of components and services increases, local systems aren’t actually as reliable as we think! Concurrency is hard, but you can’t escape it: whether you’re using threads in a single process, or multiple processes on a single machine, you still need to synchronize state between them somehow. Fault tolerance is hard, but you can’t escape it: parts will fail, you need to cope without rebooting the whole application. Correctness is hard, but you can’t escape it: whether through laborious testing or a Sufficiently Advanced Compiler, you need to have some assurance that the software will work as intended.
Let’s talk about a set of architectural patterns (and, yes, frameworks) that can really help us achieve the goals of concurrency, fault tolerance and correctness, while affording us the flexibility we need to scale our deployments when we achieve terrifying success.
Oplægget blev holdt ved et seminar i InfinIT-interessegruppen Højniveausprog til Indlejrede Systemer den 2. oktober 2013. Læs mere om interessegruppen her: http://infinit.dk/dk/interessegrupper/hoejniveau_sprog_til_indlejrede_systemer/hoejniveau_sprog_til_indlejrede_systemer.htm
Scalable Game Servers talk I gave at TGC 2017
The slides describe the case for building distributed systems using a statteful architecture to achieve high throughput and low latency using Microsoft Orleans as the best provider and inventor of the virtual actor model.
http://github.com/dotnet/orleans
This document discusses parallel programming in .NET and provides an overview of the Task Parallel Library (TPL) and Parallel LINQ (PLINQ). It notes that multicore processors have existed for years but many developers are still writing single-threaded programs. The TPL scales concurrency dynamically across cores and handles partitioning work. PLINQ can improve performance of some queries by parallelizing across segments. Tasks represent asynchronous operations more efficiently than threads. The document provides examples of implicit and explicit task creation and running tasks in parallel using Parallel.Invoke or Task.Run.
This document introduces PostGIS, an extension to PostgreSQL that adds support for geographic objects allowing location queries to be run in SQL. It discusses geospatial data types and functions in PostGIS for working with spatial features like points, lines, polygons, and rasters. PostGIS allows importing and exporting geospatial data, integration with GIS software, and access to open mapping data sources. It also covers spatial queries and analysis in PostGIS using functions for distance, containment, intersections and more. Additional topics mentioned include pgRouting for routing/navigation, generating maps/images from PostGIS data, and real-world use cases.
This document provides an overview and review of relational database concepts and ActiveRecord functionality in Rails. It discusses the ACID principles of atomicity, consistency, isolation, and durability and how they are achieved. It also covers topics like transactions, locking, callbacks, associations, queries, and using the database console. The document aims to explain why following database rules ensures data integrity and discusses when it may be better to handle things in the database rather than just in Rails code.
My experiences combatting phishing and fraud using DMARC and assorted other techniques in a large eBay-like platform for a niche market...when the site previously did everything over direct user email...for over a decade.
A recap of some of the most interesting things learned from the AWS re:Invent 2013 Conference. Easily the most intense and educational conference I've ever attended.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
2. Who am I?
• Developer since 98
• Used to run Brightball
– Contract programming business using PHP
– 2008 – 2011
• R.I.P. Code one out for my homies
• PHP, Java, Perl, Python, Ruby, Groovy, Go
– Elixir
• And lots of databases #postgresql
3. So…another language…?
Rules for learning a language
– Must solve a problem
– Problem not addressed by
current stack
– “Fast” is not a purpose
• Lots of things are fast
– Should be the best solution
• If it’s not, I’d rather learn the
one that is…
I hate new languages
Yeah. Surprise.
4. So why the other languages?
• PHP
– Needed to build a site
– Clemson’s options were PHP / Perl
– Perl was badly supported
• Java
– Clemson CPSC
– Also…jobs are good
• Groovy
– Java environment
– Wanted to be productive
• Go
– Great concurrency
– Relatively simple
– Fast compilation
– Portability
– Solves some bloat problems
• Perl
– Sysadmin work
– Installed on all *nix derivatives
• including very old
– Best at text parsing
• Python
– Employer required it
• Ruby
– Incredible productivity
– Library ecosystem
– Monkey patching
– Rails
– Focus on dev efficiency
6. "Those who cannot remember the past are
condemned to repeat it."
- George Santayana
"What has been is what will be, and what has
been done is what will be done, and there is
nothing new under the sun."
- Solomon
7. Elixir isn’t new
• It’s more productive Erlang
• Compiles down to the BEAM (Erlang VM)
• Erlang was born in 1986 (Linux was 1991)
• Erlang/OTP is on version 19
• Erlang libraries work directly in Elixir
– And vice versa
8. Processor POWER!!!
• Industry focus used to be on Mhz/Ghz
• Growth was steady…but then stalled
• Industry shifted to multicore / concurrency
and trying to put it in their languages
• Lookup “Beowulf Cluster” to see how foreign
“parallel” was at the time
9. Funny thing…
“Any sufficiently complicated concurrent
program in another language contains an ad hoc
informally-specified bug-ridden slow
implementation of half of Erlang.”
- Robert Virding
10. Erlang view of the World
• Everything is a process.
• Processes are strongly isolated.
• Process creation and destruction is a lightweight operation.
• Message passing is the only way for processes to interact.
• Processes have unique names.
• If you know the name of a process you can send it a
message.
• Processes share no resources.
• Error handling is non-local.
• Processes do what they are supposed to do or fail.
11. Message Passing
• Process isolation and message passing
• Passing between threads, cores or machines is
transparent
• Microservice concept…but everywhere and
not terrible
12. “If Java is the right one to run anywhere, then
Erlang is the right one to run forever.”
– Joe Armstrong
13. What’s the big deal with Elixir?
• Ruby-like focus on developer productivity
• Functional programming made simple
• Embedded database
• Compiles down to code to run on the BEAM Virtual Machine
• BEAM/OTP is what Erlang runs on
• Erlang/BEAM is the best existing language for concurrency, consistency
and fault tolerance, hot code swapping
– Single Processor
– Multi Processor
– Distributed Multi Machine Cluster
• Erlang does not focus on developer productivity
– Writing Erlang kinda sucks...
• #1 Problem in Ruby is concurrency model
– Cannot be fixed. It’s the way the language works.
– Enables great things but also causes limitations
15. What’s the big deal?
• Facebook paid $22 billion for WhatsApp
• WhatsApp had $10 million in revenue
• What was the big deal?
– Erlang/OTP
– 2 million users / server
– No central relay point
– Scales horizontally
– Deploys w/o disconnect
16. AND HOW DOES ALL THIS WORK?
Why should you care?
17. Other languages
• Boot up
• Memory is shared
– Where leaks come from
– Changing shared memory requires a mutex lock
• Garbage collector periodically runs
– Pause entire stack
• Requests run in threads in the same process
– Threads are cooperatively scheduled
• Deployment means shutting down current code,
starting new code
18. Erlang/Elixir/OTP
• No memory is shared
• Data structures are immutable
• Each Erlang process (basically a light thread)
has its own HEAP
– Reclaimed on completion
• Code can be hot deployed
– New code runs next time it’s accessed (existing
code keeps running)
• Processes are prescheduled
19. Sound familiar?
• Difference is size of the allocations
– An Erlang process is 0.5 kb
– A Go goroutine is 2 kb (version 1.4)
– A Java thread is 1024 kb on 64 bit VM
– PHP request varies by how much is loaded
• Laravel averages 7-12mb / request
20. Programming Elixir, Chapter 15
Laptop w/ 4 cores and 4gb of RAM counting concurrently
1,000,000 processes =
• 0.48 gb in Elixir
• 1.91 gb in Golang (go routines)
• 977 gb in Java (threads)
• 6,836 gb in PHP (Laravel requests)
22. Quick History
• Linux was created in 1991
• Erlang was created in 1987 by Ericson
– Powers about half of global telecom
– Needed distributed, fault tolerant system
– Deploy updates without interrupting existing calls
– OTP = Open Telecom Protocol
– Erlang/OTP 19.0 release in June 2016
• Elixir was created in 2012 by Jose Valim
– Former Rails Core team member
– Elixir 1.3 released in June 2016
24. Immutable Data
• There’s no passing pointers
• Add something to a list, get a new list
• Everything is “message passing”
– Avoids mutex locks
– Enables per-process garbage collection
– Makes calling a function locally, in another process
or on another machine transparent
25. 3 Databases Built In
• ETS – Erlang Term Storage
– In memory table storage for a node
• DETS – Disk-based Erlang Term Storage
– Disk table storage for a node
• Mnesia - #awesome
– A relational/object hybrid data model that is suitable for telecommunications applications.
– A DBMS query language, Query List Comprehension (QLC) as an add-on library.
– Persistence. Tables can be coherently kept on disc and in the main memory.
– Replication. Tables can be replicated at several nodes.
– Atomic transactions. A series of table manipulation operations can be grouped into a single
atomic transaction.
– Location transparency. Programs can be written without knowledge of the actual data
location.
– Extremely fast real-time data searches.
– Schema manipulation routines. The DBMS can be reconfigured at runtime without stopping
the system.
https://blog.codeship.com/elixir-ets-vs-redis/
26. Preemptive Scheduling
• Context switching among running tasks and
has the power to preempt (interrupt) tasks
and resume them at a later time without the
cooperation of the preempted tasks.
• Cooperative: Running tasks voluntarily release
control
27. What does that mean?
• Response time consistency
• A tight loop or resource heavy process can’t
cannibalize resources
• Critical for real time systems
• Running a database inside your code would be
unreliable otherwise
28. Pattern Matching
=
iex> list = [1, 2, [ 3, 4, 5 ] ]
[1, 2, [3, 4, 5]]
iex> [a, b, c ] = list
[1, 2, [3, 4, 5]]
iex> a
1
iex> b
2
iex> c
[3, 4, 5]
Examples from
Programming Elixir 1.3
Works if left can be matched to right
iex> list = [1, 2, 3]
[1, 2, 3]
iex> [a, 1, b ] = list
** (MatchError) no match of right hand side
value: [1, 2, 3]
29. Pattern Matching Functions
defmodule Factorial do
def of(0), do: 1
def of(n), do: n * of(n-1)
end
defmodule PrintStuff do
def print({:error, stuff}) do
IO.puts “ERROR! #{stuff}”
end
def print({:ok, stuff}), do: IO.puts stuff
end
PrintStuff.print({:ok, stuff})
30. Loops?
• How do you have a for loop with an
immutable increment?
– Recursion. Lots of recursion.
32. Tail Call Optimization
defmodule TailRecursive do
def factorial(n), do: _fact(n, 1)
defp _fact(0, acc), do: acc
defp _fact(n, acc), do: _fact(n-1, acc*n)
end
# defp is private
If the last function called is itself, the
stack doesn’t grow.
33. Concurrency
pid = spawn(Object, :method, [vars])
# Creates a process
# returns the ID of the process
pid = spawn_link(Object, :method, [vars])
# Creates a process
# returns the ID of the process
# If the process dies, creator should too
34. Quick Example (from book)
defmodule Link2 do
import :timer, only: [ sleep: 1 ]
def sad_function do
sleep 500
exit(:boom)
end
def run do
spawn_link(Link2, :sad_function, [])
receive do
msg ->
IO.puts "MESSAGE RECEIVED: #{inspect msg}"
after 1000 ->
IO.puts "Nothing happened as far as I am concerned"
end
end
End
Link2.run
# The runtime reports the abnormal termination:
$ elixir -r link2.exs
** (EXIT from #PID<0.35.0>) :boom
35. That’s where we start
• Building blocks for best practice patterns
– GenServer
– Task (async/await)
– Agent (async / await + state)
– Supervisor / Worker
36. Fault Tolerance / Supervisors
• Applications operate as a Supervisor tree
• Process is created with another process
dedicated to monitoring it
• Worker process dies, it’s immediately
restarted in original state
– This is how Erlang applications can get
99.9999999% uptime (yes, 9 nines)
38. Error that could kill process?
• If you have an error that could kill a process…
– Make sure the process knows how to restart in a
desirable state
• Very different way of thinking about problems
39. Simple Supervision Example
> Math.Calculate.divide(10,2)
5.0
:ok
> Math.Calculate.divide(34,3)
11.333333333333334
:ok
> Math.Calculate.divide(34,0)
A BIG UGLY ERROR MESSAGE... BUT LITTLE DID YOU KNOW THE PROCESS WAS
RESTARTED AND LIVES!
> Math.Calculate.divide(34,2)
17.0
:OK
https://github.com/kblake/simple-supervision
41. Dialyzer
• Operators are not overridden
• + is always math
– What’s on either side of it is always a number
• Allows dynamic typing WITH compiler checks
• Best of both worlds, problems of neither
42. THIS ALL SEEMS REALLY
COMPLICATED
I know right? I’m just here for the web stuff
45. Rebuilt brightball.com
• Read about it
http://www.brightball.com/articles/insanity-
with-elixir-phoenix-postgresql
• Summary
– As a dynamic site it’s as fast as my static nginx site
– This is considered normal (and awesome)
47. Terraform
• Use in your current environment incrementally
– Put Phoenix in front of your app
– Route specific requests to Phoenix
– Pass the rest through to your current app
– Bundled Cowboy webserver used by Heroku, AWS
Cloudfront, Incapsula, etc…it good
• https://medium.com/@sugarpirate/rise-from-
the-ashes-incremental-apis-with-phoenix-
b08cd66bd142#.e1iojykq9
49. Nerves
• http://nerves-project.org/
• ElixirConf was about Phoenix and Nerves
• Nerves is for embedded software
• Fault tolerance, reliability, consistency seem
important for something like that…?
50. Functional Programming
• What are the gains?
– Readability / Maintainability
– No side effects code
– Simplified testing
– Simplified personnel turnover
– No object inheritance nightmares
– Clear separation of concerns
51. Objects…so dumb
• Data tied to Functions
– Breeds repetition
– Weird nesting
– Breeds repetition
– Modify up the tree
– Breeds repetition
• Separate the two
– Data structures
– Functions
– #mindblown
"Object oriented
programs are offered as
alternatives to correct
ones”
- Edsger W. Dijkstra
http://www.yegor256.com/2016/08/15/what-is-wrong-object-oriented-programming.html
52. Why is it the future?
• Nothing with a shared memory model can match it for distribution…ever
– You can’t pass a memory reference to another machine transparently
• Ruby like productivity
– Minus an eventual full rewrite expectation
• Extremely fast, small footprint, embeddable, consistent, reliable
• Low process overhead ideal for holding connections
• You can easily start SMALL, knowing you have all of the tools to grow/get
crazy when you need them
– Refactoring is just rearranging stuff (yes, really)
– Naturally avoids bloat
• Compiler tells you when stuff isn’t used to make cleanup easy
• But isn’t so strict that it forces you to change them
– Stop worrying about development time OR code performance tradeoffs
53. Which makes it ideal for…
• Server applications that talk to a lot of things…
• Like web sockets
• Internet of Things devices
• Real time communications
• Low latency applications
• Geographic distribution
– Cluster across data centers…yes, really.
• Avoiding bottlenecks
54. Resources
• Hack Greenville Slack #elixir-phoenix
• elixir-lang.org
– Books, chat, links, resources, groups
• phoenixframework.org
• Elixir Conf sessions on YouTube
– So much good stuff
– Using Phoenix w/ Riak Core
https://www.youtube.com/watch?v=sYYOLaJ-
VDQ&start=2&autoplay=1
55. More Resources
• Programming Elixir
• Programming Phoenix
• RedFour (fake company training)
• ElixirForums
• Assorted newsletters