SitePoint PHPAn Introduction to ChatOps: Devops Meets IM (30.10.2014, 23:30 UTC)

This article is sponsored by VictorOps. Thank you for supporting the sponsors who make SitePoint possible!

Developers often use email as their primary mode of communication. Be it downtime alerts, 500 errors or repository commits — all of them are redirected to your email account so that everything can be found in a single place.

But email isn’t really suited to this kind of task. Email makes real-time communication difficult, and conversations can easily become unwieldy, with long delays and a lack of immediacy, particularly when you’re communicating with people in different timezones.

Chat, on the other hand, offers a more immediate way to resolve an issue. You can see who is online at a particular moment, you can share information with multiple people to receive feedback quickly, and you can even perform actions from right within the chat client, via integrations with services like GitHub’s Hubot.

We’ve come a long way from the days of Yahoo, AOL and Microsoft Messenger. Chat is no longer just a text-based interaction between two people — it’s developed into something more, something productive.

This article will cover the emerging trend of ChatOps, outlining some popular uses of chat in a devops setting, and then explain how you can take your ChatOps further with advanced integrations with VictorOps.

Let’s Chat

Popularized by GitHub, ChatOps is putting tools in the middle of the conversation. With development teams often distributed globally, there is a need for a centralized communication system which also automates certain processes like continuous deployment. GitHub started the trend with their bot, Hubot.

There are many popular chat applications in use in the tech industry. I recently wrote about using Slack for workplace collaboration, but HipChat is also popular. Most of the best chat clients offer direct messaging, multiple channels for different subjects or areas, and advanced file-sharing and integration abilities.

These apps are capable of making a world of difference to the development cycle. There are different chat-based tools and commands for different tasks, such as starting new instances of virtual machines, sending newsletters or deploying code to your main server. Traditionally, each of these tasks would involve working on different tools but with programmable chat bots these tasks can be performed by simple commands run on the chat application.

Imagine connecting with Amazon Web Services to spring up instances with just a single chat command, or deploying your latest commit to the server with the help of GitHub integrations. Or how about checking how many visitors your website has through an analytics system? Perhaps you’re just happy checking your team’s progress through Trello or Asana within your chat application of choice?

ChatOps can increase the efficiency of your team, saving time that would otherwise be wasted on redundant processes.

A standard chat app is certainly useful in improving developer communications. But when it comes to helping developer teams manage incidents, an integration with an on-call alert and management platform like VictorOps is even better.

Continue reading %An Introduction to ChatOps: Devops Meets IM%

Link
Christian Weiskegrauphel: Tomboy notes sync server (30.10.2014, 21:16 UTC)

I spent the last two months working on grauphel, an ownCloud app that implements the Tomboy REST API . With grauphel you can synchronize notes across computers and mobile devices.

With version 0.4.0 that I released yesterday, all features I wanted are implemented: Syncing, OAuth token and database management, searching and viewing notes.

The following clients work with grauphel: Conboy (Nokia N900 - Maemo), Tomboy (Linux, Windows) and Tomdroid (Android).

The source code is licensed under the AGPL v3. You can download grauphel from its homepage and get the sources from its git repository or the github mirror.

Screenshots

ownCloud app menu with grauphel grauphel start page Authorize an OAuth client List of notes in the test category Viewing a note Searching notes OAuth token management Database statistics and management

Screencast

Here is how you setup note synchronization on Android between Tomdroid and grauphel:

grauphel?

grauphel is got its name after assessing the previous official tomboy note server implementations: Snowy and Rainy.

Snowy (written in python) is dead, and Rainy requires Mono to run :/ No way I would install that on my server.

The only other alternative was Ubuntu One, which was shut down mid of 2014. Now there is grauphel to self-host on a standard PHP server.

<script type="text/javascript" src="http://cweiske.de/tagebuch/js/shadowbox/shadowbox.js"> <script type="text/javascript"> Shadowbox.init({ continuous: true, displayCounter: false, displayNav: true, handleOversize: "resize" });
Link
SitePoint PHPThe Forum PHP Report (30.10.2014, 16:00 UTC)

Forum PHP is an annual PHP conference in Paris, France. This year, I was invited as a speaker and talked about work automation with some interesting tools and libraries.

Organization

