emGee Software Solutions Custom Database Applications

Share this

Web Technologies

Setting up MySQL Group Replication with MySQL Docker images

Planet MySQL - Thu, 10/04/2018 - 05:54

MySQL Group Replication (GR) is a MySQL Server plugin that enables you to create elastic, highly-available, fault-tolerant replication topologies. Groups can operate in a
single-primary mode with automatic primary election, where only one server accepts updates at a time. Alternatively, groups can be deployed in multi-primary mode, where all servers can accept updates, even if they are issued concurrently.…

Categories: Web Technologies

CSS Cube Login Form

Echo JS - Thu, 10/04/2018 - 02:16
Categories: Web Technologies

Publish/Subscribe UMD package

Echo JS - Thu, 10/04/2018 - 02:16
Categories: Web Technologies

MySQL Meetup in Dubai

Planet MySQL - Thu, 10/04/2018 - 01:10

We are happy to announce that there will be a MySQL Day/MySQL Community Meetup hold in Oracle Buliding in Dubai on October 17th. Please find more details below:

  • Date: Wednesday, October 17, 2018
  • Time: 6pm 
  • Address: Oracle Office Bulding #6, Dubai, Internet City 
  • Meeting room: will be confirmed soon.
  • Agenda: 
    • "Oracle MySQL 8 - The next big thing!" by Carsten Thalheimer the Master Principal Sales Consultant
    • Discussion & pizza
  • More information & Registration
Categories: Web Technologies

MySQL : InnoDB Transparent Tablespace Encryption

Planet MySQL - Thu, 10/04/2018 - 00:12

From MySQL 5.7.11, encryption is supported for InnoDB (file-per-table) tablespaces. This is called Transparent Tablespace Encryption or sometimes referred as Encryption at Rest. This blog post aims to give the internal details of InnoDB Tablespace Encryption.

Keyring Plugin : Why What How ?

Categories: Web Technologies

MySQL : InnoDB Transparent Tablespace Encryption

MySQL Server Blog - Thu, 10/04/2018 - 00:12

From MySQL 5.7.11, encryption is supported for InnoDB (file-per-table) tablespaces. This is called Transparent Tablespace Encryption or sometimes referred as Encryption at Rest. This blog post aims to give the internal details of InnoDB Tablespace Encryption.

Keyring Plugin : Why What How ?

Categories: Web Technologies

Percona Live Europe 2018 Session Programme Published

Planet MySQL - Wed, 10/03/2018 - 21:18

Offering over 110 conference sessions across Tuesday, 6 and Wednesday, 7 November, and a full tutorial day on Monday 5 November, we hope you’ll find that this fantastic line up of talks for Percona Live Europe 2018 to be one of our best yet! Innovation in technology continues to arrive at an accelerated rate, and you’ll find plenty to help you connect with the latest developments in open source database technologies at this acclaimed annual event.

Representatives from companies at the leading edge of our industry use the platform offered by Percona Live to showcase their latest developments and share plans for the future. If your career is dependent upon the use of open source database technologies you should not miss this conference!

Conference Session Schedule

