Best practices for ElePHPants coding in Go

Coding in PHP to GO

Thanks to Guido da Rozza for the base image CC BY 2.0

I’ve often coded in PHP. Recently, I realized that when I code in Go, it’s easier to spot my PHPisms. After weeks of cleaning them up, it only takes a day to fry my brain with them again. I’m sure I’m not the only developer doing this, so I started collecting tips and tricks to help with the process. I’m sure other ElePHPants have their own tips and tricks, but here are a few of mine.

You don’t always need an additional memory allocation.

PHP’s API is formatted into functions that return values. Want to parse JSON? Just read a string into a variable and json_decode it.

I know – there are exceptions like fputcsv and fgetcsv. Still, you can anticipate that you pass a variable as input and get some kind of output. Variables, as opposed to resources, must be noted here.

Conversely, Go allows for variables as much as streams. You’re able to json.Marshal or json.(*Encoder).Encode an io.Reader.

In Go, you have to determine what to do and the ramifications of your actions. Will it be better to process loading/unloading from memory (json.Marshal) or just iteration through the io.Reader (json.Encoder)?

Continue reading “Best practices for ElePHPants coding in Go”

Upgrade to IronMQ v3 in Under 30 Minutes

Upgrade to IronMQ v3 Today!

Thanks to Johan Fantenberg for the base image CC BY 2.0

Earlier this week, Iron.io Customer Success Engineer JPK and I sat down with Michael Geneles and Stephen Kamenar from PitchBox to discuss their transition to IronMQ v3. Last Friday, they made the transition in less than 30 minutes! We were so impressed, we asked them for the details of their experience.

First, how does PitchBox leverage IronMQ? PitchBox helps marketers find online influencers. To accomplish that they crawl blogs and social media. Then, they run some fancy algorithms voodoo magic to process the results, and boom! Marketers are matched with their ideal influencers.

PitchBox’s dashboard is written in PHP. But, their crawler is an event driven NodeJS app. A couple thousand websites may need to be crawled and parsed at any given time.

Continue reading “Upgrade to IronMQ v3 in Under 30 Minutes”

Orchestrating PHP Dependencies with Composer and IronWorker

Package your dependencies on IronWorker using composer

 

This is a tutorial describing how to include and use the PHP package management tool Composer with IronWorker.

Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs, and it will install them in your project for you. Packagist is the main Composer repository. It aggregates all sorts of PHP packages that are installable with Composer.

Continue reading “Orchestrating PHP Dependencies with Composer and IronWorker”

Getting Pushy with Symfony2! (guest post)

This is a guest post from Keith Kirk who is VP Engineering at Underground Elephant. 

Message queues are not a new concept – neither is Push Notifications and surely not HTTP Posts for that matter. However, when you combine these ideas you have a very flexible queueing system.

Sprinkle in a little bit of Symfony’s EventDispatcher… suddenly your Symfony application starts to feel a whole lot more responsive. And that feels great. Continue reading “Getting Pushy with Symfony2! (guest post)”

Going (Almost) Serverless with Iron.io


The NoisyTwit App

This is a guest post by Dieter Van der Stock, a full-stack developer in Antwerp, Belgium. In it, he talks about his experience building NoisyTwit and how the combination of HTML/JavaScript, PHP, OAuth.io, and Iron.io made for a simple but scalable solution. 

Modern app development doesn’t need to be complicated as this post details. Continue reading “Going (Almost) Serverless with Iron.io”

Using Iron.io Workers for Large Scale PHP posting with Laravel (a repost from Scott Wilcox)


Scalable Workers in Laravel
One of the fun parts about working at Iron.io is being able to connect with developers working on some great projects.
One of these is Scott Wilcox, the developer of Tweekly.fm. His service posts Last.fm events to Twitter and has been growing in popular the last several months. Scott wrote a great post the other day on the growth of his service and the things he did to help scale the processing.

Continue reading “Using Iron.io Workers for Large Scale PHP posting with Laravel (a repost from Scott Wilcox)”

Yii + IronMQ = Yiiron → Giving a Powerful PHP Framework Even More Juice

 

Yii is a high-performance PHP framework designed for developing scalable applications. It  is a well proven and stable framework with a large following.

Yii comes with rich features – MVC, ActiveRecord, internationalization, caching, authentication,  role-based access control, scaffolding, testing, more. All these features translate into drastically reduced app development times, more readable code logic, and greater application stability and scale. A nice win if you ask us. Continue reading “Yii + IronMQ = Yiiron → Giving a Powerful PHP Framework Even More Juice”

IronWorker Goes Multi-Language! Now Supports Ruby, PHP and Python

 

Today marks a big milestone in the evolution if IronWorker: multi-language support. In addition to Ruby which we’ve supported from day one, we now support PHP and Python with more languages on the way. Which means if you’re using any one of those languages, you now have easy access to massive computing power. (boom)
Continue reading “IronWorker Goes Multi-Language! Now Supports Ruby, PHP and Python”