SlideShare une entreprise Scribd logo
1  sur  16
CakeFest 2012 – Manchester, UK




                     Random tips
                 They will save your life
                       (for real)




                                        @mgiglesias
                                  
411
    ●   I use CakePHP, Lithium, Doctrine2, Python, Node.js, 
        C++
        –   … Yes. C++
    ●   I like beer
    ●   I have 4 dogs, 4 cats, and a horse
        –   … Yes. A horse
    ●   I co­founded WORKANA
        –   https://www.workana.com


                                       
GIT & deploys
    ●   I shouldn't even have to say this
    ●   Master branch should be 100% pushable
        –   Feature branches like there's no tomorrow
    ●   Code reviews
    ●   Python scripts, but you could use Capistrano or 
        whatever
    ●   Could have hundred deploys per day
        –   Yes, you do need UT


                                       
Monit




       
Monit
    ●   Don't PING­monitor me, please
    ●   Monit the heck out of your servers
    ●   Track the PHP logs (say what?)
    ●   Be pre­emptive with your actions




                               
Monit
    # Redis
    check process redis with pidfile /var/run/redis/redis-server.pid
       start program = "/etc/init.d/redis-server start"
       stop program = "/etc/init.d/redis-server stop"
       if failed port 6379 protocol http then restart
       if loadavg(5min) greater than 10.0 for 8 cycles then stop
       if 3 restarts within 5 cycles then timeout
       depends on redis_bin

    # Redis binary
    check file redis_bin with path /usr/bin/redis-server
       if failed checksum then unmonitor
       if failed permission 755 then unmonitor
       if failed uid root then unmonitor
       if failed gid root then unmonitor
       if changed timestamp then alert

    # log parser
    check program log_parser_app with path
    "/var/www/scripts/log_parser.sh"
       if status != 0 then alert     
Ducksboard




         
Statsd
    ●   Built on Node.js (what else)
    ●   Works through UDP (UDP you say?)
    ●   Easy from PHP: StatsD::timing("grue.dinners",
        (microtime(true) - $start) * 1000);
    ●   Integrate with Graphite for even more coolness




                                 
Statsd




        
Google Analytics
    ●   Tracking (force URLs)
    ●   Conversions (get the paths)
    ●   Real Time (loose the little free time you have)
    ●   A/B testing (of everything)




                                 
Varnish
    ●   Speed: do I need to say more?
    ●   Home page and signup: should be super­fast
    ●   Base caching rules on URLs
    ●   Ideal for non­registered content
    ●   Cache invalidation from PHP through socket




                                
On AWS




       
Parse incoming email
    ●   Stop making me go to your F** website
    ●   No need for different reply­to
        –   Message ID to the rescue! 
            notification+a48sa@workana.com

    ●   Sendgrid hits your server on each reply
        –   You get the $_FILES too!
    ●   Avoids sending emails to bounces, good 
        reporting!

                                        
Real time notifications
    ●   It's not rocket science
    ●   PHP (gearman?) → Redis pub/sub
    ●   Redis pub/sub → Node.js
    ●   Client ↔ Node.js through Socket.io
    ●   Socket.io channels (per user hash)




                                   
Sphinx
    ●   RU doin' fulltext search? What's wrong with you?
    ●   Ridiculously fast and highly scalable
    ●   Indexes right out of your RDBMS
        –   Delta indexes
    ●   More than just text fields
    ●   PECL extension or SQL (say what?)
    ●   Real time indexing (comes with some gotchas)

                                  
CakeFest 2012 – Manchester, UK




                      Questions?




                                     @mgiglesias
                                  

Contenu connexe

Tendances

MongoDB, RabbitMQ y Applicaciones en Nube
MongoDB, RabbitMQ y Applicaciones en NubeMongoDB, RabbitMQ y Applicaciones en Nube
MongoDB, RabbitMQ y Applicaciones en NubeSocialmetrix
 
2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the thingsPHP Conference Argentina
 
Node.js for Rubists
Node.js for RubistsNode.js for Rubists
Node.js for RubistsSagiv Ofek
 
Welcome to NPM search 2.0
Welcome to NPM search 2.0Welcome to NPM search 2.0
Welcome to NPM search 2.0Dejan Toteff
 
Hachioji pm 41
Hachioji pm 41Hachioji pm 41
Hachioji pm 41moznion
 
