System76 brings linux to the laptop – finally

February 2nd, 2011

I started using linux in 1995 as my primary operating system. Back then it was Slackware and took a LUG in order to even get your desktop to work. If anything changed in the kernel or on your hardware you were pretty much SOL. I rocked linux on an IBM dual processor desktop called Vador for most of my college years. I even had dual 21″CRT monitors which was about as baller as it got back then. RedHat 5 made the world a lot better but it was still a chore to install. In early 1998 I purchased my first gateway laptop. Gateway actually supported linux drivers for their laptops back then. This is before they started “apple” style stores and selling tv’s which ultimately lead to their demise. I kept my faith in linux. Then I bought a dell, HP, dell, and they all sucked. Power management, sound cards, external displays, cd writers, etc  all never worked the way they were suppose to. At least the way that it did on windows. Around that time Apple dropped their crappy OS and released OSX 10! The holy grail to laptops developers. I purchased the very first 17″ MBP that I could. 5 MBP later and about 40 for T8 Webware I still think they are the best laptop hardware I have ever owned….. Until last week.

For fun… OK for 16Gigs of ram and 8 cores of sandy bridge processor with a bad ass screen I ordered a decked out System 76 Gazelle. This pimped out machine was only 1700 too! Because a lot of the work I have been doing latly has been with Scala parallel collections and specifically akka for parallel processing it felt like a good excuse for testing. I was also jazzed to no longer deal with MacPorts or HomeBrew just Ubuntu Linux with EVERYTHING working. Remember why we all bought macbook pro’s as developers? So that everything worked. We all loved linux but we all needed to get things done. Messing with why our battery died when we shut the lid was not something that you could charge a client for! Developers we finally have a linux laptop that boots faster than a MBP, you can shut the lid and it works, and all the drivers for every port work out of the box. It even has a finger print scanner that is tied into authentication. With a laptop like this and the current anti developer mantra of apple we could actually all switch back to linux?!? Kind of crazy i know.

Regardless! Thank you System76. I never thought that the day would come were linux on a laptop was pleasant. Your product makes Linux on the laptop like the server, it just works. After 16 years of being a Linux advocate I feel like system76 makes it a reality for daily use.

scala

Scala is easier than PHP

November 17th, 2010

OK, that was a bit of link bating. However for the types of problems that I am currently working on it really is!  I have been asked a couple hundred times in the last 8 months why I tweet about Scala and Hbase all the time. The larger post is coming but I figured I could answer the technical scala question first. In order to stop the comment flames let’s start by saying that I know PHP better than most human beings. It is something that I have been coding in since PHP 3 and have really enjoyed the language the entire time. I still believe that PHP is the best language for the web for the majority of programmers; it quite possibly has the best documentation and examples of any language like a DSL for the web! I am still slinging PHP and so is my company. I have been a speaker at lots of php conferences, aided in php’s documentation, enjoyed the community, and for the past three years have been Zend Framework committer. That’s all to say that there are lots of other PHP developers that are smarter than me; but I probably have met them.

So why is Scala easier? First it’s easier when you have more requests than you know what to do with. Fundamentally it’s easier because it does so much under the hood for solving concurrency issues in a syntactically concise manor. I have found that as I have moved from writing code that is designed to persist data to a system of service that consist of multiple UI and data service inputs and outputs with different hotspots and unique data mutations requires a different toolset. Partial functions, mutable and immutable types playing together, and scala’s collection library just make this simple. If the system grows just snap on a trait to add what you forgot.  Let’s take Twitter for example. Robey  Pointer wrote Kestrel, and probably others that I don’t know, that enables a lot of real-time scale for them.  Kestrel is a loosely ordered message queue that eloquently wraps scala’s mutable queue hashmap with a swarm of actors to attack the queue. Not to short change Robey as his guthub account is one of the best in the community! But the scaffolding of scala really makes this solution possible. The syntax of scala and ease of deployment also probably made it a reasonable goal to attack while #failwail’s were abound!

Obviously many people have dealt with this scale  problem in PHP successfully. I however find it very difficult to mentor people through the depths of hell that I have been through. When it comes to scalability in PHP this is what your resume looks like.

  • Fantastic at PHP internals
  • Amazing at Apache HTTPD and compiling appropriate PHP extensions.
  • Nginx
  • BigIP – More than round robin load balancing
  • Intimately know how sessions work and probably write your own handlers
  • Memcached
  • APC
  • AMQP
  • BeanStalkd
  • Code based sharding or at least master/slave logic
  • C/C++
  • Lots of security! It’s a problem with all dynamic languages.
  • Zend Framework.

FYI the latest Zend Cluster Server really makes a TON of this easier! Bravo!

