Serverless integration with Knative and Apache Camel on KubernetesClaus Ibsen
This presentation will introduce Knative, an open source project that adds serverless capabilities on top of Kubernetes, and present Camel K, a lightweight platform that brings Apache Camel integrations in the serverless world. Camel K allows running Camel routes on top of any Kubernetes cluster, leveraging Knative serverless capabilities such as “scaling to zero”.
We will demo how Camel K can connect cloud services or enterprise applications using its 250+ components and how it can intelligently route events within the Knative environment via enterprise integration patterns (EIP).
Target Group: Developers, architects and other technical people - a basic understanding of Kubernetes is an advantage
The document provides an overview of the activity feeds architecture. It discusses the fundamental entities of connections and activities. Connections express relationships between entities and are implemented as a directed graph. Activities form a log of actions by entities. To populate feeds, activities are copied and distributed to relevant entities and then aggregated. The aggregation process involves selecting connections, classifying activities, scoring them, pruning duplicates, and sorting the results into a merged newsfeed.
From cache to in-memory data grid. Introduction to Hazelcast.Taras Matyashovsky
This presentation:
* covers basics of caching and popular cache types
* explains evolution from simple cache to distributed, and from distributed to IMDG
* not describes usage of NoSQL solutions for caching
* is not intended for products comparison or for promotion of Hazelcast as the best solution
The document discusses Netflix's use of Elasticsearch for querying log events. It describes how Netflix evolved from storing logs in files to using Elasticsearch to enable interactive exploration of billions of log events. It also summarizes some of Netflix's best practices for running Elasticsearch at scale, such as automatic sharding and replication, flexible schemas, and extensive monitoring.
This document discusses using ClickHouse for experimentation and metrics at Spotify. It describes how Spotify built an experimentation platform using ClickHouse to provide teams interactive queries on granular metrics data with low latency. Key aspects include ingesting data from Google Cloud Storage to ClickHouse daily, defining metrics through a centralized catalog, and visualizing metrics and running queries using Superset connected to ClickHouse. The platform aims to reduce load on notebooks and BigQuery by serving common queries directly from ClickHouse.
This is the deck that I used for the talks that I gave in the Silicon Valley / San Francisco bay area at various events in April and May 2016.
1. Introduces Big Data and related challenges.
2. Briefly covers some of the important open-source big data related technologies.
3. Introduces Hadoop
4. Introduces Spark Core, Spark SQL, MLlib and GraphX
ClickHouse Introduction by Alexander Zaitsev, Altinity CTOAltinity Ltd
This document summarizes a ClickHouse meetup agenda. The meetup included an opening by Javier Santana, an introduction to ClickHouse by Alexander Zaitsev of Altinity, a presentation on 2019 new ClickHouse features by Alexey Milovidov of Yandex, a coffee break, a presentation from Idealista on migrating from a legacy system to ClickHouse, a presentation from Corunet on analyzing 1027 predictive models in 10 seconds using ClickHouse, a presentation from Adjust on shipping data from Postgres to ClickHouse, closing remarks, and a networking session. The document then provides an overview of what ClickHouse is, how fast it can be, how flexible it is in deployment options, how
ORC File & Vectorization - Improving Hive Data Storage and Query PerformanceDataWorks Summit
Hive’s RCFile has been the standard format for storing Hive data for the last 3 years. However, RCFile has limitations because it treats each column as a binary blob without semantics. The upcoming Hive 0.11 will add a new file format named Optimized Row Columnar (ORC) file that uses and retains the type information from the table definition. ORC uses type specific readers and writers that provide light weight compression techniques such as dictionary encoding, bit packing, delta encoding, and run length encoding — resulting in dramatically smaller files. Additionally, ORC can apply generic compression using zlib, LZO, or Snappy on top of the lightweight compression for even smaller files. However, storage savings are only part of the gain. ORC supports projection, which selects subsets of the columns for reading, so that queries reading only one column read only the required bytes. Furthermore, ORC files include light weight indexes that include the minimum and maximum values for each column in each set of 10,000 rows and the entire file. Using pushdown filters from Hive, the file reader can skip entire sets of rows that aren’t important for this query.
Columnar storage formats like ORC reduce I/O and storage use, but it’s just as important to reduce CPU usage. A technical breakthrough called vectorized query execution works nicely with column store formats to do this. Vectorized query execution has proven to give dramatic performance speedups, on the order of 10X to 100X, for structured data processing. We describe how we’re adding vectorized query execution to Hive, coupling it with ORC with a vectorized iterator.
This document provides an overview of the VACUUM command in PostgreSQL. It discusses what VACUUM does, the evolution of VACUUM features over time, visibility maps, freezing tuples, and transaction ID wraparound. It also covers the syntax of VACUUM, improvements to anti-wraparound VACUUM, and new features like progress reporting and the freeze map.
MariaDB 10.0 introduces domain-based parallel replication which allows transactions in different domains to execute concurrently on replicas. This can result in out-of-order transaction commit. MariaDB 10.1 adds optimistic parallel replication which maintains commit order. The document discusses various parallel replication techniques in MySQL and MariaDB including schema-based replication in MySQL 5.6 and logical clock replication in MySQL 5.7. It provides performance benchmarks of these techniques from Booking.com's database environments.
Communication between Microservices is inherently unreliable. These integration points may produce cascading failures, slow responses, service outages. We will walk through stability patterns like timeouts, circuit breaker, bulkheads and discuss how they improve stability of Microservices.
PostgreSQL is a very popular and feature-rich DBMS. At the same time, PostgreSQL has a set of annoying wicked problems, which haven't been resolved in decades. Miraculously, with just a small patch to PostgreSQL core extending this API, it appears possible to solve wicked PostgreSQL problems in a new engine made within an extension.
Meta/Facebook's database serving social workloads is running on top of MyRocks (MySQL on RocksDB). This means our performance and reliability depends a lot on RocksDB. Not just MyRocks, but also we have other important systems running on top of RocksDB. We have learned many lessons from operating and debugging RocksDB at scale.
In this session, we will offer an overview of RocksDB, key differences from InnoDB, and share a few interesting lessons learned from production.
The Dream Stream Team for Pulsar and SpringTimothy Spann
THE DREAM STREAM TEAM FOR PULSAR AND SPRING
TIM SPANN - STREAMNATIVE
For building Java application, Spring is the universal answer as it supplies all the connectors and integrations one could want. The same is true for Apache Pulsar as it provides connectors, integration and flexibility to any use case. Apache Pulsar has a robust native Java library to use with Spring as well as other protocol options.
ApachePulsar provides a cloud native, geo-replicated unified messaging platform that allows for many messaging paradims. This lends it self well to upgrading existing applications as Pulsar supports using libraries for WebSockets, MQTT, Kafka, JMS, AMQP and RocketMQ. In this talk I will build some example applications utilizing several different protocols for building a variety of applications from IoT to Microservices to Log Analytics.
https://2022.springio.net/sessions/the-dream-stream-team-for-pulsar-and-spring
SPRING I/O 2022
THE CONFERENCE
Spring I/O is the leading european conference focused on the Spring Framework ecosystem.
Join us in our 9th in-person edition!
May 26/27, 2022 Barcelona, Spain
This document discusses PostgreSQL database architecture patterns for running PostgreSQL at scale when a relational database as a service like Amazon RDS won't meet needs. It describes challenges faced with MySQL, Redshift and Vertica and how PostgreSQL was better suited through techniques like partitioning by date, TOAST compression, foreign data wrappers, and poor man's parallel processing. Key takeaways are that PostgreSQL supported scaling to petabytes of data, sub-second queries across large date ranges, and custom extensions needed while avoiding limitations and expenses of other database options.
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinDataStax Academy
The document provides an overview and examples of data modeling techniques for Cassandra. It discusses four use cases - shopping cart data, user activity tracking, log collection/aggregation, and user form versioning. For each use case, it describes the business needs, issues with a relational database approach, and provides the Cassandra data model solution with examples in CQL. The models showcase techniques like de-normalizing data, partitioning, clustering, counters, maps and setting TTL for expiration. The presentation aims to help attendees properly model their data for Cassandra use cases.
Outrageous Performance: RageDB's Experience with the Seastar FrameworkScyllaDB
Learn how RageDB leveraged the Seastar framework to build an outrageously fast graph database. Understand the right way to embrace the triple digit multi-core future by scaling up and not out. Sacrifice everything for speed and get out of the way of your users. No drivers, no custom protocols, no query languages, no GraphQL, just code in and JSON out. Exploit the built in Seastar HTTP server to tie it all together.
MongoDB is an open-source, document-oriented database that provides high performance and horizontal scalability. It uses a document-model where data is organized in flexible, JSON-like documents rather than rigidly defined rows and tables. Documents can contain multiple types of nested objects and arrays. MongoDB is best suited for applications that need to store large amounts of unstructured or semi-structured data and benefit from horizontal scalability and high performance.
Unique ID generation in distributed systemsDave Gardner
The document discusses different strategies for generating unique IDs in a distributed system. It covers using auto-incrementing numeric IDs in MySQL, which are not resilient, and various solutions like UUIDs, Twitter Snowflake IDs, and Flickr ticket servers that generate IDs in a distributed and ordered way without coordination between data centers. It also provides code examples of generating Twitter Snowflake-like IDs in PHP without coordination using ZeroMQ.
Hiveminder - Everything but the Secret SauceJesse Vincent
Ten tools and techniques to help you:
Find bugs faster バグの検出をもっと素早く
Build web apps ウェブアプリの構築
Ship software ソフトのリリース
Get input from users ユーザからの入力を受けつける
Own the Inbox 受信箱を用意する
今日の話
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
Template::Declare is a pure Perl templating engine that allows templates to be treated like code. Templates can be refactored, use object orientation and mixins. Tags are implemented as closures that can output content immediately or return closures. CSS::Squish is a CSS compiler that combines multiple small CSS files into one large file for easier serving, improving performance by allowing browsers to cache the combined file.
The document discusses microblogging using the XMPP protocol. It provides background on XMPP, describes how it can enable microblogging in near real-time, and outlines the speaker's microblogging application built with Ruby that uses an XMPP bot, EventMachine for concurrency, Sequel as an ORM, and Ramaze as a web framework. Key features of the application include models for users, micros, and relations between them, an API for accessing data, and a plugin architecture for the XMPP bot.
The document provides an overview of SOLID principles with examples in Ruby code. It discusses the Single Responsibility Principle (SRP), Open-Closed Principle (OCP), Liskov Substitution Principle (LSP), Interface Segregation Principle (ISP), and Dependency Inversion Principle (DIP). For each principle, it shows code that violates the principle and refactors the code to follow the principle. The document emphasizes that SOLID is difficult and requires practice, and violations often involve multiple principles. It encourages reading books to learn more about applying SOLID in code.
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.
This document discusses debugging techniques for database crashes and errors. It begins by explaining how to determine if a crash was caused by an application error or server issue. It then covers analyzing the error log to understand the problem and find clues like the crashing query. Debugging techniques like resolving stack traces and determining assertion types are also outlined. Finally, examples of error log analysis are provided.
Performance Optimization of Rails ApplicationsSerge Smetana
The document discusses optimizing the performance of Ruby on Rails applications. It covers optimizing Ruby code, Rails code, database queries, using alternative Ruby implementations like JRuby, and optimizing for production environments including shared filesystems, load balancing, and the frontend. Specific optimizations discussed include rewriting parts of the Date class in C, template inlining in Rails, pushing SQL conditions into subqueries, and using memcached instead of filesystem caching on a shared network.
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...MongoDB
This will cover what to consider for high write throughput performance from hardware configuration through to the use of replica sets, multi-data centre deployments, monitoring and sharding to ensure your database is fast and stays online.
WebPerformance: Why and How? – Stefan WintermeyerElixir Club
This document discusses techniques for improving web performance. It begins by explaining that websites that have many similar pages, like e-commerce sites, need to care about performance to avoid lower conversions and higher bounce rates. It then discusses metrics for perceived performance, with pages feeling sluggish over 100ms and users' attention typically dropping off after 1 second. The document provides examples of caching strategies in Rails like fragment caching at the row and table levels to improve performance. It also discusses leveraging the database instead of calculating values in the view. Other techniques mentioned include pre-heating caches during off-hours, leveraging HTTP caching with ETags, and using server-side caching to serve static files without application involvement.
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.
The document introduces SD, a peer-to-peer bug tracking tool developed by Best Practical to allow tracking bugs offline and syncing work across devices. SD uses a decentralized model where each installation can pull changes from any other replica. It supports syncing with other bug trackers like RT, Trac and Google Code. The author argues that cloud services make users dependent while SD empowers fully offline and distributed work by syncing like users naturally share files.
This document provides instructions for setting up a demonstration of the magic_model_generator gem. It mentions setting up the database.yml file and increasing the font size. It also provides commands for starting the postgres database, generating models from existing tables, and preparing the development environment for the demo.
This document provides an overview and introduction to using the Sinatra web framework for building RESTful web applications in Ruby. It discusses Sinatra's philosophy of being simple and easy to use, introduces REST principles and how Sinatra supports them through HTTP verbs, routing, caching, authentication and more. Code examples are provided to demonstrate how a basic "Hello World" application is structured in Sinatra and how requests are routed and executed under the hood.
MongoDB: Optimising for Performance, Scale & AnalyticsServer Density
MongoDB is easy to download and run locally but requires some thought and further understanding when deploying to production. At scale, schema design, indexes and query patterns really matter. So does data structure on disk, sharding, replication and data centre awareness. This talk will examine these factors in the context of analytics, and more generally, to help you optimise MongoDB for any scale.
Presented at MongoDB Days London 2013 by David Mytton.
JDD2015: Sharding with Akka Cluster: From Theory to Production - Krzysztof Ot...PROIDEA
SHARDING WITH AKKA CLUSTER: FROM THEORY TO PRODUCTION
Writing distributed applications is very hard, especially when you start developing them as single-noded ones. Programmers tend to focus on functionalities first, leaving the scalability issues for later. Fortunately, Akka gives us many tools for scaling out and we can use them very early in the development process. You will learn how to take advantage of these features.
The talk is divided into two sections. In the first section you will learn how to transform a single-noded app into a scalable one. During live coding session we will create both versions from scratch and guide you through the most important architectural decisions.
Then we will move on to more important problems. During the second section we would like to simulate missile defence system and protect planet Earth against hostile aliens. Under the hood there will be Scala and Akka Cluster with sharding extension. After describing the application and its internals, we will simulate network and power failures to provide some idea how fast the application can recover.
Web 2.0 Performance and Reliability: How to Run Large Web Appsadunne
The document discusses operations engineering and monitoring systems. Some key points:
- Operations is often overlooked compared to product development and engineering, but it is a form of engineering and critical for ensuring systems run reliably.
- Effective monitoring involves collecting data, alerting on issues, and trend analysis to aid capacity planning. Tools mentioned include Nagios, Ganglia, Cricket, and custom Ganglia metrics.
- When debugging issues, follow best practices like understanding the system, methodically testing changes, keeping an audit trail, and ensuring the root cause is actually fixed.
- Automation is important for managing systems at scale. Tools like Puppet, Cobbler, Koan, and EC2 automation are recommended to
How to avoid hanging yourself with RailsRowan Hick
The document provides tips for improving the performance of Rails applications that have common ActiveRecord performance problems related to has_many relationships. It discusses ways to avoid unnecessary SQL queries through eager loading with :include and limiting columns with :select. Writing custom SQL queries is presented as the fastest approach but also notes the tradeoffs around maintaining custom SQL. The document emphasizes testing applications with large realistic data sets and using indexes, counters, and frameworks like Merb to further boost performance.
The document discusses using JRuby to build a Twitter client application. It provides steps for setting up the development environment, creating the initial project structure using MVC patterns, integrating the Twitter API via gems, and packaging the application for cross-platform distribution. Potential issues addressed include working around the lack of native extensions in JRuby and ensuring gems are loaded properly.
The document describes various animals interacting online to share and listen to music. The owl helps the duckling find the cat's music profile on Musicalog.com by querying Webfinger records from Gmail and Yahoo to discover where the cat and duckling publish their music and social profiles. The bluebird also confirms with the cat that the duckling is allowed to listen to its music. In the end, the duckling happily finds the cat's music to enjoy through Huffduffer.com, which was identified as the cat's music publishing platform.
Este documento describe las tecnologías descentralizadas para identidad y servicios en línea para robots, incluyendo Webfinger, PubSubHubbub y OStatus. Explica cómo estas tecnologías permiten que robots como un gato musical compartan su música de forma distribuida a través de la red con la ayuda de un búho y un pato.
This document describes the delegated authorization process for OAuth. It involves the following main steps:
1. A consumer requests a request token from the service provider to access a user's private resources.
2. The user is redirected to the service provider to authorize the request token for the consumer.
3. Once authorized, the consumer exchanges the request token for an access token to access the private resources.
4. The consumer uses the access token to access the user's private data through the service provider's API.
The process allows consumers to access private resources from a service on behalf of a user, without exposing the user's credentials to the consumer. Signatures and tokens are used to securely delegate
The document discusses building the real-time web and outlines some of the key challenges and potential solutions. It introduces concepts like social objects, real-time communication, and scaling techniques. The document also examines problems with using straight HTTP for real-time applications and explores alternatives like HTTP ping/push and using Jabber protocols and tools to help address issues around scalability and asynchronous communication.
Quantum Communications Q&A with Gemini LLM. These are based on Shannon's Noisy channel Theorem and offers how the classical theory applies to the quantum world.
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionBert Blevins
Cybersecurity is a major concern in today's connected digital world. Threats to organizations are constantly evolving and have the potential to compromise sensitive information, disrupt operations, and lead to significant financial losses. Traditional cybersecurity techniques often fall short against modern attackers. Therefore, advanced techniques for cyber security analysis and anomaly detection are essential for protecting digital assets. This blog explores these cutting-edge methods, providing a comprehensive overview of their application and importance.
YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS
WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well.
Some facts about WPRiders and why we are one of the best firms around:
More than 700 five-star reviews! You can check them here.
1500 WordPress projects delivered.
We respond 80% faster than other firms! Data provided by Freshdesk.
We’ve been in business since 2015.
We are located in 7 countries and have 22 team members.
With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce.
Our team members are:
- highly experienced developers (employees & contractors with 5 -10+ years of experience),
- great designers with an eye for UX/UI with 10+ years of experience
- project managers with development background who speak both tech and non-tech
- QA specialists
- Conversion Rate Optimisation - CRO experts
They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals.
At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.
Measuring the Impact of Network Latency at TwitterScyllaDB
Widya Salim and Victor Ma will outline the causal impact analysis, framework, and key learnings used to quantify the impact of reducing Twitter's network latency.
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Bert Blevins
Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.
Mitigating the Impact of State Management in Cloud Stream Processing SystemsScyllaDB
Stream processing is a crucial component of modern data infrastructure, but constructing an efficient and scalable stream processing system can be challenging. Decoupling compute and storage architecture has emerged as an effective solution to these challenges, but it can introduce high latency issues, especially when dealing with complex continuous queries that necessitate managing extra-large internal states.
In this talk, we focus on addressing the high latency issues associated with S3 storage in stream processing systems that employ a decoupled compute and storage architecture. We delve into the root causes of latency in this context and explore various techniques to minimize the impact of S3 latency on stream processing performance. Our proposed approach is to implement a tiered storage mechanism that leverages a blend of high-performance and low-cost storage tiers to reduce data movement between the compute and storage layers while maintaining efficient processing.
Throughout the talk, we will present experimental results that demonstrate the effectiveness of our approach in mitigating the impact of S3 latency on stream processing. By the end of the talk, attendees will have gained insights into how to optimize their stream processing systems for reduced latency and improved cost-efficiency.
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
The Rise of Supernetwork Data Intensive ComputingLarry Smarr
Invited Remote Lecture to SC21
The International Conference for High Performance Computing, Networking, Storage, and Analysis
St. Louis, Missouri
November 18, 2021
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
Are you interested in dipping your toes in the cloud native observability waters, but as an engineer you are not sure where to get started with tracing problems through your microservices and application landscapes on Kubernetes? Then this is the session for you, where we take you on your first steps in an active open-source project that offers a buffet of languages, challenges, and opportunities for getting started with telemetry data.
The project is called openTelemetry, but before diving into the specifics, we’ll start with de-mystifying key concepts and terms such as observability, telemetry, instrumentation, cardinality, percentile to lay a foundation. After understanding the nuts and bolts of observability and distributed traces, we’ll explore the openTelemetry community; its Special Interest Groups (SIGs), repositories, and how to become not only an end-user, but possibly a contributor.We will wrap up with an overview of the components in this project, such as the Collector, the OpenTelemetry protocol (OTLP), its APIs, and its SDKs.
Attendees will leave with an understanding of key observability concepts, become grounded in distributed tracing terminology, be aware of the components of openTelemetry, and know how to take their first steps to an open-source contribution!
Key Takeaways: Open source, vendor neutral instrumentation is an exciting new reality as the industry standardizes on openTelemetry for observability. OpenTelemetry is on a mission to enable effective observability by making high-quality, portable telemetry ubiquitous. The world of observability and monitoring today has a steep learning curve and in order to achieve ubiquity, the project would benefit from growing our contributor community.
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 :
- Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants.
- REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.
9. It’s Easy, Really.
1. Realize Your Site is Slow
2. Optimize the Database
3. Cache the Hell out of Everything
4. Scale Messaging
5. Deal With Abuse
10. It’s Easy, Really.
1. Realize Your Site is Slow
2. Optimize the Database
3. Cache the Hell out of Everything
4. Scale Messaging
5. Deal With Abuse
6. Profit
13. Don’t Be Like Us
• Munin
• Nagios
• AWStats & Google Analytics
• Exception Notifier / Exception Logger
• Immediately add reporting to track problems.
14. Test Everything
• Start Before You Start
• No Need To Be Fancy
• Tests Will Save Your Life
• Agile Becomes
Important When Your
Site Is Down
15. <!-- served to you through a copper wire by sampaati at 22 Apr
15:02 in 343 ms (d 102 / r 217). thank you, come again. -->
<!-- served to you through a copper wire by kolea.twitter.com at
22 Apr 15:02 in 235 ms (d 87 / r 130). thank you, come again. -->
<!-- served to you through a copper wire by raven.twitter.com at
22 Apr 15:01 in 450 ms (d 96 / r 337). thank you, come again. -->
Benchmarks?
let your users do it.
<!-- served to you through a copper wire by kolea.twitter.com at
22 Apr 15:00 in 409 ms (d 88 / r 307). thank you, come again. -->
<!-- served to you through a copper wire by firebird at 22 Apr
15:03 in 2094 ms (d 643 / r 1445). thank you, come again. -->
<!-- served to you through a copper wire by quetzal at 22 Apr
15:01 in 384 ms (d 70 / r 297). thank you, come again. -->
22. class AddIndex < ActiveRecord::Migration
def self.up
add_index :users, :email
end
def self.down
remove_index :users, :email
end
end
Repeat for any column that appears in a WHERE clause
Rails won’t do this for you.
24. class DenormalizeFriendsIds < ActiveRecord::Migration
def self.up
add_column "users", "friends_ids", :text
end
def self.down
remove_column "users", "friends_ids"
end
end
25. class Friendship < ActiveRecord::Base
belongs_to :user
belongs_to :friend
after_create :add_to_denormalized_friends
after_destroy :remove_from_denormalized_friends
def add_to_denormalized_friends
user.friends_ids << friend.id
user.friends_ids.uniq!
user.save_without_validation
end
def remove_from_denormalized_friends
user.friends_ids.delete(friend.id)
user.save_without_validation
end
end
28. That’s where we are.
Seriously.
If your Rails application is doing anything more
complex than that, you’re doing something wrong*.
* or you observed the First Rule of Butterfield.
35. class Status < ActiveRecord::Base
class << self
def count_with_memcache(*args)
return count_without_memcache unless args.empty?
count = CACHE.get(“status_count”)
if count.nil?
count = count_without_memcache
CACHE.set(“status_count”, count)
end
count
end
alias_method_chain :count, :memcache
end
after_create :increment_memcache_count
after_destroy :decrement_memcache_count
...
end
36. class User < ActiveRecord::Base
def friends_statuses
ids = CACHE.get(“friends_statuses:#{id}”)
Status.find(:all, :conditions => [“id IN (?)”, ids])
end
end
class Status < ActiveRecord::Base
after_create :update_caches
def update_caches
user.friends_ids.each do |friend_id|
ids = CACHE.get(“friends_statuses:#{friend_id}”)
ids.pop
ids.unshift(id)
CACHE.set(“friends_statuses:#{friend_id}”, ids)
end
end
end