Conference sessions will take place on Tuesday and Wednesday, November 6-7 and will feature more than 110 in-depth talks by industry experts. Conference session examples include:

  • Deep Dive on MySQL Databases on Amazon RDS – Chayan Biswas, AWS
  • MySQL 8.0 Performance: Scalability & Benchmarks – Dimitri Kravtchuk, Oracle
  • MySQL 8 New Features: Temptable engine – Pep Pla, Pythian
  • Artificial Intelligence Database Performance Tuning – Roel Van de Paar, Percona
  • pg_chameleon – MySQL to PostgreSQL replica made easy – Federico Campoli, Loxodata
  • Highway to Hell or Stairway to Cloud? – Alexander Kukushkin, Zalando
  • Zero to Serverless in 60 Seconds – Sandor Maurice, AWS
  • A Year in Google Cloud – Carmen Mason, Alan Mason, Vital Source Technologies
  • Advanced MySQL Data at Rest Encryption in Percona Server for MySQL – Iwo Panowicz, Percona, and Bartłomiej Oleś, Severalnines
  • Monitoring Kubernetes with Prometheus – Henri Dubois-Ferriere, Sysdig
  • How We Use and Improve Percona XtraBackup at Alibaba Cloud – Bo Wang, Alibaba Cloud
  • Shard 101 – Adamo Tonete, Percona
  • Top 10 Mistakes When Migrating From Oracle to PostgreSQL – Jim Mlodgenski, AWS
  • Explaining the Postgres Query Optimizer – Bruce Momjian, EnterpriseDB
  • MariaDB 10.3 Optimizer and Beyond – Vicentiu Ciorbaru, MariaDB FoundationHA and Clustering Solution: ProxySQL as an Intelligent Router for Galera and Group Replication – René Cannaò, ProxySQL
  • MongoDB WiredTiger WriteConflicts – Paul Agombin, ObjectRocket
  • PostgreSQL Enterprise Features – Michael Banck, credativ GmbH
  • What’s New in MySQL 8.0 Security – Georgi Kodinov, Oracle
  • The MariaDB Foundation and Security – Finding and Fixing Vulnerabilities the Open Source Way – Otto Kekäläinen, MariaDB Foundation
  • ClickHouse 2018: How to Stop Waiting for Your Queries to Complete and Start Having Fun – Alexander Zaitsev, Altinity
  • Open Source Databases and Non-Volatile Memory – Frank Ober, Intel Memory Group
  • MyRocks Production Case Studies at Facebook – Yoshinori Matsunobu, Facebook
  • Need for Speed: Boosting Apache Cassandra’s Performance Using Netty – Dinesh Joshi, Apache Cassandra
  • Demystifying MySQL Replication Crash Safety – Jean-François Gagné, Messagebird
See the full list of sessions Tutorial schedule

Tutorials will take place throughout the day on Monday, November 5, 2018. Tutorial session examples include:

  • Query Optimization with MySQL 8.0 and MariaDB 10.3: The Basics – Jaime Crespo, Wikimedia Foundation
  • ElasticSearch 101 – Antonios Giannopoulos, ObjectRocket
  • MySQL InnoDB Cluster in a Nutshell: The Saga Continues with 8.0 – Frédéric Descamps, Oracle
  • High Availability PostgreSQL and Kubernetes with Google Cloud – Alexis Guajardo, Google
  • Best Practices for High Availability – Alex Rubin and Alex Poritskiy, Percona
See the full list of tutorials. Sponsors

We are grateful for the support of our sponsors:

  • Platinum – AWS
  • Silver – Altinity, PingCap
  • Start Up – Severalnines
  • Branding – Intel, Idera
  • Expo – Postgres EU

If you would like to join them Sponsorship opportunities for Percona Live Open Source Database Conference Europe 2018 are available and offer the opportunity to interact with the DBAs, sysadmins, developers, CTOs, CEOs, business managers, technology evangelists, solution vendors and entrepreneurs who typically attend the event. Contact live@percona.com for sponsorship details.

Ready to register? What are you waiting for? Costs will only get higher!
Register now!

 

 

Categories: Web Technologies

The Codification of Design

CSS-Tricks - Wed, 10/03/2018 - 15:20

Jonathan Snook on managing the complexity between what designers make and what developers end up building:

Everything that a designer draws in a Sketch or Photoshop file needs to be turned into code. Code needs to be developed, delivered to the user, and maintained by the team.

That means that complexity in design can lead to complexity in code.

That’s not to say that complexity isn’t allowed. However, it is important to consider what the impact of that complexity is—especially as it relates to your codebase.

Jonathan continues in that post to argue that designers and developers need to be in a constant feedback loop in order to properly assess whether the complexity of the design is worth the complexity of the engineering solution.

I’ve been thinking about this sort of thing for a really long time as it applies to my work in design systems — I have a feeling this issue stems from the fact that designers and developers are trading with different currencies. Designers generally care about the user experience above anything else while developers may prioritize the code under the hood, willing to over-engineer something for this one tiny detail.

As Snook mentions later in his post, pattern libraries won’t solve this problem entirely:

This is why it’s important to have these conversations during the design process. It’s important to understand what the priorities are within your team. It’s important to understand what tradeoffs you’re willing to make. Without consensus within your team, you’ll continue to butt heads as the requirements of the front-end development team conflict with the requirements of the design team.

So, the best way to get those two groups to exchange the same currency is with talking, instead of tools. Or, perhaps by designing with code.

