Showing entries 961 to 970 of 1121
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: PHP (reset)
HTTP High Availability with Wackamole

This is a distilled version of the talk I gave at the phpug Dortmund in March. I'll concentrate on the High Availability aspect here but I won't leave out Load Balancing completely. Also, this is in English while the talk was in German.

High Availability and Load Balancing

High Availability and Load Balancing are often used in combination if not synonymous which is as wrong as it can get. They certainly do have some things in common (several machines do something) and they are often needed at similar times (when a website becomes more important) but the fundamental ideas are quite different.

While Load Balancing spreads incoming http requests over several machines this is not a highly available setup. High Availability …

[Read more]
Vixie Cron and the new US DST

So, the new DST changes in the US caused a small stir among system administrators recently. We got all of our servers updated and verified they were working before the even. Or so we thought.

I noticed today that our 3PM Eastern newsletters arrived in my inbox at 3PM alright. However, I am in Central time. My immediate assumption was that we missed the server that sends that email out. Logging in I found the time correct on the server. It had received the appropriate updates thanks to portage. So, what happened? I looked at /etc/crontab and all was fine. I then looked at the system log where cron jobs are logged. Oddly, that log line said the job started at 15:00. I knew that was not correct. I started looking around at other cron jobs on other servers, especially ones that wrote files to disk. Sure enough, every server I checked was doing things an hour behind except one. It just so happens we had restarted cron on this server however last …

[Read more]
FrOSCon 2007: Call for Papers

The second Free and Open Source Conference "FrOSCon" takes place on August, 25th and 26th 2007 in Sankt Augustin, near Bonn, Germany. The conference is once again hosted by the faculty of computer science of the University of Applied Sciences Bonn-Rhein-Sieg in collaboration with the student body and the Linux/Unix User Group Sankt Augustin.

In a Call for Papers, the organizers ask for submission of contributions. A broad variety of topics concerning free and open source software is desired.

Contributions can be submitted in …

[Read more]
[Presentation announcement] HTTP Load Balancing & High Availability with Wackamole

[Update 16/03/2007]: Wrapped up a short post about the proceedings.

Next Thrsday, March 15th 2007, I'll give a short presentation on HTTP Load Balancing & High Availability with Wackamole at the PHP User Group Dortmund. We can use eZ System's office (cheers!) at Emil-Figge-Strasse 80. If you're in the area consider saying hello. We meet at 18:30 (that's 6:30pm :-) and I'll start with the presentation as soon as everybody is there and everything is set up.

You'll learn about how to reliably spread a lot of HTTP requests over a set of machines and when and why it is a good idea to do so. I'll shed some light on the confusion (even if you're not aware of any) about Load Balancing and High Availability and how they relate to scaling HTTP. That done, …

[Read more]
Profiled (and then trolled) on Linux.com

At last month’s Vancouver PHP Conference, local journalist Bruce Byfield gave me a quick interview about how I got involved in Free Software and Open Source. We chatted for a while about my time at MySQL, my bits of work in the PHP community and what I am currently up to. The interview turned into a profile for Linux.com that was published a few days ago.

I was a bit surprised to find that there have been a few anonymous trolls for the profile - I didn’t think that there would be any comments on the profile.

The Linux.com profile: …

[Read more]
Big arrays in PHP

Update: Terry Chay has answered my question about why this is happening. In a nutshell, PHP is using 33,160 opcodes and 33,157 regsters for the verbose code. In comparison, the serialized array only uses 5 opcodes and 2 registers. He used something called VLD, which I had not heard of, to figure all this out.

So, at dealnews, we have a category tree. To make life easy, we dump it to an array in a file that we can include on any page. It has 420 entries. Expanded, one entry may look like:

$CATEGORIES[202]['id'] = "202";
$CATEGORIES[202]['name'] = "clothing & accessories";
$CATEGORIES[202]['parent'] = "0";
$CATEGORIES[202]['standalone'] = "";
$CATEGORIES[202]['description'] = "clothing";
$CATEGORIES[202]['precedence'] = "0";
$CATEGORIES[202]['preferred'] = "0"; …
[Read more]
Sphinx Fulltext Search Engine Part III (continued)

I’m finally taking the time to continue this series =)

Lyrics Grep

For testing purposes, I went ahead and scraped about 60,000 song lyrics off of a number of sites and developed a simple search engine for them. The script that did the scraping is pretty nasty (to handle equally nasty HTML that I had to parse through), so I’m going to refrain from posting that script and save myself some embarrassment. Make a pot of coffee, sit down, and write one yourself (or something else that’s similar enough).

Database Schema

I created a new database called lyricsgrep with the following simple …

[Read more]
typesafe objects in PHP

I always disliked the way PHP handles Objects. There is no way to assign a type to properties. Validators have to be glued against the fields externally and you can't just generate a Object-Description (like WSDL) from a object either.

Usually you have DataObjects like:

/* a plain-old-php-object */

class Employee {
    var $employee_id;

    var $name;
    var $surname;

    var $since;
}

and as a human you immediatly how to use it:

$e = new Employee();

$e->name       = "Jan";
$e->surname    = "Kneschke";
$e->employeenr = 123;
$e->since      = mktime(0, 0, 0, 1, 1, 2005);

But you can also have a bad day and write something like:

$e->unknown = "value";
$e->since = "Monday";

The property unknown gets created automaticly in the object and since gets a invalid value. If you take a look at ActiveRecord in Rails you see how proper types …

[Read more]
php shell

The more I work with other languages like python and ruby I like their way how they work on problems. While PHP is very forgiving on errors, it is weak on the debugging side. It was missing a simple to use interactive shell for years. Python and Ruby have their ipython and iruby shell which give you a direct way to interact with the objects. No need to write a script and execute it afterwards.

Features

  • tab-completion (if readline() support is compiled into php)
  • handles FATAL errors (like calling a undefined function)
  • inline help
  • autoload() is enabled by default
  • works on all php platforms (shell wrappers for Unix and Windows)

Requirements

  • PHP 5 or later
  • ext/tokenizer has to be enabled (this is the default)
  • ext/pcre has to enabled (this is the …
[Read more]
LinuxTag Call for Papers Ends Tomorrow

Hurry up, submit a paper! The LinuxTag Call for Papers ends tomorrow, February 16th.

Short info about LinuxTag from the homepage:

LinuxTag 2007 opens doors from May 30 to June 2, 2007 on Berlin Expo Center under the Funkturm. We invite users and experts to learn at Europe’s leading conference and expo more about the potential of Linux, Open Source, and Free Software.

Showing entries 961 to 970 of 1121
« 10 Newer Entries | 10 Older Entries »