フィードアグリゲーター

PHP Architect: Serverless PHP With Bref, Part 1

planet PHP - 2019-05-09(木) 19:02:00

I've written a two-part series on Serverless PHP on AWS Lambda using Matthieu Napoli's Bref for php[architect].

Part one has been published in the May 2019 issue and if you're not already a subscriber, you should be!

If you just want to learn about Bref though, then my introduction to Bref is available for free, just for you!

カテゴリー: php

Sebastian Insausti: How to Deploy PostgreSQL to a Docker Container Using ClusterControl

planet postgresql - 2019-05-09(木) 18:55:18

Docker has become the most common tool to create, deploy, and run applications by using containers. It allows us to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. Docker could be considered as a virtual machine, but instead of creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they're running on and only requires applications to be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.

In this blog, we’ll see how we can easily deploy a PostgreSQL setup via Docker, and how to turn our setup in a primary/standby replication setup by using ClusterControl.

How to Deploy PostgreSQL with Docker

First, let’s see how to deploy PostgreSQL with Docker manually by using a PostgreSQL Docker Image.

The image is available on Docker Hub and you can find it from the command line:

$ docker search postgres NAME DESCRIPTION STARS OFFICIAL AUTOMATED postgres The PostgreSQL object-relational database sy… 6519 [OK]

We’ll take the first result. The Official one. So, we need to pull the image:

$ docker pull postgres

And run the node containers mapping a local port to the database port into the container:

$ docker run -d --name node1 -p 6551:5432 postgres $ docker run -d --name node2 -p 6552:5432 postgres $ docker run -d --name node3 -p 6553:5432 postgres

After running these commands, you should have this Docker environment created:

$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 51038dbe21f8 postgres "docker-entrypoint.s…" About an hour[...]
カテゴリー: postgresql

Interview with Michael Moussa

planet PHP - 2019-05-09(木) 18:09:00
カテゴリー: php

Luca Ferrari: The role of a role within another role

planet postgresql - 2019-05-09(木) 09:00:00

A recursive title for a kind of recursive topic: what does really mean to have a role into another one? This article tries to figure out some basic knowledge about it.

The role of a role within another role

After reading the very excellent article by Hans-Jürgen Schönig about roles, I decided to provide my own vision about users, groups and the more abstract role concept.

The word role

First of all, the word role has little to do with PostgreSQL: it is a word used in the SQL standard, so don’t blame our favourite database for using the same word to express different concepts like user and group.

Roles: are they users or groups?

The wrong part of the question is or: roles are both users and groups. Period. A role is a stereotype, an abstraction for saying a collection of permissions to do some stuff. Now, often a collection of permission is granted to a user, and therefore a role smells like an user account, but in my opinion this is just a coincidence. And in fact, as in the best system administration tradition, when you have to assign a collection of permissions to more than one user you need a group; roles can therefore smell like a group.
Remember: roles are collection of permission, what makes they smell as a group or an user is just the way you use them. If you use a role for a single user, then it is fine to think the role as an user account. If you use the role for more than one user, then it is fine to think the role as a group.
Now, if you think this is trivial and simple, consider that a role can smell...

カテゴリー: postgresql

11.3

postgresql.org - 2019-05-09(木) 09:00:00
11.3 is the latest release in the 11 series.
カテゴリー: postgresql

10.8

postgresql.org - 2019-05-09(木) 09:00:00
10.8 is the latest release in the 10 series.
カテゴリー: postgresql

9.6.13

postgresql.org - 2019-05-09(木) 09:00:00
9.6.13 is the latest release in the 9.6 series.
カテゴリー: postgresql

9.5.17

postgresql.org - 2019-05-09(木) 09:00:00
9.5.17 is the latest release in the 9.5 series.
カテゴリー: postgresql

9.4.22

postgresql.org - 2019-05-09(木) 09:00:00
9.4.22 is the latest release in the 9.4 series.
カテゴリー: postgresql

Mathias Verraes: Patterns for Decoupling in Distributed Systems: Domain Query

phpdeveloper.org - 2019-05-09(木) 07:00:02

Domain Query

Replace Free Queries with Domain Queries to decouple from knowledge of the server’s internals.

Problem

The word query is usually associated with database queries. There are however other ways we can query a system that we don’t perceive as a database. REST and GraphQL...