Direct Link to ArticlePermalink

The post The Codification of Design appeared first on CSS-Tricks.

Categories: Web Technologies

How Do You Put a Border on Three Sides of an Element?

CSS-Tricks - Wed, 10/03/2018 - 09:12

I saw a little conversation about this the other day and figured it would be fun to look at all the different ways to do it. None of them are particularly tricky, but perhaps you'll favor one over another for clarity of syntax, efficiency, or otherwise.

Let's assume we want a border on the bottom, left, and right (but not top) of an element.

Explicitly declare each side .three-sides { border-bottom: 2px solid black; border-right: 2px solid black; border-left: 2px solid black; }

While that's pretty clear, it's still making use of shorthand. Completely expanded it would be like this:

.three-sides { border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 2px; border-left-color: black; border-left-style: solid; border-left-width: 2px; border-right-color: black; border-right-style: solid; border-right-width: 2px; } Knock off one of the sides

You can save a little code by declaring the border on all four sides with shorthand and then removing the one you don't want:

.three-sides { border: 2px solid black; border-top: 0; } Shorthand just the width .three-sides { border-color: black; border-style: solid; /* top, right, bottom, left - just like margin and padding */ border-width: 0 2px 2px 2px; }

As a fun little aside here, you don't need to declare the border color to get a border to show up, because the color will inherit the currentColor! So this would work fine:

.three-sides { /* no color declared */ border-style: solid; border-width: 0 2px 2px 2px; }

And you'd have red borders if you did:

.three-sides { color: red; border-style: solid; border-width: 0 2px 2px 2px; }

Strange, but true.

If you want to add the color explicity, you can kinda mix-and-match shorthand, so this will work fine:

.three-sides { border: solid green; border-width: 2px 0 2px 2px; }

The post How Do You Put a Border on Three Sides of an Element? appeared first on CSS-Tricks.

Categories: Web Technologies

PM2 Runtime 3.2: Autumn Release

Echo JS - Wed, 10/03/2018 - 08:11
Categories: Web Technologies

Http errors package for Typescript - Evert Pot

Planet PHP - Wed, 10/03/2018 - 08:00

Hacktoberfest 5 has begon, and as my first contribution I wanted to make a tiny Typescript library with HTTP errors.

Whenever I start a new Javascript-based project, whether that’s on the server, or if I’m writing an API client with Fetch, I often find myself do the same thing over and over again, which is to define a simple set of exceptions representing HTTP errors, like this:

class NotFound extends Error { httpStatus = 404; }

A bit fed up with this, I decided to make a small package that’s just a list of errors for Typescript, along with some tiny utilities.

Example:

import { NotFound } from '@curveball/http-errors'; throw new NotFound('Article not found');

The idea is that the interface is really just this:

export interface HttpError extends Error { httpStatus: number; }

Which means that any error with a httpStatus property automatically follows this pattern, and generic middlewares can be written to listen for them.

It comes with a simple utility function to see if the Error conforms with this pattern:

import { isHttpError } from '@curveball/http-errors'; const myError = new Error('Custom error'); myError.httpStatus = 500; console.log(isHttpError(myError)); // true Problem+json

A great idea for emitting errors from a HTTP API is to use the application/problem+json format, defined in RFC7807. The package also contains a few utilities to help with these:

export interface HttpProblem extends HttpError { type: string | null; title: string; detail: string | null; instance: string | null; }

Every standard exception that ships with this package also implements this interface. Most properties (except title) default to NULL as they are likely applicatio

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

Categories: Web Technologies

Finding Table Differences on Nullable Columns Using MySQL Generated Columns

Planet MySQL - Wed, 10/03/2018 - 06:56

Some time ago, a customer had a performance issue with an internal process. He was comparing, finding, and reporting the rows that were different between two tables. This is simple if you use a LEFT JOIN and an 

IS NULL  comparison over the second table in the WHERE clause, but what if the column could be null? That is why he used UNION, GROUP BY and a HAVING clauses, which resulted in poor performance.

The challenge was to be able to compare each row using a LEFT JOIN over NULL values.

The challenge in more detail

I’m not going to use the customer’s real table. Instead, I will be comparing two sysbench tables with the same structure:

CREATE TABLE `sbtest1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `k` int(10) unsigned DEFAULT NULL, `c` char(120) DEFAULT NULL, `pad` char(60) DEFAULT NULL, PRIMARY KEY (`id`), KEY `k` (`k`,`c`,`pad`) ) ENGINE=InnoDB

It is sightly different from the original sysbench schema, as this version can hold NULL values. Both tables have the same number of rows. We are going to set to NULL one row on each table:

update sbtest1 set k=null where limit 1; update sbtest2 set k=null where limit 1;

If we execute the comparison query, we get this result:

mysql> select "sbtest1",a.* from -> sbtest1 a left join -> sbtest2 b using (k,c,pad) -> where b.id is null union -> select "sbtest2",a.* from -> sbtest2 a left join -> sbtest1 b using (k,c,pad) -> where b.id is null; +---------+------+------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+ | sbtest1 | id | k | c | pad | +---------+------+------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+ | sbtest1 | 4462 | NULL | 64568100364-99474573987-46567807085-85185678273-10829479379-85901445105-43623848418-63872374080-59257878609-82802454375 | 07052127207-33716235481-22978181904-76695680520-07986095803 | | sbtest2 | 4462 | NULL | 64568100364-99474573987-46567807085-85185678273-10829479379-85901445105-43623848418-63872374080-59257878609-82802454375 | 07052127207-33716235481-22978181904-76695680520-07986095803 | +---------+------+------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------+ 2 rows in set (3.00 sec)

As you can see, column k is NULL. In both cases it failed and reported those rows to be different. This is not new in MySQL, but it would be nice to have a way to sort this issue out.

Solution

The solution is based on GENERATED COLUMNS with a hash function (md5) and stored in a binary(16) column:

ALTER TABLE sbtest1 ADD COLUMN `real_id` binary(16) GENERATED ALWAYS AS (unhex(md5(concat(ifnull(`k`,'NULL'),ifnull(`c`,'NULL'),ifnull(`pad`,'NULL'))))) VIRTUAL, ADD INDEX (real_id); ALTER TABLE sbtest2 ADD COLUMN `real_id` binary(16) GENERATED ALWAYS AS (unhex(md5(concat(ifnull(`k`,'NULL'),ifnull(`c`,'NULL'),ifnull(`pad`,'NULL'))))) VIRTUAL, ADD INDEX (real_id);

Adding the index is also part of the solution. Now, let’s execute the query using the new column to join the tables:

mysql> select "sbtest1",a.k,a.c,a.pad from -> sbtest1 a left join -> sbtest2 b using (real_id) -> where b.id is null union -> select "sbtest2",a.k,a.c,a.pad from -> sbtest2 a left join -> sbtest1 b using (real_id) -> where b.id is null; Empty set (2.31 sec)

We can see an improvement in the query performance—it now takes 2.31 sec whereas before it was 3.00 sec—and that the result is as expected. We could say that that’s all, and no possible improvement can be made. However, is not true. Even though the query is running faster, it is possible to optimize it in this way:

mysql> select "sbtest1",a.k,a.c,a.pad -> from sbtest1 a -> where a.id in (select a.id -> from sbtest1 a left join -> sbtest2 b using (real_id) -> where b.id is null) union -> select "sbtest2",a.k,a.c,a.pad -> from sbtest2 a -> where a.id in (select a.id -> from sbtest2 a left join -> sbtest1 b using (real_id) -> where b.id is null); Empty set (1.60 sec)

Why is this faster? The first query is performing two subqueries. Each subquery is very similar. Let’s check the explain plan:

mysql> explain select "sbtest1",a.k,a.c,a.pad from -> sbtest1 a left join -> sbtest2 b using (real_id) -> where b.id is null; +----+-------------+-------+------------+------+---------------+---------+---------+------------------+--------+----------+--------------------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------+------------+------+---------------+---------+---------+------------------+--------+----------+--------------------------------------+ | 1 | SIMPLE | a | NULL | ALL | NULL | NULL | NULL | NULL | 315369 | 100.00 | NULL | | 1 | SIMPLE | b | NULL | ref | real_id | real_id | 17 | sbtest.a.real_id | 27 | 10.00 | Using where; Not exists; Using index | +----+-------------+-------+------------+------+---------------+---------+---------+------------------+--------+----------+--------------------------------------+

As you can see, it is performing a full table scan over the first table and using real_id to join the second table. The real_id is a generated column, so it needs to execute the function to get the value to join the second table. That means that it’s going to take time.

If we analyze the subquery of the second query:

mysql> explain select "sbtest1",a.k,a.c,a.pad -> from sbtest1 a -> where a.id in (select a.id -> from sbtest1 a left join -> sbtest2 b using (real_id) -> where b.id is null); +----+--------------+-------------+------------+--------+---------------+------------+---------+------------------+--------+----------+--------------------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+--------------+-------------+------------+--------+---------------+------------+---------+------------------+--------+----------+--------------------------------------+ | 1 | SIMPLE | a | NULL | index | PRIMARY | k | 187 | NULL | 315369 | 100.00 | Using where; Using index | | 1 | SIMPLE | <subquery2> | NULL | eq_ref | <auto_key> | <auto_key> | 4 | sbtest.a.id | 1 | 100.00 | NULL | | 2 | MATERIALIZED | a | NULL | index | PRIMARY | real_id | 17 | NULL | 315369 | 100.00 | Using index | | 2 | MATERIALIZED | b | NULL | ref | real_id | real_id | 17 | sbtest.a.real_id | 27 | 10.00 | Using where; Not exists; Using index | +----+--------------+-------------+------------+--------+---------------+------------+---------+------------------+--------+----------+--------------------------------------+

We are going to see that it is performing a full index scan over the first table, and that the generated column has never been executed. That is how we can go from an inconsistent result of three seconds, to a consistent result of 2.31 seconds, to finally reach a performant query using the faster time of 1.60 seconds.

Conclusions

This is not the first blog post that I’ve done about generated columns. I think that it is a useful feature for several scenarios where you need to improve performance. In this particular case, it’s also presenting a workaround to expected inconsistencies with LEFT JOINS with NULL values. It is also important to mention that this improved a process in a real world scenario.

Categories: Web Technologies

New White Paper on State-of-the-Art Database Management: ClusterControl - The Guide

Planet MySQL - Wed, 10/03/2018 - 05:11

Today we’re happy to announce the availability of our first white paper on ClusterControl, the only management system you’ll ever need to automate and manage your open source database infrastructure!

Download ClusterControl - The Guide!

Most organizations have databases to manage, and experience the headaches that come with that: managing performance, monitoring uptime, automatically recovering from failures, scaling, backups, security and disaster recovery. Organizations build and buy numerous tools and utilities for that purpose.

ClusterControl differs from the usual approach of trying to bolt together performance monitoring, automatic failover and backup management tools by combining – in one product – everything you need to deploy and operate mission-critical databases in production. It automates the entire database environment, and ultimately delivers an agile, modern and highly available data platform based on open source.

All-in-one management software - the ClusterControl features set:

Since the inception of Severalnines, we have made it our mission to provide market-leading solutions to help organisations achieve optimal efficiency and availability of their open source database infrastructures.

With ClusterControl, as it stands today, we are proud to say: mission accomplished!

Our flagship product is an integrated deployment, monitoring, and management automation system for open source databases, which provides holistic, real-time control of your database operations in an easy and intuitive experience, incorporating the best practices learned from thousands of customer deployments in a comprehensive system that helps you manage your databases safely and reliably.

Whether you’re a MySQL, MariaDB, PostgreSQL or MongoDB user (or a combination of these), ClusterControl has you covered.

Deploying, monitoring and managing highly available open source database clusters is not a small feat and requires either just as highly specialised database administration (DBA) skills … or professional tools and systems that non-DBA users can wield in order to build and maintain such systems, though these typically come with an equally high learning curve.

The idea and concept for ClusterControl was born out of that conundrum that most organisations face when it comes to running highly available database environments.

It is the only solution on the market today that provides that intuitive, easy to use system with the full set of tools required to manage such complex database environments end-to-end, whether one is a DBA or not.

The aim of this Guide is to make the case for comprehensive open source database management and the need for cluster management software. And explains in a just as comprehensive fashion why ClusterControl is the only management system you will ever need to run highly available open source database infrastructures.

Download ClusterControl - The Guide!

Tags:  clustercontrol database management MySQL MariaDB MongoDB PostgreSQL white paper
Categories: Web Technologies

Pages