The conference is organized by AFUP, the French Association of PHP Users - a.k.a. the French PHP user group. Under the overwhelmingly capable leadership of Fabrice Bernhard, Maxime Teneur and Thierry Marianne and the ever watching eye of Amelie, a wonderwoman who corresponded with everyone and made sure all arrangements were in order, the conference took place in its entirety at Le Beffroi, home of the biggest elePHPant you’ve ever seen.

Continue reading %The Forum PHP Report%

Link
Ilia AlshanetskyZendCon - Profiling with XHProf (30.10.2014, 14:54 UTC)
My slides from ZendCon 2014 on "Profiling with XHProf" are now available for download here:
Slides
Link
SitePoint PHPThe 100 Year Old Trick to Writing at 240 Words Per Minute (30.10.2014, 02:20 UTC)

Stenotype machine

Ever seen one of these badboys? This was some serious state-of-the-art tech in 1912 -- the stenotype machine.

If you haven't come across one in real-life, you've most likely seen them in TV or movies. In courtroom dramas there's often a primly-dressed woman to one side quietly tapping away at what looks like a baby typewriter.

Stenography is still a specialist skill that requires significant training and practice to master, but that is still in high demand.

The stenotype machine has just 22 keys and no spacebar. Rather than typing each letter to build a word, stenographers use key combinations -- much like chords on a piano -- that can trigger much longer words.

How stenography works - chords versus strokes.

Originally stenographers produced rolls of coded shorthand that were later manually converted to plain text. Today's more advanced machines handle the conversion in realtime.

Beside court reporting, stenographers are often used in live captioning of television, as well as other general business situations.

While there are friction points to learning stenography, there's a good reason why stenographers take on the expensive tuition fees, the steep learning curve and the overpriced hardware (top-end machines are over $4,000).  

Stenography is fast. Really fast.

A good stenographers can cruise along at 240 words per minute with 99.9% accuracy. That's a single mistake every four pages.

Ok. And I care..., why?

About four years ago, stenographer Mirabai Knight came to the conclusion that stenography had been a walled garden for too long -- controlled and marginalized by big companies. She set about creating her own affordable hardware and open source sofware designed to set stenography free to the masses.

This system -- called Plover -- can be used by book authors, journalists, bloggers and -- importantly for us -- coders and developers in our daily work!

Continue reading %The 100 Year Old Trick to Writing at 240 Words Per Minute%

Link
Ulf WendelPECL/mysqlnd_ms needs updates for MySQL Group Replication (30.10.2014, 00:41 UTC)

‘Synchronous’, multi-master, auto-everything – that’s the new MySQL Group Replication (IPC14 talk/slides) in simple words. After torturing PHP developers for decades with MySQL Replication there is now a new replication option which does not require read-write splitting. A system that does not know about slave lags and reading stale data. In theory, MySQL Group Replication is just about the perfect approach to run a standard PHP application (WordPress, Drupal, …) on a small cluster (3-7 nodes) in LAN settings. In theory, MySQL Group Replication improves both availability and performance.

MySQL Group Replication talk given today at the International PHP Conference 2014 (Munich)

Distribution Transparency

When designing replication systems there are some desireable goals which contradict each other. In a perfect world, from a developers perspective, a database cluster would behave exactly the same way as a single database. The user should never have to worry where and how data is stored in the cluster. Transactions executed on the cluster would provide the same properties like transactions run on a standalone database. The cluster would never return stale data (synchronous).

Synchronous replication is desired but it requires coordination among cluster nodes. In LAN settings coordination can be reasonably fast. MySQL Group Replication is ‘synchronous’ replication (see slides for details). Deploy it on LAN only. In the internet, in WAN settings, when trying to replicate from Europe to Asia things will be slow. If WAN, then either forget about distribution transparency or performance. If WAN, go for asychronous MySQL Replication.

The extra work different clusters cause for the developer

Synchronous and asynchronous clusters always cause some extra work for the developer. Either approach requires load balancing and failover logic. An asynchronous approach adds: dealing with delays and stale reads. MySQL Replication is not only asynchronous but has only one master (primary). This adds: read-write splitting.

PECL/mysqlnd_ms tries to help with all these tasks and take them over in a semi-transparent way.

PECL/mysqlnd_ms support for synchronous clusters