Integrating Node.js with PHP
Integrating Node.js with PHPIntegrating Node.js with PHP
Integrating Node.js with PHPLee Boynton
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in osGenchiLu1
 
ORTC SVC SimulCast
ORTC SVC SimulCastORTC SVC SimulCast
ORTC SVC SimulCastJxck Jxck
 
Monitoring with ElasticSearch
Monitoring with ElasticSearch Monitoring with ElasticSearch
Monitoring with ElasticSearch Kris Buytaert
 
Extensible web #html5j
Extensible web #html5jExtensible web #html5j
Extensible web #html5jJxck Jxck
 
fsharp goodness for everyday work
fsharp goodness for everyday workfsharp goodness for everyday work
fsharp goodness for everyday workUladzimir Shchur
 
MongoGraph - MongoDB Meets the Semantic Web
MongoGraph - MongoDB Meets the Semantic WebMongoGraph - MongoDB Meets the Semantic Web
MongoGraph - MongoDB Meets the Semantic WebDATAVERSITY
 
Open Source Monitoring Tools
Open Source Monitoring ToolsOpen Source Monitoring Tools
Open Source Monitoring Toolsm_richardson
 
Logging Application Behavior to MongoDB
Logging Application Behavior to MongoDBLogging Application Behavior to MongoDB
Logging Application Behavior to MongoDBRobert Stewart
 
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQFEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQAlexandre Brandão Lustosa
 
Functional MCU programming
Functional MCU programmingFunctional MCU programming
Functional MCU programmingKiwamu Okabe
 

Tendances (20)

MongoDB, RabbitMQ y Applicaciones en Nube
MongoDB, RabbitMQ y Applicaciones en NubeMongoDB, RabbitMQ y Applicaciones en Nube
MongoDB, RabbitMQ y Applicaciones en Nube
 
2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things
 
Node.js for Rubists
Node.js for RubistsNode.js for Rubists
Node.js for Rubists
 
Welcome to NPM search 2.0
Welcome to NPM search 2.0Welcome to NPM search 2.0
Welcome to NPM search 2.0
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
Hachioji pm 41
Hachioji pm 41Hachioji pm 41
Hachioji pm 41
 
Rust programming-language
Rust programming-languageRust programming-language
Rust programming-language
 
PHP and node.js Together
PHP and node.js TogetherPHP and node.js Together
PHP and node.js Together
 
Integrating Node.js with PHP
Integrating Node.js with PHPIntegrating Node.js with PHP
Integrating Node.js with PHP
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
ORTC SVC SimulCast
ORTC SVC SimulCastORTC SVC SimulCast
ORTC SVC SimulCast
 
Monitoring with ElasticSearch
Monitoring with ElasticSearch Monitoring with ElasticSearch
Monitoring with ElasticSearch
 
Extensible web #html5j
Extensible web #html5jExtensible web #html5j
Extensible web #html5j
 
fsharp goodness for everyday work
fsharp goodness for everyday workfsharp goodness for everyday work
fsharp goodness for everyday work
 
MongoGraph - MongoDB Meets the Semantic Web
MongoGraph - MongoDB Meets the Semantic WebMongoGraph - MongoDB Meets the Semantic Web
MongoGraph - MongoDB Meets the Semantic Web
 
From NodeJS to Rust
From NodeJS to RustFrom NodeJS to Rust
From NodeJS to Rust
 
Open Source Monitoring Tools
Open Source Monitoring ToolsOpen Source Monitoring Tools
Open Source Monitoring Tools
 
Logging Application Behavior to MongoDB
Logging Application Behavior to MongoDBLogging Application Behavior to MongoDB
Logging Application Behavior to MongoDB
 
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQFEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
FEUC Tec 2016 - Desacoplando WorkFlows com RabbitMQ
 
Functional MCU programming
Functional MCU programmingFunctional MCU programming
Functional MCU programming
 

Similaire à Random tips that will save your project's life

Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmudjcp
 
OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age
OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age
OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age NETWAYS
 
LSA2 - 03 Http apache nginx
LSA2 - 03 Http apache nginxLSA2 - 03 Http apache nginx
LSA2 - 03 Http apache nginxMarian Marinov
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1eddify
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | EnglishOmid Vahdaty
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned Omid Vahdaty
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at ScaleKris Buytaert
 
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015curryon
 