This is a really hard resume to replicate. I know; I have tried! More importantly it is very hard to debug. As we continue to add more screens, more protocols, and more data aggregation services, and frankly more data we need to be able use all cores in the server and the cluster. As Guy Steele implied at Strange Loop. The single processor programming model is going the way of the punch card.

What about bringing a scala programmer on board?

This is a scala resume.

It really is a grind to overcome that first 4-6 months but if you need scale I would recommend taking the haul. It will change how you think about problems forever. There is nothing like having your entire system in source code that can be type checked in your IDE as you write. No need for amqp with actors, no beanstalkd with mutable queues, and it’s fast as hell!

If joomla and wordpress do everything you need, then your cool! Just like my lame blog! In the same vain I believe that PostgreSQL is the best database for the majority of data persistence scenarios. Hopefully my next post will be why HBase is the bomb!

Special thanks to the following scala studs for getting me past the grind. I really appreaciate the community support so far! Follow these guys on twitter and read their blogs. They are leaders in the scala community but have still taken the time to answer my neive questions! Almost everything I know has come from their books or blog posts.

So is scala hard? Sure, but I personally recommend never bringing a knife to a gun fight. Especially when the competition has Uzi’s!

Wade

scala

Passing the AMFPHP torch

February 4th, 2010

I am stepping down from being the lead of AMFPHP as of January 2010 and passing the torch to Ariel Sommeria and Danny Kopping. The goal of AMFPHP was as follows:

  • Quick installation and implementation
  • Nothing required – PHP4/PHP5 compatible, no extensions needed
  • Low footprint, lightweight, fast
  • Convention over configuration (service and class mapping)
  • Can be embedded into a framework (see CakeAmfphp , Seagull )
  • Services are “non-specific” PHP classes that are portable to anything without code change
  • Productivity tools included (service browser, code gen, profiling)
  • Batteries included – XML-RPC, JSON
  • Not a framework by itself (use your own)
  • Examples
  • Mimic the AMF specification

When I started AMFPHP I was using Flash 8 to build RIA’s; boy the world has changed! I honestly can say I don’t personally agree with the goal of AMFPHP anymore. A week ago Patrick Mineault called me out on my motivation; he was right. I have since migrated to using Flex and even had the amazing opportunity to work on Flash Builder 4’s PHP integration. Overall my mission has changed and with it I tried to change AMFPHP. Sorry everyone; I didn’t even notice I was doing that! Overall I am probably much better at slinging PHP code than moderating a project. ;-) With that in mind I will still be committing updates and answering questions for both projects.

Flex Builder 4, Security (Zend_ACL), Robust Logging, Robust Authentication (Zend_Auth), ORM and Master/Slave DB’s (Zend_DB), Messaging (AMQP), 5.3 Naming Conventions, clean New BSD license, decoupled serialize, OOP code base, and a massive service catalog are why I will continue to work on Zend Amf. I believe that Zend Amf is a great solution for anyone looking to build RIA’s in PHP.

I’m sure AMFPHP and Zend AMF is dealing with a larger problem that Adobe is dealing with. How do we keep those that are getting started and need a quick solution and those that need enterprise architecture all happy under the same name; Flash. I wish Danny and Ariel the best of luck and will give them my full support with questions and introductions to the community at large! They have already released an updated patch available for download today!

AMFPHP, Flash Platform

10X Zend Amf Performance enhancements — please test!

January 18th, 2010

Mark Reidenbach from everytruckjob.com has submitted a awesome patch for Zend Amf that creates a huge performance increase. Thanks so much Mark! I have also added a reference check optimization that uses SPL_object_hash to quickly see if an object has been seen before or not. Overall you should see a big performance increase. The test case I used was the James Ward’s census data from my ZendCon talk which consists of random people objects ranging from 1 – 100 duplicates totaling 5k total rows.  Xdebug profiling analyzed by  KCacheGrind showed roughly a 10X increase in performance!

