Skip to content

Easy Up Migration From Existing Log4Php Applications To Psr Logger Applications

It is a bit mean to put such a headline on top, but thats the current status we have to deal with at our company. I also don't want to bash somebody, Log4Php is doing its job in a great way. But since i developed a proxy logger component, i want to use it. The proxy logger component can work with psr logger interface, so i need to create a adapter to get it used ;-).

The psr and log4php adapter is a easy component and provides only two classes.

  • Log4Php to Psr Logger Bridge
  • Psr Logger to Log4PhP Bridge
  • Log4Php Logger Interface

The usage is simple, depending on the way you either choose the adapter "Log4PhpToPsrLoggerAdapter" or "PsrToLog4PhpAdapter". The only drawback, you are loosing the "trace" log level of log4php and all the fancy stuff of a log4php logger. This component is simple and has just a few lines of code (you are welcome to join), so the main focus is to support the log level methods like "$logger->warn()" and not more.

High-Performance Websites - PHPUG and WebPerformanceUG

Arne Blankerts, Stefan Priebsch - High-Performance Websites

This talk contains information about architecture.

Classical Architecture

When have done this for quite a while.

Browser->WebServer->PHP-Database

This works best in the past. General solution was to add more hardware and that leads to more errors.

  • monolithic architecture
  • normalized data (in database)
  • pull-principle (browser is build per request)
  • full page cache is bad
  • edge site include (for varnish/ESI) is also not the best solution

We are fast when:

  • no real workload per request
  • everything from memory
  • denomalized data
  • snippets

How Often Does Data Change (From Rare To Often)?

Based on the example of a shop system.

  • catalog
  • product information
  • price
  • availability

Who Changes Data?

  • editor
  • product manager
  • receipt of goods / outgoing goods

New Architecture (CQRS-Architecture)

  • images and static content is deliverd by static content webserver
  • only dynamic part is done by php
  • snippets are deliverd, not full pages

PHP->Key-Value-Store->Backend-Process->Database
or
PHP->Web-Service->Database

Benefit of key-value-store (for example redis) is, that the database itself can die and the only thing that happens is, that the entries are becoming obsolete.

But What About Filternavigation?

Use a searchengine that returns simple a collection of product keys. Use this product keys and ask the key value store to fetch product data.

But What About Personalization?

  • use snippets with variables and default values
  • fetch this snippet in the key value store
  • thanks to "time to death" feature provided by many key-value-stores, you can easily define "special offers" per day and so on

Nice meetup, incredible how many people are attending already.

Define The Unspeakable - PHPUG and WebPerformanceUG

2013-09-10 Hamburg, Otto, Loft 06

Judith Andresen - Make Mistakes The Right Way

Define The Unspeakable

Result

  • establishment
  • project
  • uniform

moral concepts (negotiable)

  • hanseatic
  • freaked out / nerdic
  • cutting edge

basic assumption

They are teached/ already at school level (errors are bad, don't do something wrong).

  • what can i do
  • who am i able to add critic to
  • natur
  • fellow men
  • industry

From the school already, we get trained to:

  • it is bad to say "that was my fault"
  • shift the know error to others
  • there is one majority out there who decides if this is a bad error
  • be perfect
  • always have a fallback (not to lose the face)

Define A Good Error Culture

This goals can be achived by exemplify the following steps (best by upper management but important for all).

  • "good" is enough
  • no fear of mistakes
  • many/fast update cycles (don't try to do big jumps, doing small steps results in small mistakes)
  • straightforwardness
  • to take the blame is not important
  • do not repeat your mistakes
  • do small and usefull steps (validate if your change contains a "only if")
  • use and understand the Twelve Principles of Agile Software
  • celebrate reached goals

Slides are available on judiths page. Again a nice talk and incredible what kind of easy mistakes we are doing in our regular live.

web - Muddi verchenk weitere Daten von den geknechteten Bürgern

[...]
Die Liste offen gebliebener Wirtschaftsfragen ließe sich beliebig fortsetzen. Bei der überfälligen Regulierung von Schattenbanken etwa hat man sich gerade einmal auf einen Zeitplan verständigen können. Von konkreten Vorschlägen bislang keine Spur. Und auch in Sachen Geldpolitik macht erst einmal jeder weiter, wie er will. Von einer internationalen Koordination ist in der Gipfelerklärung nichts zu lesen. Man sei sich der Risiken und Nebenwirkungen bewusst, heißt es vage.

Wirtschaftspolitisch wird dieser Gipfel also nicht in die Geschichtsbücher eingehen. Da helfen auch die von Bundeskanzlerin Angela Merkel als Erfolg verkauften Fortschritte im Kampf gegen die Steuerhinterziehung wenig. Dass man nun einen internationalen Standard entwickeln will, um Steuerdaten über Ländergrenzen hinweg automatisiert auszutauschen, ist zwar zu begrüßen. Google, Apple und Co. stärker zur Kasse bitten zu wollen, grenzt hingegen mehr an Populismus als an große Weltpolitik. Denn bei G20 sitzen die größten Wirtschaftsnationen der Erde alle im selben Boot: Sie stehen für 90 Prozent der globalen Wirtschaftsleistung. Hier verdienen die großen multinationalen Konzerne ihr Geld. Dass sie hier auch Steuern zahlen sollen, ist also keine Sensation, sondern eine Selbstverständlichkeit.
[...]


Quelle

Oh toll, da hat die Muddi wieder etwas verkackt, jetzt kommen also bald Gesetze, damit alle Staaten mein Geldfluß überprüfen können. Bald ist es schon verdächtig, wenn man mal etwas mit 100 Euro in Bar bezahlt. "Warum stört es sie, dass die ganze Welt lesen kann, wann Sie was wie und warum kaufen?", wird man sich dann anhören müssen ...
"Abwählen", "Fremdschämen", "Bedauern", man ist sich zunehmend unsicherer was man von der Regierung halten soll.