FastNetMon and Metrics
FastNetMon and MetricsFastNetMon and Metrics
FastNetMon and MetricsAltinity Ltd
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet systemrkhatibi
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet SystemPuppet
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in ScalaAmir Karimi
 
Asynchronous job queues with python-rq
Asynchronous job queues with python-rqAsynchronous job queues with python-rq
Asynchronous job queues with python-rqAshish Acharya
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadKrivoy Rog IT Community
 
Work WIth Redis and Perl
Work WIth Redis and PerlWork WIth Redis and Perl
Work WIth Redis and PerlBrett Estrade
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend PerformanceThomas Weinert
 

Similaire à Random tips that will save your project's life (20)

Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmu
 
OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age
OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age
OSDC 2014: Devdas Bhagat - Graphite: Graphs for the modern age
 
LSA2 - 03 Http apache nginx
LSA2 - 03 Http apache nginxLSA2 - 03 Http apache nginx
LSA2 - 03 Http apache nginx
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
 
Netty training
Netty trainingNetty training
Netty training
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Netty training
Netty trainingNetty training
Netty training
 
Monitoring your VM's at Scale
Monitoring your VM's at ScaleMonitoring your VM's at Scale
Monitoring your VM's at Scale
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
 
FastNetMon and Metrics
FastNetMon and MetricsFastNetMon and Metrics
FastNetMon and Metrics
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in Scala
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Asynchronous job queues with python-rq
Asynchronous job queues with python-rqAsynchronous job queues with python-rq
Asynchronous job queues with python-rq
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
Work WIth Redis and Perl
Work WIth Redis and PerlWork WIth Redis and Perl
Work WIth Redis and Perl
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
 

Plus de Mariano Iglesias

ElasticSearch: la tenés atroden Google
ElasticSearch: la tenés atroden GoogleElasticSearch: la tenés atroden Google
ElasticSearch: la tenés atroden GoogleMariano Iglesias
 
Workana: work in your underwear and still get paid
Workana: work in your underwear and still get paidWorkana: work in your underwear and still get paid
Workana: work in your underwear and still get paidMariano Iglesias
 
node-db: La excusa perfecta para hablar de C++ y Node.js
node-db: La excusa perfecta para hablar de C++ y Node.jsnode-db: La excusa perfecta para hablar de C++ y Node.js
node-db: La excusa perfecta para hablar de C++ y Node.jsMariano Iglesias
 
ONGs como Extreme Startups
ONGs como Extreme StartupsONGs como Extreme Startups
ONGs como Extreme StartupsMariano Iglesias
 
Node.js - Eventos para Todos
Node.js - Eventos para TodosNode.js - Eventos para Todos
Node.js - Eventos para TodosMariano Iglesias
 
Things that suck... and some that don't
Things that suck... and some that don'tThings that suck... and some that don't
Things that suck... and some that don'tMariano Iglesias
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPMariano Iglesias
 

Plus de Mariano Iglesias (8)

Go nuts with Go and PHP
Go nuts with Go and PHPGo nuts with Go and PHP
Go nuts with Go and PHP
 
ElasticSearch: la tenés atroden Google
ElasticSearch: la tenés atroden GoogleElasticSearch: la tenés atroden Google
ElasticSearch: la tenés atroden Google
 
Workana: work in your underwear and still get paid
Workana: work in your underwear and still get paidWorkana: work in your underwear and still get paid
Workana: work in your underwear and still get paid
 
node-db: La excusa perfecta para hablar de C++ y Node.js
node-db: La excusa perfecta para hablar de C++ y Node.jsnode-db: La excusa perfecta para hablar de C++ y Node.js
node-db: La excusa perfecta para hablar de C++ y Node.js
 
ONGs como Extreme Startups
ONGs como Extreme StartupsONGs como Extreme Startups
ONGs como Extreme Startups
 
Node.js - Eventos para Todos
Node.js - Eventos para TodosNode.js - Eventos para Todos
Node.js - Eventos para Todos
 