The question is did all of these changes introduce any bugs? I have not been able to find anything and all of the tests pass. However with such a major change I would really appreciate you downloading the attached file and overwriting Zend/Amf/* with it’s contents. Please report any issues in the comments here or better yet on the actual bug ZF-7493 If all goes well we will try and get this into the 1.10 release.

Amf_performace.zip

Flash Platform, Zend_Amf

T8DESIGN Changes Name to T8 Webware

October 26th, 2009

T8DESIGN Changes Name to T8 Webware
Financial Web strategy firm introduces new name to better reflect full scope of offerings, broadened expertise

Cedar Falls, IOWA, Oct. 26, 2009 – T8DESIGN, a provider of Web development, management and hosting services for the financial industry, today announced it has changed its name to T8 Webware. The new name more accurately reflects the full range of T8’s Web services as well as the company’s overarching strategy that focuses on providing financial institutions with a holistic, constantly connected Web experience.

“T8 originally began as a design and consulting company, but as our clients and their consumers’ needs for Internet tools evolve, we have identified an opportunity to completely restructure customer experiences on the Web,” explained Wade Arnold, CEO of T8 Webware. “With sophisticated yet simple content management tools, any size financial institution can leverage its Web site as another channel to position cross-sell opportunities to its customer or member base.

“We believe that the [new] name, T8 Webware, better encompasses the comprehensive Web experiences we deliver to our customers, and also opens the door for additional functionality as we continue to grow the digital solutions we offer.”

T8 Webware provides its customers with Web sites that are custom-designed to each financial institution, never derived from a template. The company offers Web site development, hosting and design and remote backup services. FREEDOM8, its content management system, additionally enables financial institutions to effectively update and alter their Web sites’ text and images. The tool’s ease of workflow allows T8 Webware customers to maintain an active Web presence, therefore improving their online traffic and organic search results. All of the company’s Web sites are mobile optimized, offering financial institutions’ customers the instant information that they need in an easily accessible format.

About T8 Webware
T8 Webware is a strategic Web development, management and hosting firm that caters specifically to financial institutions. The company provides progressive, non-template driven Web sites to more than 150 banks and credit unions, all of which are mobile-enabled. T8 Webware’s philosophy is to help financial institutions leverage their most powerful marketing tool, their Web site, to drive new business and build an online marketing presence. Most customers experience an ROI within months because of cross sales, while Web traffic is also dramatically improved.

The company’s content management system, FREEDOM8, enables financial institutions to provide updates to their Web sites by any authorized user, from any location at any time, while enforcing FFIEC guidelines and FDIC functional compliance. The user interface reflects a word processor format, making the system easy for anyone to use. For more information, visit www.t8webware.com or call 877.884.3327.

T8DESIGN

Zend Con 2009 session files

October 21st, 2009

Zend Con ’09 has already been a great event. If your not here you need to come in 2010! Attached are the files for my Zend Amf talk on Advanced Data Communication with the Flash Platform

Session Files

Here are all the resources too!

Zend AMF Downloads

http://framework.zend.com/download/amf

Adobe Flash Builder 4 beta 2
http://labs.adobe.com/technologies/flashbuilder4/

New PHP Features in Flash Builder 4 – Part 1: Data-Centric Feature Overview

http://ria.dzone.com/articles/new-php-features-flash-builder

New PHP Features in Flash Builder 4 – Part 2: Using Zend AMF and Flash Remoting

http://ria.dzone.com/articles/new-php-features-flash-builder-2

James Ward Census

http://www.jamesward.com/blog/2007/04/30/ajax-and-flex-data-loading-benchmarks/

ActionScript 3, Flash Platform, Speaking, Zend_Amf

ZF 1.8.4 breaks addDirectory()

June 27th, 2009

Looks like a bug was introduced in 1.8.4 that breaks class loading from the addDiretory() method. If  you use require_once with setClass or just use the 1.8.3 Zend_Amf_Server class file it will work. Unfortunitly I didn’t write the affected change but hope to have

=== Update July 1st 2009 ===

For some reason in 1.8.4 package there’s an old version of Zend/Loader/PluginLoader.php.

Take the new one here:

http://framework.zend.com/svn/framework/standard/branches/release-1.8/library/Zend/Loader/PluginLoader.php

It should work with it and the Zend Framework team is going to patch the 1.8.4 release on June 2nd to resolve this release issue.

== Update July 7th 2009 ==

http://devzone.zend.com/article/4808-Zend-Framework-1.8.4pl1-Now-Available

This patch-level version corrects a missing patch for Zend_Loader_PluginLoader that provided some critical functionality for Zend_Amf users. If you utilize that component, you are encouraged to upgrade immediately; for all other uses, the release tarball remains the same as the 1.8.4 version, and upgrading is left to your discretion.

Flash Platform, Zend_Amf

Major Zend Amf updates for 1.8.4 release

June 23rd, 2009

Lots of changes made to Zend Amf made there way into Zend Frameworks next mini release for 1.8.4. I thought that I would run through the major changes. Special thanks to Stefan Klug for all of the patches that he produced! Absolutely grateful sir! This is probably the biggest update to the system since the first release. Please make sure that you test 1.8.4 before you push it into your production environment. Why? Well if your like me you probably built a couple work arounds for some of these bugs. Those work arounds may no longer work once the bug is fixed!

Major Changes

ZF-6641 Shared references are duplicated
ZF-6205 Serializer does not support cyclic references
ZF-6393 Wrong Amf0_Amf3 reference counting
ZF-5382 Multiple calls seems to break the deserializer.
ZF-6625 Zend Amf can load any instantiated PHP class. Security

Minor but significant changes

ZF-6975
Adobe Flash Builder 4 wizard now supports data types for introspection.
ZF-6992 Negative integers on 64 bit system is resolved.
ZF-6775 Unable to send Array’s from Blaze DS.

The 1.8.4 release has already been tagged and should come out sometime today 6/23/2009

AMFPHP, Flash Platform, Zend_Amf

ArrayCollection beta update in Zend Amf: thoughts?

June 15th, 2009

I started working on a project this week that extensively uses ArrayCollection’s and I found that ZendAmf could use a couple additions in order to have some utilities for working with ArrayCollections in PHP. The new feature relies heavily on PHP’s SPL and specifically Countable, ArrayAccess, and IteratorAggregate all of which require PHP 5.2.3 or greater.

The following file can be added to your Zend Amf project to play with some of these features. Please let me know if there is anything else that I should add before it is added in the next release. Please post feedback to the blog or directly to the Zend Framework feature request.

Alpha Zend_Amf_Value_Messaging_ArrayCollection

To create an ArrayCollection

$this->_data[] = array('foo' => 'foo1', 'bar' => 'bar1');
$this->_data[] = array('foo' => 'foo2', 'bar' => 'bar2');
$this->_arrayCollection = new Zend_Amf_Value_Messaging_ArrayCollectionTwo($this->_data);

To Create an ArrayCollection from a Zend_Db_Table_row

$table = new Bugs();

$select = $table->select();
$select->where('bug_status = ?', 'NEW');

$rows = $table->fetchAll($select);
$this->_arrayCollection = new Zend_Amf_Value_Messaging_ArrayCollectionTwo($rows);

To alter an element of an ArrayCollection

$this->_arrayCollection = new Zend_Amf_Value_Messaging_ArrayCollection($this->_data);
$total = count($this->_arrayCollection);
echo($total); // outputs 2

To get the size of the array collection


to iterate through the ArrayCollection

$count = 0;
foreach($this->_arrayCollection as $row) {
    $count++;
}
$this->assertEquals(2, $count);

To manipulate an ArrayCollection based on keys.

$this->_arrayCollection = new Zend_Amf_Value_Messaging_ArrayCollection($this->_data);

// See if the offset key exists
$boolean = $this->_arrayCollection->offsetExists(1);

// Alter or add the row at they key offset of 1
$data = array('fooSet' => 'fooSet2', 'barSet' => 'barSet2');
$this->_arrayCollection->offsetSet(1,$data);

// Remove the row at the offset key of 3
$this->_arrayCollection->offsetUnset(3);

// Get the row at the offset 6
$row = $this->_arrayCollection->offsetGet(6);

To change an ArrayCollection to an Array

$standardArray = iterator_to_array($this->_arrayCollection);

To append another row to an ArrayCollection

$this->_arrayCollection->append(array('kung' => 'foo', 'Bruce' => 'Lee'));

– Update –
From a PHP developers perspective this makes little since. I am asking that you comment why you like the new ArrayCollection. I am creating something that can already be done with an array in PHP and then just wrap it into a stub ArrayCollection class. The two things that action script does not do with an array is:

it can not handle sparse array’s. {1=> one, 2=>two, 4=>four} this is a sparse array and Action Script will try and pad the array or just make it an object.

Actionscript can not use strings as the key in the array so it just uses an object. If you want a numerically keyed array of objects they call it an ArrayCollection.

Both of these concepts are handled in PHP as just an Array. So there is no reason that you could not use the Array and then pass the array into a simple ArrayCollection class for it to be parsed back to flex. So when you see the new ArrayCollection class what are the use cases that you feel you would use the class for? Is it just a convenience tool or does it add complexity that does not need to exists?

ActionScript 3, Flash Platform, Zend_Amf

Adobe Flash Builder 4 Beta for PHP developers

June 9th, 2009

I am giving a couple e-seminars about some of the new  features exposed in Flash Builder 4. The examples are all going to be PHP but it the majority of the talk is on tooling. Come check it out and ask questions. It’s still beta so if you want something changed now is the time to ask!

Adobe® Flash Builder 4 Beta (formerly Flex Builder) for PHP developers
Tuesday, June 9, 2009 12:00 PM PT
Thursday, July 16, 2009 11:00 AM PT

Learn about the new improvements with Adobe Flex 4 Beta and how developers working with Flex and PHP are boosting their productivity by combining it use with Zend. This demonstration will show you how you can create a combined project with Flex components and PHP natures and reap the benefit of coding in both languages.

Flash Platform, Zend_Amf