カテゴリー: php

Nasamuffin’s Geocities Page: Read-Writable Regular Expressions

phpdeveloper.org - 2019-05-09(木) 07:00:02

Regex is great, right? It’s concise, it’s precise, and the process of developing an expression that works just right is a hell of a lot of fun. Until you submit a patch to your coworkers with your beautiful expression, and they leave you comments like,

“How does this regex work?...

カテゴリー: php

Voices of the ElePHPant: Interview with Matthew Weier O’Phinney

phpdeveloper.org - 2019-05-09(木) 07:00:01

@mwop

Show Notes The Linux Foundation forms new Laminas project to support continued growth of Zend Framework and PHP tooling From Zend to Laminas Laminas Swoole – Production-Grade Async programming Framework for PHP

Audio

This episode is sponsored by...

カテゴリー: php

symfony Project Blog: SymfonyLive London 2019: meet the first selected speakers!

phpdeveloper.org - 2019-05-09(木) 07:00:01

SymfonyLive London 2019 is coming on September 12th and 13th. This year, we organize the 8th edition of the conference! Join us at the only Symfony conference in the UK for 2 days of Symfony downtown London:

Pre-conference workshop day on September 12th. Workshops topics will be announced soo...

カテゴリー: php

Tomáš Votruba Blog: End of goPhp71.org

phpdeveloper.org - 2019-05-09(木) 07:00:01

I launched goPhp71.org in June 2017, just 6 months after release of PHP 7.1. In those times nobody was sure what version to require - 7.1? 7.0? Or wait for 7.2?

Future is now. There is no need for the initiative now and it's time to let it go.

How much did it cost? What was the effect? ...

カテゴリー: php

Laravel News: Laravel 5.8.16 Adds New Migration Events

phpdeveloper.org - 2019-05-09(木) 07:00:01
The Laravel team released Laravel v5.8.16 yesterday with new migration events and adds the ‘Renderable’ contract to the MailMessage class. Visit Laravel News for the full post. The post Laravel 5.8.16 Adds New Migration ...
カテゴリー: php

phpday 2019

php.net - 2019-05-08(水) 16:28:01
カテゴリー: php

Hans-Juergen Schoenig: PostgreSQL: Using CREATE USER with caution

planet postgresql - 2019-05-08(水) 15:45:45

PostgreSQL offers powerful means to manage users / roles and enables administrators to implement everything from simple to really complex security concepts. However, if the PostgreSQL security machinery is not used wisely, things might become a bit rough.

This fairly short post will try to shed some light on to this topic.

The golden rule: Distinguish between users and roles

The most important thing you got to remember is the following: You cannot drop a user unless there are no more permissions, objects, policies, tablespaces, and so on are assigned to it. Here is an example:

test=# CREATE TABLE a (aid int); CREATE TABLE test=# CREATE USER joe; CREATE ROLE test=# GRANT SELECT ON a TO joe; GRANT

As you can see “joe” has a single permission and there is already no way to kill the user without revoking the permission first:

test=# DROP USER joe; ERROR: role "joe" cannot be dropped because some objects depend on it DETAIL: privileges for table a

Note that there is not such thing as “DROP USER … CASCADE” – it does not exist. The reason for that is that users are created at the instance level. A user can therefore have rights in potentially dozens of PostgreSQL databases. If you drop a user you cannot just blindly remove objects from other databases. It is therefore necessary to revoke all permissions first before a user can be removed. That can be a real issue if your deployments grow in size.

Using roles to abstract tasks

One thing we have seen over the years is: Tasks tend to exist longer than staff. Even after hiring and firing cleaning staff for your office 5 times the task is still the same: Somebody is going to clean your office twice a week. It can therefore make sense to abstract the tasks performed by “cleaning_staff” in a role, which is then assigned to individual people.

How can one implement this kind of abstraction?

test=# CREATE ROLE cleaning_staff NOLOGIN; CREATE ROLE test=# GRANT SELECT ON a TO cleaning_staff; GRANT test=# GRANT cleaning_staff TO joe; GRANT ROLE

First we create a role called “cl

[...]
カテゴリー: postgresql

Interview with Michael Moussa

planet PHP - 2019-05-08(水) 07:38:00
カテゴリー: php

ページ