Things that suck... and some that don't
Things that suck... and some that don'tThings that suck... and some that don't
Things that suck... and some that don't
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Random tips that will save your project's life

  • 1. CakeFest 2012 – Manchester, UK Random tips They will save your life (for real) @mgiglesias    
  • 2. 411 ● I use CakePHP, Lithium, Doctrine2, Python, Node.js,  C++ – … Yes. C++ ● I like beer ● I have 4 dogs, 4 cats, and a horse – … Yes. A horse ● I co­founded WORKANA – https://www.workana.com    
  • 3. GIT & deploys ● I shouldn't even have to say this ● Master branch should be 100% pushable – Feature branches like there's no tomorrow ● Code reviews ● Python scripts, but you could use Capistrano or  whatever ● Could have hundred deploys per day – Yes, you do need UT    
  • 4. Monit    
  • 5. Monit ● Don't PING­monitor me, please ● Monit the heck out of your servers ● Track the PHP logs (say what?) ● Be pre­emptive with your actions    
  • 6. Monit # Redis check process redis with pidfile /var/run/redis/redis-server.pid start program = "/etc/init.d/redis-server start" stop program = "/etc/init.d/redis-server stop" if failed port 6379 protocol http then restart if loadavg(5min) greater than 10.0 for 8 cycles then stop if 3 restarts within 5 cycles then timeout depends on redis_bin # Redis binary check file redis_bin with path /usr/bin/redis-server if failed checksum then unmonitor if failed permission 755 then unmonitor if failed uid root then unmonitor if failed gid root then unmonitor if changed timestamp then alert # log parser check program log_parser_app with path "/var/www/scripts/log_parser.sh"   if status != 0 then alert  
  • 8. Statsd ● Built on Node.js (what else) ● Works through UDP (UDP you say?) ● Easy from PHP: StatsD::timing("grue.dinners", (microtime(true) - $start) * 1000); ● Integrate with Graphite for even more coolness    
  • 10. Google Analytics ● Tracking (force URLs) ● Conversions (get the paths) ● Real Time (loose the little free time you have) ● A/B testing (of everything)    
  • 11. Varnish ● Speed: do I need to say more? ● Home page and signup: should be super­fast ● Base caching rules on URLs ● Ideal for non­registered content ● Cache invalidation from PHP through socket    
  • 13. Parse incoming email ● Stop making me go to your F** website ● No need for different reply­to – Message ID to the rescue!  notification+a48sa@workana.com ● Sendgrid hits your server on each reply – You get the $_FILES too! ● Avoids sending emails to bounces, good  reporting!    
  • 14. Real time notifications ● It's not rocket science ● PHP (gearman?) → Redis pub/sub ● Redis pub/sub → Node.js ● Client ↔ Node.js through Socket.io ● Socket.io channels (per user hash)    
  • 15. Sphinx ● RU doin' fulltext search? What's wrong with you? ● Ridiculously fast and highly scalable ● Indexes right out of your RDBMS – Delta indexes ● More than just text fields ● PECL extension or SQL (say what?) ● Real time indexing (comes with some gotchas)    
  • 16. CakeFest 2012 – Manchester, UK Questions? @mgiglesias    

Notes de l'éditeur

  1. * SHIT HAPPENS * QA is nice, Unit Testing is nice, but monitoring is GREAT
  2. * You POST your data through REST (increment, discrete value) * Realtime updates * Built-in widgets (facebook, twitter, pingdom, everything)
  3. * Node.js: super-easy deployment and high availability (MONIT) * UDP: Super fast, not guaranteed delivery. The idea is for the site (and statsd) to always be available * Graphite: storage backend, you HTTP post to it from Statsd data
  4. * Check the lighting talk from MAN 2011 * Speed: can get you a 1000x speed increase * Non-registered: check for session vars. MAKE SURE you are not sending non-cache session headers, Varnish listens to that (PHP sends non-cache headers when sessions are enabled by default. In varnish rules you can check for specific HTTP cookies * Cache invalidation: https://github.com/timwhitlock/php-varnish
  5. * CLOUD FRONT: Invalidation works, but still use ?version numbers. Today they added CROSS (Cross Origin Resource Sharing) support * EBS: SSL termination * Sessions on central storage like Redis * Separate ELB for notifications * Get pre-paid instances when possible
  6. * Delta indexes: one index for “old” stuff, one index for newer (less) stuff. You can then merge the two which is faster than full reindex * More FIELDS: you can take into your index stuff that you would normally need MySQL for (calculated stuff for example?) * RT: no prefix/infix indexing. You use the MySQL protocol to INSERT rows