In my first time at Russia, I've presented about Reactor Pattern, Eventmachine, WebSocket and the Pusher service as options for when Rails alone is not enough
Scalable Architecture Design
DEVIEW 2013 에서 발표한 "오픈소스를 활용한 분산 아키텍처 구현기술" 장표입니다.
Scalable Architecture 디자인을 위해 필요한 다양한 구현 기술 중 몇가지를 소개해 드립니다.
관련된 내용으로 문의 있으시면 메일로 연락 주세요~
Node.js is an asynchronous JavaScript runtime that allows for efficient handling of I/O operations. The presentation discusses developing with Node.js by using modules from NPM, debugging with node-inspector, common pitfalls like blocking loops, and best practices like avoiding large heaps and offloading intensive tasks. Key Node.js modules demonstrated include Express for web frameworks and Socket.io for real-time applications.
The document discusses developing with vert.x. It provides steps for creating a URL shortener including developing modules with static web server and MongoDB, testing modules individually, creating an API server using EventBus, deploying modules with scripts, and easily testing with auto-deploy. It also briefly explains some key features of vert.x like asynchronous programming, modularity, and polyglot programming.
Workshop delivered at Mobos 2013 (http://romobos.com/) (building real-time applications with android socket.io and node.js)
Servers with Event Machine - David Troy - RailsConf 2011David Troy
EventMachine allows Ruby programs to handle many concurrent connections without blocking or threads. It uses an asynchronous model where callbacks are invoked in response to I/O events like incoming connections or data. EventMachine provides a high performance non-blocking TCP server that handles all I/O with callbacks rather than blocking. It can be used to build scalable I/O intensive applications like email servers that handle thousands of concurrent connections in a single Ruby process. The key is to never block the EventMachine reactor loop.
HTML5 introduces new security risks due to features like client-side storage, geolocation, web sockets, and cross-origin resource sharing. Attackers could exploit these to launch cross-site scripting attacks, SQL injection, poison application caches, perform clickjacking, and more. While HTML5 aims to improve security with features like sandboxing, current implementations remain vulnerable. As HTML5 adds functionality, more security issues are likely to emerge that require ongoing investigation and remediation.
The document summarizes topics related to distributed and scalable server architecture. It discusses consistent hashing for load balancing across servers, using ZooKeeper as a distributed coordinator to manage server nodes, and implementing a reverse proxy server in Vert.x. It also covers shared data management using Redis clusters, building modular applications, and managing large numbers of connections.
0-60 with Goliath: High performance web servicesIlya Grigorik
This document discusses Goliath, an open source Ruby web framework for building high performance web services. It provides an overview of Goliath's architecture and goals of optimizing for performance through an asynchronous event-driven model. Key topics covered include HTTP pipelining and keep-alive, the EventMachine reactor loop, and Goliath's minimal client API.
0-60 with Goliath: Building High Performance Ruby Web-ServicesIlya Grigorik
The document discusses Goliath, an open source Ruby web framework for building high-performance web services. It provides an overview of Goliath's features like asynchronous HTTP processing, routing, middleware, streaming responses and websockets. Examples are given showing how to write simple Goliath applications and APIs. The document also discusses how Goliath enables building asynchronous apps using techniques like EventMachine and Fibers.
Plack is a superglue for Perl web frameworks that provides a common interface called PSGI (Perl Server Gateway Interface). PSGI allows any web application that returns status, headers, and content to work with any PSGI-compliant web server without needing server-specific code. Plack provides middleware, servers, and tools to develop and run PSGI applications. It allows frameworks like Catalyst, Dancer, and CGI::Application to run on many web servers like Starman, Twiggy, and mod_psgi without changes to framework code.
Faster & Greater Messaging System HornetQ zzzJBug Italy
This document provides an overview of HornetQ, an open source messaging system. It describes key features of HornetQ including its core architecture, modes of operation in both standalone and JBoss EAP environments, transport options, persistence, flow control, clustering, high availability, and support for large messages. Performance benchmarks are cited showing HornetQ can process over 8 million messages per second, significantly outperforming other messaging systems.
Bob McWhirter is a JBoss Fellow and Chief Architect of Middleware Cloud Computing. He founded The Codehaus, Drools, and TorqueBox. The document discusses BoxGrinder, a tool that can create virtual machine appliances from definition files in order to simplify deploying software to infrastructure platforms like Amazon EC2 or VMware. It describes how BoxGrinder supports both "baking" and "frying" approaches to creating VMs and walks through an example of using BoxGrinder to build a JBoss application server appliance.
This document discusses Apache httpd reverse proxies and Tomcat. It covers why to use a proxy, common proxy protocols like AJP, HTTP/HTTPS, and HTTP/2. It also provides configuration examples for mod_jk, mod_proxy_ajp, and mod_proxy_http when using Apache httpd as a reverse proxy for Tomcat. Performance comparisons are shown between mod_jk, mod_proxy, and Nginx. The document concludes that a proxy is useful for load balancing, protocol upgrades, and SSL termination between the application server and internet.
This document discusses deployment strategies for Ruby on Rails applications. It covers common components of the "Rails stack" including databases, caching, application servers and load balancers. Popular options are mentioned like Nginx, Memcached, Mongrel and Capistrano. Performance optimization techniques are also summarized, such as caching, background processing and memory usage strategies. The document concludes with an overview of common deployment processes and challenges.
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Ontico
This document discusses building a distributed data ingestion system using RabbitMQ. It introduces RabbitMQ as a multi-protocol, polyglot messaging broker. The document then outlines some issues with a naïve ad-hoc solution to distributing data and proposes using RabbitMQ federation to address these issues. It provides an overview of how RabbitMQ federation works and how to configure it. Finally, it discusses additional RabbitMQ features like sharded queues and federated queues that can help scale the system.
Apache httpd v2.4 is well-suited for cloud environments due to improvements that increase performance, flexibility, and dynamic configuration capabilities. It has been enhanced as a reverse proxy with load balancing and support for additional protocols. Benchmark tests show that for transaction speed, the prefork MPM performs best, though other MPMs are on par for concurrency. Apache remains a robust and customizable web server option.
Supercharging reflective libraries with InvokeDynamicIan Robertson
This document discusses using invokeDynamic to generate bytecode at runtime in order to bypass access restrictions when using reflection. It describes how invokeDynamic works, including how bootstrap methods are used to create method handles which are then wrapped in call sites. Examples are provided of bootstrap methods for accessing fields and calling methods via reflection while avoiding the performance penalties of traditional reflection. Overall, invokeDynamic allows generating bytecode that performs equivalently to handwritten code.
TorqueBox allows Ruby applications to leverage the Java Application Server and Java EE services by running Ruby code on JRuby and integrating it with the underlying Java platform. It provides services like messaging, caching, background jobs, and more to Ruby applications. TorqueBox handles the integration between Ruby frameworks/APIs and the corresponding Java APIs and services, allowing Ruby developers to build enterprise applications that scale.
TorqueBox allows mixing Java and Ruby by running Ruby code on the Java Virtual Machine (JVM). It provides Ruby applications access to enterprise Java features like JNDI, JMS, Quartz, and more. TorqueBox applications can be deployed to JBoss Application Server with these Java services and capabilities.
When Ruby Meets Java - The Power of Torqueboxrockyjaiswal
This document discusses TorqueBox, an open source platform that allows Ruby on Rails applications to run on the Java Virtual Machine (JVM) and take advantage of Java libraries and services. It highlights features like scheduling, services, messaging, background jobs, clustering, caching and performance. The document includes code samples and discusses how TorqueBox makes these enterprise features easy to use from Ruby. It also notes some risks of using an emerging technology but says the documentation is good and help is available online.
"Swoole: double troubles in c", Alexandr VronskiyFwdays
Practices in using Swoole ecosystem & migration real production marketplace app to async approach. Which benefits we got and what problems happens on stack with PHP8, Postgresql, Redis, RebbitMQ, Doctrine, coroutines/fibers, concurrency HTTP Server.
This document discusses testing code written for mruby, a lightweight Ruby implementation. It proposes using the mruby runtime itself to test code, rather than Ruby, by using the mruby-mtest library. This allows testing mruby code directly using the same binaries and libraries as production. Sample code shows how to structure tests and set up a test runner to execute tests against the mruby binary. Testing code with mruby provides faster, more direct testing compared to using Ruby.
The Future of library dependency management of RubyHiroshi SHIBATA
The document discusses the integration of package management in Ruby. It provides an overview of RubyGems and Bundler, the two main tools for managing library dependencies in Ruby. It also outlines the roadmap for further integrating RubyGems and Bundler, including merging RubyGems 3.2 into Ruby 2.8 and moving Bundler's canonical repository to RubyGems.org. Additionally, it discusses challenges around dependency resolution compatibility and activation of default gems between different versions of RubyGems and Bundler.
This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.
This document discusses strategies for using Node.js alongside Java/Spring applications. It introduces J2V8, which allows running Node.js modules and the V8 JavaScript engine in Java. Examples are given for isomorphic React rendering using Nashorn or Node.js. The document also covers using Nashorn or script templating engines like EJS directly in Spring MVC. Performance benchmarks show J2V8 templating is faster than traditional Java approaches like JSP or Thymeleaf. Source code examples demonstrate setting up J2V8 with Spring Boot for building isomorphic web applications that leverage both Java and JavaScript.
The document discusses OWASP Zed Attack Proxy (ZAP), a free and open source web application security scanner. It can be used by pentesters, developers, and testers to detect vulnerabilities. ZAP passively and actively scans applications to find issues. It can be integrated into CI/CD pipelines and automated with APIs, command line tools, and programming libraries. The document provides examples of using ZAP to perform passive scanning, active scanning, and automation for testers.
This document discusses deployment strategies for Rails applications. It describes using Nginx as a front-end HTTP server with Mongrel as the application server. Capistrano is recommended for deployment automation. Caching at the page, action and fragment level with Memcached is also covered as a strategy for improving performance. Challenges discussed include Ruby threading and memory management issues, as well as integrating C extensions and ensuring interoperability. Installation details are provided for deploying a Rails app with Passenger on Apache. Benchmarks are mentioned comparing Mongrel, Thin and Passenger.
The HTML5 WebSocket API allows for true full-duplex communication between a client and server. It uses the WebSocket protocol which provides a standardized way for the client to "upgrade" an HTTP connection to a WebSocket connection, allowing for messages to be sent in either direction at any time with very little overhead. This enables real-time applications that were previously difficult to achieve with traditional HTTP requests. Common server implementations include Kaazing WebSocket Gateway, Jetty, and Node.js. The JavaScript API provides an easy way for clients to connect, send, and receive messages via a WebSocket connection.
0-60 with Goliath: Building High Performance Ruby Web-ServicesIlya Grigorik
The document discusses Goliath, an open source Ruby web framework for building high-performance web services. It provides an overview of Goliath's features like asynchronous HTTP processing, routing, middleware, streaming responses and websockets. Examples are given showing how to write simple Goliath applications and APIs. The document also discusses how Goliath enables building asynchronous apps using techniques like EventMachine and Fibers.
Plack is a superglue for Perl web frameworks that provides a common interface called PSGI (Perl Server Gateway Interface). PSGI allows any web application that returns status, headers, and content to work with any PSGI-compliant web server without needing server-specific code. Plack provides middleware, servers, and tools to develop and run PSGI applications. It allows frameworks like Catalyst, Dancer, and CGI::Application to run on many web servers like Starman, Twiggy, and mod_psgi without changes to framework code.
Faster & Greater Messaging System HornetQ zzzJBug Italy
This document provides an overview of HornetQ, an open source messaging system. It describes key features of HornetQ including its core architecture, modes of operation in both standalone and JBoss EAP environments, transport options, persistence, flow control, clustering, high availability, and support for large messages. Performance benchmarks are cited showing HornetQ can process over 8 million messages per second, significantly outperforming other messaging systems.
Bob McWhirter is a JBoss Fellow and Chief Architect of Middleware Cloud Computing. He founded The Codehaus, Drools, and TorqueBox. The document discusses BoxGrinder, a tool that can create virtual machine appliances from definition files in order to simplify deploying software to infrastructure platforms like Amazon EC2 or VMware. It describes how BoxGrinder supports both "baking" and "frying" approaches to creating VMs and walks through an example of using BoxGrinder to build a JBoss application server appliance.
This document discusses Apache httpd reverse proxies and Tomcat. It covers why to use a proxy, common proxy protocols like AJP, HTTP/HTTPS, and HTTP/2. It also provides configuration examples for mod_jk, mod_proxy_ajp, and mod_proxy_http when using Apache httpd as a reverse proxy for Tomcat. Performance comparisons are shown between mod_jk, mod_proxy, and Nginx. The document concludes that a proxy is useful for load balancing, protocol upgrades, and SSL termination between the application server and internet.
This document discusses deployment strategies for Ruby on Rails applications. It covers common components of the "Rails stack" including databases, caching, application servers and load balancers. Popular options are mentioned like Nginx, Memcached, Mongrel and Capistrano. Performance optimization techniques are also summarized, such as caching, background processing and memory usage strategies. The document concludes with an overview of common deployment processes and challenges.
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Ontico
This document discusses building a distributed data ingestion system using RabbitMQ. It introduces RabbitMQ as a multi-protocol, polyglot messaging broker. The document then outlines some issues with a naïve ad-hoc solution to distributing data and proposes using RabbitMQ federation to address these issues. It provides an overview of how RabbitMQ federation works and how to configure it. Finally, it discusses additional RabbitMQ features like sharded queues and federated queues that can help scale the system.
Apache httpd v2.4 is well-suited for cloud environments due to improvements that increase performance, flexibility, and dynamic configuration capabilities. It has been enhanced as a reverse proxy with load balancing and support for additional protocols. Benchmark tests show that for transaction speed, the prefork MPM performs best, though other MPMs are on par for concurrency. Apache remains a robust and customizable web server option.
Supercharging reflective libraries with InvokeDynamicIan Robertson
This document discusses using invokeDynamic to generate bytecode at runtime in order to bypass access restrictions when using reflection. It describes how invokeDynamic works, including how bootstrap methods are used to create method handles which are then wrapped in call sites. Examples are provided of bootstrap methods for accessing fields and calling methods via reflection while avoiding the performance penalties of traditional reflection. Overall, invokeDynamic allows generating bytecode that performs equivalently to handwritten code.
TorqueBox allows Ruby applications to leverage the Java Application Server and Java EE services by running Ruby code on JRuby and integrating it with the underlying Java platform. It provides services like messaging, caching, background jobs, and more to Ruby applications. TorqueBox handles the integration between Ruby frameworks/APIs and the corresponding Java APIs and services, allowing Ruby developers to build enterprise applications that scale.
TorqueBox allows mixing Java and Ruby by running Ruby code on the Java Virtual Machine (JVM). It provides Ruby applications access to enterprise Java features like JNDI, JMS, Quartz, and more. TorqueBox applications can be deployed to JBoss Application Server with these Java services and capabilities.
When Ruby Meets Java - The Power of Torqueboxrockyjaiswal
This document discusses TorqueBox, an open source platform that allows Ruby on Rails applications to run on the Java Virtual Machine (JVM) and take advantage of Java libraries and services. It highlights features like scheduling, services, messaging, background jobs, clustering, caching and performance. The document includes code samples and discusses how TorqueBox makes these enterprise features easy to use from Ruby. It also notes some risks of using an emerging technology but says the documentation is good and help is available online.
"Swoole: double troubles in c", Alexandr VronskiyFwdays
Practices in using Swoole ecosystem & migration real production marketplace app to async approach. Which benefits we got and what problems happens on stack with PHP8, Postgresql, Redis, RebbitMQ, Doctrine, coroutines/fibers, concurrency HTTP Server.
This document discusses testing code written for mruby, a lightweight Ruby implementation. It proposes using the mruby runtime itself to test code, rather than Ruby, by using the mruby-mtest library. This allows testing mruby code directly using the same binaries and libraries as production. Sample code shows how to structure tests and set up a test runner to execute tests against the mruby binary. Testing code with mruby provides faster, more direct testing compared to using Ruby.
The Future of library dependency management of RubyHiroshi SHIBATA
The document discusses the integration of package management in Ruby. It provides an overview of RubyGems and Bundler, the two main tools for managing library dependencies in Ruby. It also outlines the roadmap for further integrating RubyGems and Bundler, including merging RubyGems 3.2 into Ruby 2.8 and moving Bundler's canonical repository to RubyGems.org. Additionally, it discusses challenges around dependency resolution compatibility and activation of default gems between different versions of RubyGems and Bundler.
This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.
This document discusses strategies for using Node.js alongside Java/Spring applications. It introduces J2V8, which allows running Node.js modules and the V8 JavaScript engine in Java. Examples are given for isomorphic React rendering using Nashorn or Node.js. The document also covers using Nashorn or script templating engines like EJS directly in Spring MVC. Performance benchmarks show J2V8 templating is faster than traditional Java approaches like JSP or Thymeleaf. Source code examples demonstrate setting up J2V8 with Spring Boot for building isomorphic web applications that leverage both Java and JavaScript.
The document discusses OWASP Zed Attack Proxy (ZAP), a free and open source web application security scanner. It can be used by pentesters, developers, and testers to detect vulnerabilities. ZAP passively and actively scans applications to find issues. It can be integrated into CI/CD pipelines and automated with APIs, command line tools, and programming libraries. The document provides examples of using ZAP to perform passive scanning, active scanning, and automation for testers.
This document discusses deployment strategies for Rails applications. It describes using Nginx as a front-end HTTP server with Mongrel as the application server. Capistrano is recommended for deployment automation. Caching at the page, action and fragment level with Memcached is also covered as a strategy for improving performance. Challenges discussed include Ruby threading and memory management issues, as well as integrating C extensions and ensuring interoperability. Installation details are provided for deploying a Rails app with Passenger on Apache. Benchmarks are mentioned comparing Mongrel, Thin and Passenger.
The HTML5 WebSocket API allows for true full-duplex communication between a client and server. It uses the WebSocket protocol which provides a standardized way for the client to "upgrade" an HTTP connection to a WebSocket connection, allowing for messages to be sent in either direction at any time with very little overhead. This enables real-time applications that were previously difficult to achieve with traditional HTTP requests. Common server implementations include Kaazing WebSocket Gateway, Jetty, and Node.js. The JavaScript API provides an easy way for clients to connect, send, and receive messages via a WebSocket connection.
How we use Varnish at Opera Software, from the beginning (2009) to now.
Presentation hold for the 5th Varnish Users Group meeting (VUG5) held in Paris on March 22nd 2012.
The document discusses Node.js and asynchronous I/O. It explains that Node.js is an asynchronous event-driven JavaScript runtime that uses a single-threaded model with non-blocking I/O to handle high volumes of simultaneous connections efficiently. It also discusses how Node.js handles asynchronous operations using an event loop and callback functions instead of blocking operations.
The document discusses Node.js and asynchronous I/O. It explains that Node.js is an asynchronous event-driven JavaScript runtime that uses a single-threaded model with non-blocking I/O to handle high volumes of simultaneous connections efficiently. It also discusses how Node.js handles asynchronous operations using an event loop and callback functions instead of blocking operations.
Isomorphic JavaScript applications can share the same code and run on both the front end and back end. It is also a spectrum containing applications that share minimal bits of validation logic with ones that share a bulk of the application code. Nashorn is a new JavaScript engine for Java that was released with Java 8. The Nashorn JavaScript engine makes isomorphic web apps on the JVM possible by allowing the exact same browser code to run on the server. This enables us to achieve the don’t-repeat-yourself (DRY) principle, by reducing repetition in a multitier architecture. This presentation covers the key concepts, rationale, and categories of Isomorphic JavaScript and how it makes your large applications maintainable.
The document discusses socket applications and real-time communication. It describes common examples like chat, live feeds, and games. It then explains the typical solution of using AJAX requests and the problems with that approach. The proposed solution is to use a multi-threaded model with asynchronous I/O and the reactor pattern to process requests while waiting for network responses. Various tools for implementing this pattern in Ruby and JavaScript are also mentioned, including Pusher, Socket.IO, and SocketStream.
Text Editors (Atom / Sublime)
Apache Server (sftp/ssh/php) – Todd's Server!
CPanel / Wordpress (server side details)
Working with any Web API (Mapping Example)
(facebook, linkedin, twitter, maps, d3.js, jquary)
JSON and HTML <img>
GIT http://www.github.com
Vert.x – The problem of real-time data bindingAlex Derkach
As the popularity of any event-driven application increases, the number of concurrent connections may increase. Applications that employ thread-per-client architecture, frustrate scalability by exhausting a server’s memory with excessive allocations and by exhausting a server’s CPU with excessive context-switching. One of obvious solutions, is exorcising blocking operations from such applications. Vert.x is event driven and non blocking toolkit, which may help you to achive this goal. In this talk, we are going to cover it’s core features and develop a primitive application using WebSockets, RxJava and Vert.x.
Writing highly scalable WebSocket using the Atmosphere Framework and Scalajfarcand
- The document discusses the Atmosphere Framework, an open-source Java library that allows web applications to communicate in real-time via WebSocket or Comet techniques.
- It provides a uniform API that hides the complexities of different browser and server WebSocket implementations and allows fallback to alternative techniques like Comet.
- The framework integrates with various Java web servers and frameworks and supports Servlet, RESTful, and native WebSocket APIs to build scalable real-time applications.
The document discusses the future of server-side JavaScript. It covers various Node.js frameworks and libraries that support both synchronous and asynchronous programming styles. CommonJS aims to provide interoperability across platforms by implementing synchronous proposals using fibers. Examples demonstrate how CommonJS allows for synchronous-like code while maintaining asynchronous behavior under the hood. Benchmarks show it has comparable performance to Node.js. The author advocates for toolkits over frameworks and continuing development of common standards and packages.
Presented at the Yahoo! Web Development Summit in December 2007. Comet is the new name for the old trick of streaming events down to the browser from the server. This talk introduces Comet and shows how, despite the terrifying browser tricks needed, it's actually now very simple to build against.
Node.js is an asynchronous event-driven JavaScript runtime that allows JavaScript to be used on the server-side. It uses a non-blocking I/O model that makes it suitable for real-time web applications. WebSockets provide a standardized way for the browser and server to establish two-way communication. However, not all browsers support WebSockets yet. Socket.io addresses this by providing a WebSocket-like experience across all browsers through fallbacks like long-polling. It allows real-time applications to be developed more easily.
Simon Willison gave a presentation on Comet, a technique for enabling live data updates in web applications. Comet allows a web server to push events to connected browsers in real-time. It has faced many technical challenges due to browser limitations. Key techniques discussed include streaming, long polling, and the Bayeaux protocol which provides a common way for Comet clients and servers to communicate. The presentation showed how to easily build a basic Comet application using Jetty and Dojo in just a few lines of code.
Ruby on Rails com certeza é a estrela que elevou Ruby ao patamar de linguagem praticamente obrigatória a todo programador moderno. Porém muitos esquecem que Rails não é a única forma de desenvolver aplicações Web e muitas vezes nem é a melhor opção. O Ecossistema Ruby evolui a passos largos, todos os novos frameworks Web em Ruby adotaram o padrão Rack, que facilita a interoperabilidade entre frameworks Ruby. Além disso muitos estão olhando para o mundo da alta concorrência com novas tecnologias como Node.JS, mas o mundo Ruby tem opções robustas e testadas em produção como EventMachine. Enfim, vamos tentar aumentar o leque de soluções web com Ruby, além do Rails, traçando um paralelo com a plataforma .NET.
The document describes Monkey, an open source HTTP server. It aims to be lightweight, fast, flexible and community-oriented while supporting embedded systems. Key features include HTTP/1.1, asynchronous sockets, Linux kernel support, multiple hardware architectures, and an indented configuration format. It uses a multi-layered architecture with worker threads for scheduling connections and tracking time. Plugins add functionality for logging, security, SSL, websockets and more. Benchmarks show it uses less memory than Nginx, Cherokee and Apache. Future plans include FastCGI, NoSQL support, URL rewriting and improved documentation. The project encourages community involvement through beta testing, artwork, documentation and coding.
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
WebSockets provide a standardized way for web browsers and servers to establish two-way communications channels over a single TCP connection. They allow for more efficient real-time messaging compared to older techniques like polling and long-polling. The WebSocket API defines client-side and server-side interfaces that allow for full-duplex communications that some popular Java application servers and web servers support natively. Common use cases that benefit from WebSockets include chat applications, online games, and real-time updating of social streams.
The document discusses how restrictions can lead to innovation. It provides examples of innovations throughout history that emerged from restrictions, such as Newton/Leibniz's calculus from the restrictions of 17th century mathematics. The document also contains a quote stating that innovation is making what was impossible yesterday possible today. It encourages the reader to think about how restrictions can drive new possibilities and solutions.
Meetup Nerdzão - English Talk about LanguagesFabio Akita
This document discusses the history and evolution of many programming languages from the 1950s to the present. It provides brief descriptions of important early languages like FORTRAN, ALGOL, LISP, SIMULA and COBOL. It then covers influential object-oriented, functional, logic and concurrent languages from the 1970s onward like Smalltalk, Prolog, Miranda, Erlang and Go. The document traces how each new language built upon ideas and concepts from earlier languages to advance the field of programming language design.
Elixir -Tolerância a Falhas para Adultos - GDG CampinasFabio Akita
Tolerância a Falhas para Adultos is a document about Elixir and distributed processing in 3 sentences or less:
It discusses concepts in Elixir like processes, message passing, and supervision trees to provide fault tolerance. It also covers distributing processing using libraries like Flow to partition and process large datasets across multiple nodes. The document provides an overview of key Elixir concepts for building distributed and fault tolerant applications.
Desmistificando Mitos de Tech Startups - Intercon 2017Fabio Akita
O documento desmistifica 10 mitos comuns sobre startups de tecnologia, incluindo que basta ter uma boa ideia ou produto, contratar "desenvolvedores 10x", trabalhar 24/7 e largar a faculdade. Ele argumenta que o sucesso requer aprender, praticar, melhorar constantemente e não se inspirar apenas em histórias de celebridades.
30 Days to Elixir and Crystal and Back to RubyFabio Akita
Presented at Ruby Dev Summit, a journey through learning Elixir, Crystal and making Ruby better in the process, and why Ruby still can compete in the Web.
Focada em jovens estudantes ou recém-formados para terem uma perspectiva sobre o que almejar na carreira de TI. Versão apresentada pela primeira vez no 6o meetup do Cricíuma Dev.
This is the opening keynote for the 1st edition of THE CONF (www.theconf.club). It has full presenter notes. The video recording will be available at InfoQ Brasil.
Desmistificando Mitos de Startups - Sebrae - APFabio Akita
O mundo de startups se tornou um grande show. A maioria não entende que a sorte tem um papel mais forte do que se imagina. E sem conhecimento, experiência e paciência, Não existe caminho simples para o sucesso.
A Journey through New Languages - Guru Sorocaba 2017Fabio Akita
The document discusses the process of scraping manga chapter and page URLs from a manga website. It defines a Workflow class that performs the scraping in stages - first fetching chapter URLs, then using those URLs to fetch URLs for each chapter's pages in parallel. Any errors encountered are captured. Once complete, it calculates the total number of pages scraped. The class uses Nokogiri to parse HTML responses and Typhoeus for asynchronous HTTP requests.
A Journey through New Languages - Locaweb Tech DayFabio Akita
An exercise started in 2014 going all the way to early 2016 of a simple crawler made in (ugly) Ruby first, then moving to Elixir, to Crystal and back to Ruby and what we can take out of it.
A Journey through new Languages - Intercon 2016Fabio Akita
Minha palestra apresentando minha jornada sobre um código Ruby feito com otimização prematura, passando por Elixir, Crystal e de volta ao Ruby, escrito da forma arquiteturalmente mais "correta" e que no final se tornou até mais performática.
Esta é a minha palestra "Premature Optimization" versão "Code-Only". #THECONFBR
The Open Commerce Conference - Premature Optimisation: The Root of All EvilFabio Akita
This is the talk I presented in NYC at the Spree Conference. It's about how we may be making bad decisions out of blindly following misleading pitches. To avoid it, we just need to go back to the basics of CS: Don't optimize prematurely. Here's how.
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Nikki Chapple
Session | Protecting Your Sensitive Data with Microsoft Purview: Practical Information Protection and DLP Strategies
Presenter | Nikki Chapple (MVP| Principal Cloud Architect CloudWay) & Ryan John Murphy (Microsoft)
Event | IRMS Conference 2025
Format | Birmingham UK
Date | 18-20 May 2025
In this closing keynote session from the IRMS Conference 2025, Nikki Chapple and Ryan John Murphy deliver a compelling and practical guide to data protection, compliance, and information governance using Microsoft Purview. As organizations generate over 2 billion pieces of content daily in Microsoft 365, the need for robust data classification, sensitivity labeling, and Data Loss Prevention (DLP) has never been more urgent.
This session addresses the growing challenge of managing unstructured data, with 73% of sensitive content remaining undiscovered and unclassified. Using a mountaineering metaphor, the speakers introduce the “Secure by Default” blueprint—a four-phase maturity model designed to help organizations scale their data security journey with confidence, clarity, and control.
🔐 Key Topics and Microsoft 365 Security Features Covered:
Microsoft Purview Information Protection and DLP
Sensitivity labels, auto-labeling, and adaptive protection
Data discovery, classification, and content labeling
DLP for both labeled and unlabeled content
SharePoint Advanced Management for workspace governance
Microsoft 365 compliance center best practices
Real-world case study: reducing 42 sensitivity labels to 4 parent labels
Empowering users through training, change management, and adoption strategies
🧭 The Secure by Default Path – Microsoft Purview Maturity Model:
Foundational – Apply default sensitivity labels at content creation; train users to manage exceptions; implement DLP for labeled content.
Managed – Focus on crown jewel data; use client-side auto-labeling; apply DLP to unlabeled content; enable adaptive protection.
Optimized – Auto-label historical content; simulate and test policies; use advanced classifiers to identify sensitive data at scale.
Strategic – Conduct operational reviews; identify new labeling scenarios; implement workspace governance using SharePoint Advanced Management.
🎒 Top Takeaways for Information Management Professionals:
Start secure. Stay protected. Expand with purpose.
Simplify your sensitivity label taxonomy for better adoption.
Train your users—they are your first line of defense.
Don’t wait for perfection—start small and iterate fast.
Align your data protection strategy with business goals and regulatory requirements.
💡 Who Should Watch This Presentation?
This session is ideal for compliance officers, IT administrators, records managers, data protection officers (DPOs), security architects, and Microsoft 365 governance leads. Whether you're in the public sector, financial services, healthcare, or education.
🔗 Read the blog: https://nikkichapple.com/irms-conference-2025/
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Peter Bittner
How do you onboard new colleagues in 2025? How long does it take? Would you love a standardized setup under version control that everyone can customize for themselves? A stable desktop setup, reinstalled in just minutes. It can be done.
This talk was given in Italian, 29 May 2025, at PyCon 25, Bologna, Italy. All slides are provided in English.
Original slides at https://slides.com/bittner/pycon25-nixos-for-python-developers
Agentic AI - The New Era of IntelligenceMuzammil Shah
This presentation is specifically designed to introduce final-year university students to the foundational principles of Agentic Artificial Intelligence (AI). It aims to provide a clear understanding of how Agentic AI systems function, their key components, and the underlying technologies that empower them. By exploring real-world applications and emerging trends, the session will equip students with essential knowledge to engage with this rapidly evolving area of AI, preparing them for further study or professional work in the field.
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPathCommunity
Join the UiPath Community Berlin (Virtual) meetup on May 27 to discover handy Studio Tips & Tricks and get introduced to UiPath Insights. Learn how to boost your development workflow, improve efficiency, and gain visibility into your automation performance.
📕 Agenda:
- Welcome & Introductions
- UiPath Studio Tips & Tricks for Efficient Development
- Best Practices for Workflow Design
- Introduction to UiPath Insights
- Creating Dashboards & Tracking KPIs (Demo)
- Q&A and Open Discussion
Perfect for developers, analysts, and automation enthusiasts!
This session streamed live on May 27, 18:00 CET.
Check out all our upcoming UiPath Community sessions at:
👉 https://community.uipath.com/events/
Join our UiPath Community Berlin chapter:
👉 https://community.uipath.com/berlin/
As data privacy regulations become more pervasive across the globe and organizations increasingly handle and transfer (including across borders) meaningful volumes of personal and confidential information, the need for robust contracts to be in place is more important than ever.
This webinar will provide a deep dive into privacy contracting, covering essential terms and concepts, negotiation strategies, and key practices for managing data privacy risks.
Whether you're in legal, privacy, security, compliance, GRC, procurement, or otherwise, this session will include actionable insights and practical strategies to help you enhance your agreements, reduce risk, and enable your business to move fast while protecting itself.
This webinar will review key aspects and considerations in privacy contracting, including:
- Data processing addenda, cross-border transfer terms including EU Model Clauses/Standard Contractual Clauses, etc.
- Certain legally-required provisions (as well as how to ensure compliance with those provisions)
- Negotiation tactics and common issues
- Recent lessons from recent regulatory actions and disputes
Introducing the OSA 3200 SP and OSA 3250 ePRCAdtran
Adtran's latest Oscilloquartz solutions make optical pumping cesium timing more accessible than ever. Discover how the new OSA 3200 SP and OSA 3250 ePRC deliver superior stability, simplified deployment and lower total cost of ownership. Built on a shared platform and engineered for scalable, future-ready networks, these models are ideal for telecom, defense, metrology and more.
Jira Administration Training – Day 1 : IntroductionRavi Teja
This presentation covers the basics of Jira for beginners. Learn how Jira works, its key features, project types, issue types, and user roles. Perfect for anyone new to Jira or preparing for Jira Admin roles.
Improving Developer Productivity With DORA, SPACE, and DevExJustin Reock
Ready to measure and improve developer productivity in your organization?
Join Justin Reock, Deputy CTO at DX, for an interactive session where you'll learn actionable strategies to measure and increase engineering performance.
Leave this session equipped with a comprehensive understanding of developer productivity and a roadmap to create a high-performing engineering team in your company.
Data Virtualization: Bringing the Power of FME to Any ApplicationSafe Software
Imagine building web applications or dashboards on top of all your systems. With FME’s new Data Virtualization feature, you can deliver the full CRUD (create, read, update, and delete) capabilities on top of all your data that exploit the full power of FME’s all data, any AI capabilities. Data Virtualization enables you to build OpenAPI compliant API endpoints using FME Form’s no-code development platform.
In this webinar, you’ll see how easy it is to turn complex data into real-time, usable REST API based services. We’ll walk through a real example of building a map-based app using FME’s Data Virtualization, and show you how to get started in your own environment – no dev team required.
What you’ll take away:
-How to build live applications and dashboards with federated data
-Ways to control what’s exposed: filter, transform, and secure responses
-How to scale access with caching, asynchronous web call support, with API endpoint level security.
-Where this fits in your stack: from web apps, to AI, to automation
Whether you’re building internal tools, public portals, or powering automation – this webinar is your starting point to real-time data delivery.
Securiport is a border security systems provider with a progressive team approach to its task. The company acknowledges the importance of specialized skills in creating the latest in innovative security tech. The company has offices throughout the world to serve clients, and its employees speak more than twenty languages at the Washington D.C. headquarters alone.
Neural representations have shown the potential to accelerate ray casting in a conventional ray-tracing-based rendering pipeline. We introduce a novel approach called Locally-Subdivided Neural Intersection Function (LSNIF) that replaces bottom-level BVHs used as traditional geometric representations with a neural network. Our method introduces a sparse hash grid encoding scheme incorporating geometry voxelization, a scene-agnostic training data collection, and a tailored loss function. It enables the network to output not only visibility but also hit-point information and material indices. LSNIF can be trained offline for a single object, allowing us to use LSNIF as a replacement for its corresponding BVH. With these designs, the network can handle hit-point queries from any arbitrary viewpoint, supporting all types of rays in the rendering pipeline. We demonstrate that LSNIF can render a variety of scenes, including real-world scenes designed for other path tracers, while achieving a memory footprint reduction of up to 106.2x compared to a compressed BVH.
https://arxiv.org/abs/2504.21627
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...James Anderson
The Quantum Apocalypse: A Looming Threat & The Need for Post-Quantum Encryption
We explore the imminent risks posed by quantum computing to modern encryption standards and the urgent need for post-quantum cryptography (PQC).
Bio: With 30 years in cybersecurity, including as a CISO, Tommy is a strategic leader driving security transformation, risk management, and program maturity. He has led high-performing teams, shaped industry policies, and advised organizations on complex cyber, compliance, and data protection challenges.
Co-Constructing Explanations for AI Systems using ProvenancePaul Groth
Explanation is not a one off - it's a process where people and systems work together to gain understanding. This idea of co-constructing explanations or explanation by exploration is powerful way to frame the problem of explanation. In this talk, I discuss our first experiments with this approach for explaining complex AI systems by using provenance. Importantly, I discuss the difficulty of evaluation and discuss some of our first approaches to evaluating these systems at scale. Finally, I touch on the importance of explanation to the comprehensive evaluation of AI systems.
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Lorenzo Miniero
Slides for my "Multistream support in the Janus SIP and NoSIP plugins" presentation at the OpenSIPS Summit 2025 event.
They describe my efforts refactoring the Janus SIP and NoSIP plugins to allow for the gatewaying of an arbitrary number of audio/video streams per call (thus breaking the current 1-audio/1-video limitation), plus some additional considerations on what this could mean when dealing with application protocols negotiated via SIP as well.
Toster - Understanding the Rails Web Model and Scalability Options
1. “ Genius is the gold in the mine; talent is
the miner who works and brings it out. ”
Lady Marguerite Blessington
Donets Basin
Coal Mine-Ukraine
2. “ Genius is the gold in the mine; talent is
the miner who works and brings it out. ”
Lady Marguerite Blessington
Презентация начнется в
течение нескольких минут ...
Donets Basin
Coal Mine-Ukraine
18. require 'rubygems'
require 'rack'
class Test
def call(env)
sleep 1 # on purpose, simulating a blocking operation
[200, {"Content-Type" => "text/plain"},
["Hello World!"]]
end
end
Rack::Handler::Thin.run Test.new
19. require 'rubygems'
require 'rack'
class Test
def call(env)
sleep 1 # on purpose, simulating a blocking operation
[200, {"Content-Type" => "text/plain"},
["Hello World!"]]
end
end
Rack::Handler::Thin.run Test.new
20. $ rackup config.ru
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:8080, CTRL+C to stop
21. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 10.020 seconds
...
Requests per second: 1.00 [#/sec] (mean)
Time per request: 1002.015 [ms] (mean)
Time per request: 1002.015 [ms] (mean, across all concurrent requests)
Transfer rate: 0.12 [Kbytes/sec] received
...
22. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 10.020 seconds
...
Requests per second: 1.00 [#/sec] (mean)
Time per request: 1002.015 [ms] (mean)
Time per request: 1002.015 [ms] (mean, across all concurrent requests)
Transfer rate: 0.12 [Kbytes/sec] received
...
23. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 10.020 seconds
...
Requests per second: 1.00 [#/sec] (mean)
Time per request: 1002.015 [ms] (mean)
Time per request: 1002.015 [ms] (mean, across all concurrent requests)
Transfer rate: 0.12 [Kbytes/sec] received
...
24. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 10.020 seconds
...
Requests per second: 1.00 [#/sec] (mean)
Time per request: 1002.015 [ms] (mean)
Time per request: 1002.015 [ms] (mean, across all concurrent requests)
Transfer rate: 0.12 [Kbytes/sec] received
...
25. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 10.020 seconds
...
Requests per second: 1.00 [#/sec] (mean)
Time per request: 1002.015 [ms] (mean)
Time per request: 1002.015 [ms] (mean, across all concurrent requests)
Transfer rate: 0.12 [Kbytes/sec] received
...
30. Ruby Enterprise Edition 1.8.7 Copy on Write patched
(about to be deprecated) mark and sweep GC
Ruby 1.9.2 (current) mark and sweep GC
Ruby 1.9.3 (transitioning) Lazy Sweep GC
Copy on Write compatible
Ruby 2.0 (future)
Bitmap Marking GC
31. Ruby Enterprise Edition 1.8.7 Copy on Write patched
(about to be deprecated) mark and sweep GC
Ruby 1.9.2 (current) mark and sweep GC
Ruby 1.9.3 (transitioning) Lazy Sweep GC
Copy on Write compatible
Ruby 2.0 (future)
Bitmap Marking GC
32. Ruby Enterprise Edition 1.8.7 Copy on Write patched
(about to be deprecated) mark and sweep GC
Ruby 1.9.2 (current) mark and sweep GC
Ruby 1.9.3 (transitioning) Lazy Sweep GC
Copy on Write compatible
Ruby 2.0 (future)
Bitmap Marking GC
33. Ruby Enterprise Edition 1.8.7 Copy on Write patched
(about to be deprecated) mark and sweep GC
Ruby 1.9.2 (current) mark and sweep GC
Ruby 1.9.3 (transitioning) Lazy Sweep GC
Copy on Write compatible
Ruby 2.0 (future)
Bitmap Marking GC
41. Notifications and Events in general
Online Gaming
Chatting and Presence
Collaborative Applications
Advanced and more Interactive UI
42. (function poll(){
$.ajax({ url: "server", success: function(data){
// do something with the received ‘data’
//Setup the next poll recursively
poll();
}, dataType: "json"});
})();
43. (function poll(){
setTimeout(function(){
$.ajax({ url: "server", success: function(data){
// do something with the received ‘data’
//Setup the next poll recursively
poll();
}, dataType: "json"});
}, 5000);
})();
48. W3C/IETF Standard - RFC 6455
(12/2011)
Full duplex persistent communication channel
Less overhead than HTTP
(down to 2 bytes per frame)
No latency (no reconnections)
No polling overhead (on demand)
“Upgrades” HTTP, uses 80/443
(kind of friendly to existing proxies)
74. require 'rubygems'
require 'rack'
class Test
def call(env)
sleep 1 # on purpose, simulating a blocking operation
[200, {"Content-Type" => "text/plain"},
["Hello World!"]]
end
end
Rack::Handler::Thin.run Test.new
75. require 'rubygems'
require 'rack'
class Test
def call(env)
EM.defer do
sleep 1 # CPU bound, throw to thread-pool (cheating)
end
[200, {"Content-Type" => "text/plain"},
["Hello World!"]]
end
end
Rack::Handler::Thin.run Test.new
76. require 'rubygems'
require 'rack'
class Test
def call(env)
EM.defer do
sleep 1 # CPU bound, throw to thread-pool (cheating)
end
[200, {"Content-Type" => "text/plain"},
["Hello World!"]]
end
end
Rack::Handler::Thin.run Test.new
77. require 'rubygems'
require 'rack'
class Test
def call(env)
EM.defer do
sleep 1 # CPU bound, throw to thread-pool (cheating)
end
[200, {"Content-Type" => "text/plain"},
["Hello World!"]]
end
end
Rack::Handler::Thin.run Test.new
78. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 0.003 seconds
...
Requests per second: 3219.58 [#/sec] (mean)
Time per request: 0.311 [ms] (mean)
Time per request: 0.311 [ms] (mean, across all concurrent requests)
Transfer rate: 380.44 [Kbytes/sec] received
...
79. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 0.003 seconds
...
Requests per second: 3219.58 [#/sec] (mean)
Time per request: 0.311 [ms] (mean)
Time per request: 0.311 [ms] (mean, across all concurrent requests)
Transfer rate: 380.44 [Kbytes/sec] received
...
80. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 0.003 seconds
...
Requests per second: 3219.58 [#/sec] (mean)
Time per request: 0.311 [ms] (mean)
Time per request: 0.311 [ms] (mean, across all concurrent requests)
Transfer rate: 380.44 [Kbytes/sec] received
...
81. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 0.003 seconds
...
Requests per second: 3219.58 [#/sec] (mean)
Time per request: 0.311 [ms] (mean)
Time per request: 0.311 [ms] (mean, across all concurrent requests)
Transfer rate: 380.44 [Kbytes/sec] received
...
82. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 1
Time taken for tests: 0.003 seconds
...
Requests per second: 3219.58 [#/sec] (mean)
Time per request: 0.311 [ms] (mean)
Time per request: 0.311 [ms] (mean, across all concurrent requests)
Transfer rate: 380.44 [Kbytes/sec] received
...
83. ab -n 10 -c 1 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
#ZOMG!
...
Concurrency Level: 1
Time taken for tests: 0.003 seconds
...
Requests per second: 3219.58 [#/sec] (mean)
Time per request: 0.311 [ms] (mean)
Time per request: 0.311 [ms] (mean, across all concurrent requests)
Transfer rate: 380.44 [Kbytes/sec] received
...
84. ab -n 10 -c 10 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 10
Time taken for tests: 0.002 seconds
...
Requests per second: 5211.05 [#/sec] (mean)
Time per request: 1.919 [ms] (mean)
Time per request: 0.192 [ms] (mean, across all concurrent requests)
Transfer rate: 615.76 [Kbytes/sec] received
...
86. Block Non-Block
Total Time 10 sec 0.0001 sec
Requests per
Second 1 + 8000
87. Block Non-Block
Total Time 10 sec 0.0001 sec
Requests per
Second 1 + 8000
88. Block Non-Block
Total Time 10 sec 0.0001 sec
Requests per
Second 1 + 8000
90. require 'rubygems' # or use Bundler.setup
require 'eventmachine'
class EchoServer < EM::Connection
def receive_data(data)
if data.strip =~ /[exit|quit]$/i
EM.stop
else
send_data("Repeating: #{data}")
end
end
end
91. require 'rubygems' # or use Bundler.setup
require 'eventmachine'
class EchoServer < EM::Connection
def receive_data(data)
if data.strip =~ /[exit|quit]$/i
EM.stop
else
send_data("Repeating: #{data}")
end
end
end
EventMachine.run do
# hit Control + C to stop
Signal.trap("INT") { EM.stop }
Signal.trap("TERM") { EM.stop }
EM.start_server("0.0.0.0", 10000, EchoServer)
end
92. $ telnet localhost 10000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello World
93. $ telnet localhost 10000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello World
Repeating: Hello World
94. $ telnet localhost 10000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello World
Repeating: Hello World
Play again, Sam
95. $ telnet localhost 10000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello World
Repeating: Hello World
Play again, Sam
Repeating: Play again, Sam
96. $ telnet localhost 10000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello World
Repeating: Hello World
Play again, Sam
Repeating: Play again, Sam
quit
.
97. $ telnet localhost 10000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello World
Repeating: Hello World
Play again, Sam
Repeating: Play again, Sam
quit
Connection closed by foreign host.
105. ab -n 1000 -c 5 http://127.0.0.1:9876/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 5
Time taken for tests: 0.124 seconds
...
Requests per second: 8035.36 [#/sec] (mean)
Time per request: 0.622 [ms] (mean)
Time per request: 0.124 [ms] (mean, across all concurrent requests)
Transfer rate: 588.53 [Kbytes/sec] received
...
107. ab -n 1000 -c 5 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 1178079 $>
...
Concurrency Level: 5
Time taken for tests: 0.121 seconds
..
Requests per second: 8239.06 [#/sec] (mean)
Time per request: 0.607 [ms] (mean)
Time per request: 0.121 [ms] (mean, across all concurrent requests)
Transfer rate: 973.56 [Kbytes/sec] received
...
109. Node.js Ruby
libev Eventmachine, Cool.io
Google V8 MRI, JRuby, Rubinius
Less Resources, Faster More Resources, Slightly
Processing slower processing
callbacks only Threads, Fibers, Callbacks
110. Node.js Ruby
libev Eventmachine, Cool.io
Google V8 MRI, JRuby, Rubinius
Less Resources, Faster More Resources, Slightly
Processing slower processing
callbacks only Threads, Fibers, Callbacks
111. Node.js Ruby
libev Eventmachine, Cool.io
Google V8 MRI, JRuby, Rubinius
Less Resources, Faster More Resources, Slightly
Processing slower processing
callbacks only Threads, Fibers, Callbacks
112. Node.js Ruby
libev Eventmachine, Cool.io
Google V8 MRI, JRuby, Rubinius
Less Resources, Faster More Resources, Slightly
Processing slower processing
callbacks only Threads, Fibers, Callbacks
113. Node.js Ruby
libev Eventmachine, Cool.io
Google V8 MRI, JRuby, Rubinius
Less Resources, Faster More Resources, Slightly
Processing slower processing
callbacks only Threads, Fibers, Callbacks
117. fs.rename('/tmp/hello', '/tmp/world', function (err) {
if (err) throw err;
console.log('renamed complete');
});
fs.stat('/tmp/world', function (err, stats) {
if (err) throw err;
console.log('stats: ' + JSON.stringify(stats));
});
118. fs.rename('/tmp/hello', '/tmp/world', function (err) {
if (err) throw err;
fs.stat('/tmp/world', function (err, stats) {
if (err) throw err;
console.log('stats: ' + JSON.stringify(stats));
});
});
119. EM.run do
page = EM::HttpRequest.new(@url1).get
page.errback do
puts "Site is down! terminate?"
end
page.callback do
about = EM::HttpRequest.new(@url2).get
about.callback do
# callback nesting, ad infinitum
end
about.errback do
# error-handling code
end
end
end
123. number_generator = Fiber.new do
start = 0
loop do
start += 1
Fiber.yield(start)
end
end
> number_generator.resume
=> 1
124. number_generator = Fiber.new do
start = 0
loop do
start += 1
Fiber.yield(start)
end
end
> number_generator.resume
=> 1
> number_generator.resume
=> 2
125. number_generator = Fiber.new do
start = 0
loop do
start += 1
Fiber.yield(start)
end
end
> number_generator.resume
=> 1
> number_generator.resume
=> 2
> number_generator.resume
=> 3
127. Less expensive than Threads
cooperative vs preemptive multitasking
developer controls scheduling
no need to have mutexes, no shared data
coroutines / can be implemented with continuations
128. Less expensive than Threads
cooperative vs preemptive multitasking
developer controls scheduling
no need to have mutexes, no shared data
coroutines / can be implemented with continuations
129. Less expensive than Threads
cooperative vs preemptive multitasking
developer controls scheduling
no need to have mutexes, no shared data
coroutines / can be implemented with continuations
130. Less expensive than Threads
cooperative vs preemptive multitasking
developer controls scheduling
no need to have mutexes, no shared data
coroutines / can be implemented with continuations
131. Less expensive than Threads
cooperative vs preemptive multitasking
developer controls scheduling
no need to have mutexes, no shared data
coroutines / can be implemented with continuations
132. EM.run do
page = EM::HttpRequest.new(@url1).get
page.errback do
puts "Site is down! terminate?"
end
page.callback do
about = EM::HttpRequest.new(@url2).get
about.callback do
# callback nesting, ad infinitum
end
about.errback do
# error-handling code
end
end
end
133. page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
134. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
135. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
136. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
137. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
138. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
139. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
140. def http_get(url)
f = Fiber.current
http = EM::HttpRequest.new(url).get
http.callback{ f.resume(http) }
http.errback { f.resume(http) }
return Fiber.yield
end
EM.run do
Fiber.new do
page = http_get(@url1)
puts "Fetched page: #{page.response_header.status}"
if page
page = http_get(@url2)
puts "Fetched page 2: #{page.response_header.status}"
end
do.resume
end
142. EM.synchrony do
page = EM::HttpRequest.new("http://www.google.com").get
puts "Look Ma! No callbacks! Fetched page: #{page}"
EM.stop
end
# old way
EM.run do
page = EM::HttpRequest.new("http://www.google.com").get
page.callback do
puts "Lame ... Fetched page: #{page}"
EM.stop
end
end
144. require 'goliath'
require 'yajl'
G = Goliath::Rack # don’t to this, just to fit in this slide :-)
class Echo < Goliath::API
use G::Render, 'json' # auto-negotiate response format
use G::Params # parse & merge query and body parameters
use G::Validation::RequiredParam, {:key => 'echo'}
def process_request
logger.info "Processing request"
{response: env.params['echo']}
end
def response(env)
[200, {}, process_request]
end
end
149. Web App Server and App Framework
Fully asynchronous using Eventmachine
Lightweight and High Performance (+ 3k req/s in 1 process)
Rack aware (but not 100% Rack compatible)
Fibers with EM-Synchrony for easier development
152. Ruby can using Reactors to massively scale
Good contender to Node.js-style
(getting better)
One single Ruby process can handle thousands of
concurrent requests
Web browsers got smarter with Websockets
Ruby implements Websocket support
176. CGI model is difficult to scale
Multi-processes vs multi-threads vs Reactors
HTTP 5 WebSockets is hot!
Eventmachine is great!
Fibers vs “callback spaghetti”
Try out Pusher!
177. CGI model is difficult to scale
Multi-processes vs multi-threads vs Reactors
HTTP 5 WebSockets is hot!
Eventmachine is great!
Fibers vs “callback spaghetti”
Try out Pusher!
178. CGI model is difficult to scale
Multi-processes vs multi-threads vs Reactors
HTTP 5 WebSockets is hot!
Eventmachine is great!
Fibers vs “callback spaghetti”
Try out Pusher!
179. CGI model is difficult to scale
Multi-processes vs multi-threads vs Reactors
HTTP 5 WebSockets is hot!
Eventmachine is great!
Fibers vs “callback spaghetti”
Try out Pusher!
180. CGI model is difficult to scale
Multi-processes vs multi-threads vs Reactors
HTTP 5 WebSockets is hot!
Eventmachine is great!
Fibers vs “callback spaghetti”
Try out Pusher!
181. CGI model is difficult to scale
Multi-processes vs multi-threads vs Reactors
HTTP 5 WebSockets is hot!
Eventmachine is great!
Fibers vs “callback spaghetti”
Try out Pusher!
187. Rev (later Cool.io), Revactor
Reia
(Ruby syntax over Erlang, replaced by Elixir)
Celluloid (Threads abstraction to Actors)
(Mark Perham used to create Sidekiq)
193. Native threads
Ruby 1.9.x
(extensions can release the GIL)
Native threads
JRuby
(no GIL)
Native threads
Rubinius (no GIL
check out the Puma webserver)
194. Native threads
Ruby 1.9.x
(extensions can release the GIL)
Native threads
JRuby
(no GIL)
Native threads
Rubinius (no GIL
check out the Puma webserver)
195. Native threads
Ruby 1.9.x
(extensions can release the GIL)
Native threads
JRuby
(no GIL)
Native threads
Rubinius (no GIL
check out the Puma webserver)