This is the final section of a 4-part series on writing PHP extensions. Setting Up PHP – compiling PHP for extension development Hello, world! – your first extension Working with the API – the PHP C API Classes – creating PHP objects in C Objects branch: oop This section will cover creating objects. Objects areContinue reading “PHP Extensions Made Eldrich: Classes”
Author Archives: kchodorow
PHP Extensions Made Eldrich: PHP Variables
This is section 3 of a 4-part introduction to PHP extensions: Setting Up PHP – compiling PHP for extension development Hello, world! – your first extension Working with the API – the PHP C API Classes – creating PHP objects in C This section is, unfortunately, longer than all of the other sections combined. TheContinue reading “PHP Extensions Made Eldrich: PHP Variables”
PHP Extensions Made Eldrich: Hello, World!
This is part 2 of a 4-part tutorial on writing PHP extensions: Setting Up PHP – compiling PHP for extension development Hello, world! – your first extension Working with the API – the PHP C API Classes – creating PHP objects in C First we need to think of a name for our extension. I’veContinue reading “PHP Extensions Made Eldrich: Hello, World!”
PHP Extensions Made Eldrich: Installing PHP
A PHP extension allows you to connect almost any C/C++ code you want to PHP. This is a 4-part tutorial on how to write an extension: Setting Up PHP – compiling PHP for extension development Hello, world! – your first extension Working with the API – the PHP C API Classes – creating PHP objectsContinue reading “PHP Extensions Made Eldrich: Installing PHP”
PS1++
Since MongoDB was first created, the Mongo shell prompt has just been: > A couple of months ago, my prompt suddenly changed to: myReplSetName:SECONDARY> It’s nice to have more information the prompt, but 1) I don’t care about the replica set name and 2) a programmer’s prompt is very personal. Having it change out fromContinue reading “PS1++”
Mongo in Flatland
MongoDB’s geospatial indexing lets you use a collection as a map. It works differently than “normal” indexing, but there’s actually a nice, visual way to see what geospatial indexing does. Let’s say we have a 16×16 map; something that looks like this: All of the coordinates in our map (as described above) are somewhere betweenContinue reading “Mongo in Flatland”
NoSQL vs. the world
About a year ago, Mike Dirolf drew an enormous circle covering a sheet of paper. “Here are the people who use databases,” he said, “and here are the people who have even heard of NoSQL,” and he drew a circle this big: ° . I think that interest has grown since then. By this time,Continue reading “NoSQL vs. the world”
A finite simple group of order two
Andrew and I just returned from our honeymoon in the mountains, so I am now going to wax boring about how awesome it was. We really love rock climbing, so we went on a lot of rock scrambles. Rock scrambles involve “scrambling” around rocks, boulders, little cliffs, and crevices. We skittered down slippery sheets ofContinue reading “A finite simple group of order two”
Simulating Network Paritions with mongobridge
Note: mongobridge does not come with the MongoDB binaries, but you can build it by getting the source code and running scons mongobridge. Let’s say we have a replica set with members (M1, M2, and M3) and we want to see what happens when M1 and M3 cannot reach each other (or any other sortContinue reading “Simulating Network Paritions with mongobridge”
Trying Out Replica Set Priorities
As promised in an earlier post, replica set priorities for MongoDB are now committed and will be available in 1.9.0, which should be coming out soon. Priorities allow you to give weights to the servers, saying, “I want server X to be primary whenever possible.” Priorities can range from 0.0-100.0. To use priorities, download theContinue reading “Trying Out Replica Set Priorities”
