AMFEXT and CakePHP - Not Your Grandmother's Remoting Method


August 2, 2008 by Tom Maiaroto (0 Comments)

AMFEXT, the AMF extension for PHP allows data to be encoded and decoded by the web server much faster than other conventional remoting systems, such as AMFPHP, WebORB, etc. Since the extension is programmed with C and runs as an extension to PHP rather than a script, it encodes and decodes AMF messages much much faster. More information about AMFEXT here

There has been great efforts made by some people in the CakePHP community to use this extension with the CakePHP framework at a virtually transparent level. This continues the efforts of rapid development set forth by CakePHP. Simply by setting up the data for your views normally, you have the same data available to you through the gateway in Flash / Flex / Actionscript. It utilizes the new AMF3 encoding as well. It's lightning fast! 

The benefits are great and there's many possibilities now available to us. Think about tools to update blogs and other CMS' ... Think about various business type applications, since Flex sets us up with such great interfaces. Now combined with CakePHP, think about the scalability options; the use of multiple databases, the caching, and speed of development. Especially combined with the Flex framework. It's a great combination. Far better than most known remoting methods.  

I've setup a demo of CakePHP using AMFEXT with a simple search. Simply pass in a string to search the database for. There aren't many rows of data, but I'll add more. Here's the Flex view: http://www.etrcloud.com/amfext/amftest.html

Here's the normal HTML CakePHP view: http://www.etrcloud.com/amfext/names/retrieve/a
Note the a on the end of the URL is the string that's being passed to search for. Change it to some other characters to see. You can also see the SQL query that's being made.

EC2 Persistent Storage Options


April 22, 2008 by Tom Maiaroto (0 Comments)

So perhaps the biggets down-side (and I hope not the Achilles tendon) of Amazon EC2 is the lack of persistent storage ... out of the box.

Your data will be lost if your instance crashes. What are the odds? It depends on Amazon's reliability I suppose -- but also how clean you keep your server instance. Or even perhaps how many people hit your site that might cause some sort of instability. Maybe??

Anyway. There are persistent storage options through third party sources and Amazon is going to be providing persistent storage for EC2 soon which may make all this moot.

There are two big options that you have right now and with them you can mount an S3 partition like it was a physical local drive on an EC2 instance. It works quite well. There's ElasticDrive and PersistentFS.

I'll be comparing the two here soon. I have used ElasticDrive, and I'm going to use PersistentFS next. Differences? From what I can tell, slight and maybe they don't even matter for most users. There's a forum thread here where the two kinda duke it out. There's also this forum thread where I was asking a bunch of questions and very kindly someone at PersistentFS was very on top of everything. Perhaps that thread got off track it was originally about Amazon offering a persistent storage solution...which would make things like ElasticDrive and PersistentFS useless? Maybe. Maybe not. Probably not in the case of mounting something other than S3...but it may not be good for them. Though the thread is now moving off to discussions about reliability and how things work. Which is nice, contrasting current web hosting standards or practices with the Elastic Compute Cloud is very interesting. 

I just hope Amazon's persistent storage solution isn't outrageous. I don't think it's fair to pay extra for it...to a degree. I would expect it to cost money for a certain amount of space...But I would also expect a certain amount of persistent storage to come with each instance based on its size. We'll see what Amazon has in store for us soon...Until then, I'm going to check out other solutions and report my findings here. 

 

Changed Up FLV Conversion Process


April 21, 2008 by Tom Maiaroto (0 Comments)

So I changed up how videos are converted to FLV. I made it an action an admin needs to perform after uploading videos. I will also re-implement a cron job that can be controlled from the admin back end.

This pretty much puts the installation here on par with, if not slightly ahead of, the Minerva Blog installation. The next thing is of course to get it all setup with EC2 and load balanced/clustered. Aside from making a nice default theme to use. Can it be? A real working demo ready to show off? I sure hope. 

Well, it's back to the original task at hand now that I'm catching all up -- Working with Amazon EC2. 

Thank God for EC2


April 17, 2008 by Tom Maiaroto (0 Comments)

Just posting to vent my frustrations about Media Temple...Thank God for EC2...It's sooooo much better. I'm unsure why so many people use Media Temple (and even more confused about why they put logos on their site like it's something trendy or to be proud of...my feelings? Fuck you, I'm paying you, you can take your logo elsewhere because you sure as hell don't do anything great for me)...

Anyway, back to more configuration issues implementing code on those stupid crummy ass Media Temple servers that works just fine on EC2 and other shared hosts like Apthost, Lunarpages, etc. PROOF (in my mind) that MT has some serious issues they need to address.