This document describes Mario, an asynchronous library that allows synchronous code to be executed asynchronously. It provides thread-safe asynchronous processing of messages by inheriting from a Handler class and implementing a processMsg function. The library uses background threads to consume messages put into a Mario instance, allowing the code to quickly return while the work continues in the background. It supports different storage engines like memory and files.
The document discusses the write path for data from a client's memory to physical storage, going through the database server's memory, kernel buffer, disk cache, and finally the physical disk. It also covers Linux page cache settings like vm.dirty_background_ratio and vm.dirty_ratio that control when cached data is written back to disk, and gives examples of adjusting these settings to decrease or increase caching for different server usage situations.
Representation state transfer and some other important stuffJoshua Thijssen
The document provides an overview of Representational State Transfer (REST) architectural style. It defines REST as a set of constraints for building scalable web services. The key aspects of REST covered include identifying resources with URLs, using HTTP methods like GET, POST, PUT and DELETE to manipulate resources, making communications self-descriptive through links and embedded resource representations, and enabling stateless interactions between components through hypermedia as the engine of application state (HATEOAS). Specific examples are given to illustrate how to build RESTful state transitions in a flight booking application.
This document provides examples of unit testing code in PHP using PHPUnit. It demonstrates how to write test cases with assertions, use PHPUnit features like data providers and expected exceptions, and addresses challenges like external dependencies by implementing dependency injection. Mocking and stubs are also presented as ways to isolate code during testing. The overall content aims to explain PHPUnit and best practices for writing clean, isolated and effective unit tests.
This document provides an overview and introduction to Puppet, an open source tool for configuration management. It discusses what Puppet is, how it works, its main components like the Puppet Master, Puppet Agent, and Facter for gathering system facts. It also covers Puppet manifests which define configurations declaratively using the Puppet DSL language.
Deploying and maintaining your software with RPM/APTJoshua Thijssen
The document describes a conference about deploying and maintaining software with RPM and APT package managers. The conference will take place on April 16-17, 2011 in Antwerp, Belgium and the URL http://joind.in/3315 provides additional information about the event.
Alice & bob public key cryptography 101 - uncon dpcJoshua Thijssen
This document provides an introduction to public key cryptography. It begins with an overview of Alice and Bob, who represent the two parties in a communication. It then discusses the history of encryption, including weaknesses in early ciphers like substitution and Caesar ciphers. Frequency analysis is introduced as a way to break these simple ciphers. Symmetric encryption algorithms are discussed along with the key distribution problem they present. The document then introduces public key encryption as an solution, using two keys: a public key that can encrypt and a private key for decrypting. RSA is presented as the most widely used public key algorithm, and its workings are outlined at a high level.
The document outlines 15 pro-tips for MySQL users that were presented at a PHPBenelux meeting. It discusses various tips including using EXPLAIN to optimize queries, understanding important MySQL configuration settings, backing up data at the table level, avoiding SELECT * queries when only certain fields are needed, using triggers and stored procedures to enforce data consistency, avoiding FULLTEXT searches and wildcard searches for performance reasons, and sharding volatile and non-volatile data for better caching and locking. The tips range from basic to more advanced techniques.
The document provides 15 pro-tips for MySQL users, beginning with basic tips like using the correct MySQL version and understanding EXPLAIN plans, and progressing to more advanced tips involving backups, queries, indexing, and database design. Key recommendations include knowing important configuration settings, backing up at the table level, avoiding SELECT * queries, using triggers for consistency, and separating volatile and non-volatile data.
The document discusses consistency models in distributed systems including weak, eventual, and strong consistency. It then describes the Paxos consensus algorithm, its roles of proposers, acceptors, and learners, and the two phase process of prepare/promise and accept/accept request. It provides examples of Paxos in action and discusses its usage, limitations, references, and related algorithms like Multi-Paxos and Raft.
- Public key cryptography uses key pairs consisting of a public key and a private key
- RSA is an asymmetric encryption algorithm that uses these key pairs
- In RSA, the public and private keys are generated based on selecting two large prime numbers p and q, and doing mathematical operations on them like multiplying them to get n, and using p and q to calculate φ
- A public exponent e is also selected such that it is relatively prime to φ
Block cipher modes describe how block ciphers encrypt data in blocks rather than a continuous stream. Electronic Codebook (ECB) encrypts each block deterministically, while Cipher Block Chaining (CBC) encrypts blocks in a chained manner using an initialization vector, making the encryption non-deterministic and preventing errors from propagating between blocks. Cipher Feedback (CFB) converts the block cipher into a stream cipher, allowing encryption of non-fixed length data without padding.
This document discusses the awk command and how it can be used to parse and extract data from text files and output. Awk allows specifying patterns to match and actions to perform on matches. Examples show using awk to extract specific fields from the /etc/passwd file and Apache log files. Pipelines combining awk with other commands like grep, sed and cut are demonstrated.
This document provides an overview of the awk programming language including its syntax, working methodology, built-in variables, operators, and examples. Some key points:
- Awk programs use patterns and actions to process input files line by line. Patterns are matched against each record and associated actions are performed.
- Built-in variables like FS, OFS, RS, NR, NF, FILENAME help manipulate the input/output and provide record information.
- Operators allow arithmetic, string, comparison, assignment and regular expression operations.
- Examples demonstrate using built-ins and operators to count fields, select records, and manipulate data from /etc/passwd.
This document provides an introduction to public key cryptography. It begins with an overview of Alice and Bob, who represent communication parties. It then discusses the history of encryption, including flaws in early substitution and Caesar ciphers. Frequency analysis is introduced as a way to break these simple ciphers. The document concludes by explaining the advantages of public key encryption over symmetric encryption, such as not requiring secure key exchange.
Puppet is a configuration management tool which allows easy deployment and configuration ranging from 1 to 1 thousand servers (and even more). Even though its common knowledge for devops, puppet is still a strange piece of software for developers. How does it work and what can it do for you as a developer?
This document provides examples of unit testing code in PHP using PHPUnit. It demonstrates how to write test cases with assertions, use PHPUnit features like data providers and expected exceptions, and addresses challenges like external dependencies by implementing dependency injection. Mocking and stubs are also presented as ways to isolate code during testing. The overall content aims to explain PHPUnit and best practices for writing clean, isolated and effective unit tests.
This document provides an overview and introduction to Puppet, an open source tool for configuration management. It discusses what Puppet is, how it works, its main components like the Puppet Master, Puppet Agent, and Facter for gathering system facts. It also covers Puppet manifests which define configurations declaratively using the Puppet DSL language.
Deploying and maintaining your software with RPM/APTJoshua Thijssen
The document describes a conference about deploying and maintaining software with RPM and APT package managers. The conference will take place on April 16-17, 2011 in Antwerp, Belgium and the URL http://joind.in/3315 provides additional information about the event.
Alice & bob public key cryptography 101 - uncon dpcJoshua Thijssen
This document provides an introduction to public key cryptography. It begins with an overview of Alice and Bob, who represent the two parties in a communication. It then discusses the history of encryption, including weaknesses in early ciphers like substitution and Caesar ciphers. Frequency analysis is introduced as a way to break these simple ciphers. Symmetric encryption algorithms are discussed along with the key distribution problem they present. The document then introduces public key encryption as an solution, using two keys: a public key that can encrypt and a private key for decrypting. RSA is presented as the most widely used public key algorithm, and its workings are outlined at a high level.
The document outlines 15 pro-tips for MySQL users that were presented at a PHPBenelux meeting. It discusses various tips including using EXPLAIN to optimize queries, understanding important MySQL configuration settings, backing up data at the table level, avoiding SELECT * queries when only certain fields are needed, using triggers and stored procedures to enforce data consistency, avoiding FULLTEXT searches and wildcard searches for performance reasons, and sharding volatile and non-volatile data for better caching and locking. The tips range from basic to more advanced techniques.
The document provides 15 pro-tips for MySQL users, beginning with basic tips like using the correct MySQL version and understanding EXPLAIN plans, and progressing to more advanced tips involving backups, queries, indexing, and database design. Key recommendations include knowing important configuration settings, backing up at the table level, avoiding SELECT * queries, using triggers for consistency, and separating volatile and non-volatile data.
The document discusses consistency models in distributed systems including weak, eventual, and strong consistency. It then describes the Paxos consensus algorithm, its roles of proposers, acceptors, and learners, and the two phase process of prepare/promise and accept/accept request. It provides examples of Paxos in action and discusses its usage, limitations, references, and related algorithms like Multi-Paxos and Raft.
- Public key cryptography uses key pairs consisting of a public key and a private key
- RSA is an asymmetric encryption algorithm that uses these key pairs
- In RSA, the public and private keys are generated based on selecting two large prime numbers p and q, and doing mathematical operations on them like multiplying them to get n, and using p and q to calculate φ
- A public exponent e is also selected such that it is relatively prime to φ
Block cipher modes describe how block ciphers encrypt data in blocks rather than a continuous stream. Electronic Codebook (ECB) encrypts each block deterministically, while Cipher Block Chaining (CBC) encrypts blocks in a chained manner using an initialization vector, making the encryption non-deterministic and preventing errors from propagating between blocks. Cipher Feedback (CFB) converts the block cipher into a stream cipher, allowing encryption of non-fixed length data without padding.
This document discusses the awk command and how it can be used to parse and extract data from text files and output. Awk allows specifying patterns to match and actions to perform on matches. Examples show using awk to extract specific fields from the /etc/passwd file and Apache log files. Pipelines combining awk with other commands like grep, sed and cut are demonstrated.
This document provides an overview of the awk programming language including its syntax, working methodology, built-in variables, operators, and examples. Some key points:
- Awk programs use patterns and actions to process input files line by line. Patterns are matched against each record and associated actions are performed.
- Built-in variables like FS, OFS, RS, NR, NF, FILENAME help manipulate the input/output and provide record information.
- Operators allow arithmetic, string, comparison, assignment and regular expression operations.
- Examples demonstrate using built-ins and operators to count fields, select records, and manipulate data from /etc/passwd.
This document provides an introduction to public key cryptography. It begins with an overview of Alice and Bob, who represent communication parties. It then discusses the history of encryption, including flaws in early substitution and Caesar ciphers. Frequency analysis is introduced as a way to break these simple ciphers. The document concludes by explaining the advantages of public key encryption over symmetric encryption, such as not requiring secure key exchange.
Puppet is a configuration management tool which allows easy deployment and configuration ranging from 1 to 1 thousand servers (and even more). Even though its common knowledge for devops, puppet is still a strange piece of software for developers. How does it work and what can it do for you as a developer?