PECL/mysqlnd_ms is a plugin for mysqlnd. PDO_MySQL and mysqli use mysqlnd as their default library to talk to MySQL. Any of the two APIs works with PECL/mysqlnd_ms, our load balancing and replication plugin.

The plugin monitors many API calls and aims to make using any kind of MySQL clusters easier. No matter what cluster: MySQL Replication, MySQL Cluster, MySQL Group Replication, 3rd party solutions. Example configurations are given in the PHP manual.

MySQL Group Replication usage task 1: load balancing

When moving an application from a single database server to a synchronous cluster there are two additional tasks: load balancing and failover. With PECL/mysqlnd_ms load balancing does no require any code changes. The plugin intercepts your connect calls and tests whether the host you connect to matches the name of a config entry. If so, the plugin loads the config, learns from the config which nodes there are and starts load balancing connection. Should you be too lazy to change the host name in your connects to match a PECL/mysqlnd_ms config entry, then just name the config entry after you current host names, have a config entry for ’127.0.0.1′ etc.

$link = new mysqli("myapp", ...);

MySQL Group Replication usage task 2: failover

The second task is to handle the failure of a cluster node and connect to the next available one. PECL/mysqlnd_ms does that for you if you want. It picks an alternative from the config and connect you to it.

There’s a small feature gap here. MySQL Group Replication tries to be an auto-everything solution. It automatically detects failed nodes. It also fully automates adding new nodes to the cluster. That’s cool but it means that over time the set of nodes can change and your config needs to be updated.

The PECL/mysqlnd_ms feature gap

There are two options. First, you could deploy the config. Second, af

Truncated by Planet PHP, read more at the original (another 1228 bytes)

Link
Brandon SavageDuplication of effort and NIH (29.10.2014, 16:07 UTC)
The PHP community is engaged in a discussion on whether or not developers should spend time writing new packages that solve existing problems with existing solutions. Ian Landsman uses Laravel as an example of a framework that wouldn’t have existed if nobody ever pushed the envelope of package development. While I agree that Laravel has […]
Link
SitePoint PHP5 Easy Ways to Get Started with PHP on Vagrant (29.10.2014, 16:00 UTC)

Vagrant is a tool for creating and managing virtual environments that help many developers not have to care about the “works on my machine…” problem. Vagrant creates reusable development systems that can be used again and again, helping you keep your system clean of too many installations.

When you are focused on development and lack the skills of a sys admin, the best thing to do (if you are going to use Vagrant during development) is to try another way of setting up your Vagrant configuration.

When it comes to PHP development, there are some online services that simplify the setup and configuration of these Vagrant virtual machines. Here is a list of some of these services.

Continue reading %5 Easy Ways to Get Started with PHP on Vagrant%

Link
Anthony FerraraFoundations Of OO Design (29.10.2014, 16:00 UTC)
It's quite easy to mix up terminology and talk about making "easy" systems and "simple" ones. But in reality, they are completely different measures, and how we design and architect systems will depend strongly on our goals. By differentiating Simple from Easy, Complex from Hard, we can start to talk about the tradeoffs that designs can give us. And we can then start making better designs.

Read more »
Link
Christopher Jones"PL/SQL: The Scripting Language Liberator" - video recording now available (29.10.2014, 15:35 UTC)

Oracle University has released a video from Oracle OpenWorld of a great session by Steven Feuerstein and myself. We walked through a PHP application, showed some application tuning techniques for Oracle Database, and then looked at improving the use of Oracle Database features to aid performance and scalability, and also easily add features to the application.

The official blurb was:

PL/SQL: The Scripting Language Liberator: While scripting languages go in and out of favor, Oracle Database and PL/SQL persist, managing data and implementing business logic. This session walks through a web application to show how PL/SQL can be integrated for better logic encapsulation and performance; how Oracle's supplied packages can be used to enhance application functionality and reduce application complexity; and how to efficiently use scripting language connection and statement handling features to get better performance and scalability. Techniques shown in this session are applicable to mobile, web, or midtier applications written in languages such as JavaScript, Python, PHP, Perl, or Ruby on Rails. Using the right tool for the right job can be liberating.

The video is free for everyone. Lots of the other good content in the Oracle Learning Streams is available via subscription, if you're interested.

Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP