Gamium and Peachpie

PeachPie is a PHP compiler for the .NET platform. If you’re not a web developer nerd, none of that really matters. For the rest of us, let’s continue.

The core of the Gamium Recommendation Engine is built in PHP. PHP is my go-to web language, and with the power of Composer and Packagist, you can usually get 50% or more toward your application’s end goal with PHP.

(The footer of this website calls out some Packagist packages I’ve used to help build the Gamium Recommendation Engine.)

The one downside of PHP is that it’s, at it’s core, still an interpreted language. Gamium Recommendation Engine does a whole bunch of data shuffling and math at it’s inside core, so I was curious if there might be a way to speed up that portion of the application.

Enter Peachpie.

Peachpie compiles PHP down to .NET CLR which can then be run on .NET Core. This allows your application to be compiled to run on the hardware a lot closer than the PHP interpreter can go.

This also provides an excellent feature, whereby you can use .NET libraries in your PHP applications. There’s quite a few really good data analysis libraries in .NET and I hope to explore them more in the future to hypercharge the Gamium Recommendation Engine.

In the future, I expect to write some of the core components of Gamium in Peachpie PHP. I’ll be experimenting on this front and writing about my experiences. Gamium itself is an ongoing experiment, so it just adds another dimension of exploration.