Docker - Containerisation is the new Virtualisation

I'm a huge advocate of Platform as a Service (PaaS), specifically Heroku.

Heroku enables developers to forget about the infrastructure and middleware, allowing them to focus on their application (simply push code and let the platform do the rest).

The "secret source" of Heroku is the understanding that web apps, databases and worker jobs are just Unix processes and Unix doesn't care about the stack. It's this philosophy that enables Heroku to be cross-language, by focusing on Unix processes and producing environments (via Buildpacks) that can run any server process.

This is where containers come in! Heroku uses lightweight containers called Dynos, which run a single user-specified command. With containers you can very quickly and efficiently run thousands of services on a single virtual machine, each thinking they have their own system.

This is all great and it's a core part of why I love Heroku. However, it's what happens when you expand on this concept that things become really interesting...

Introducing Docker

Docker is an open-source project to easily create lightweight, self-sufficient containers from any application, that will run anywhere.

Let's break that down:

Open Source - Although Docker was created by a commercial company (dotCloud), it's open-source and has a thriving community.

Lightweight - Containers are insanely fast, providing bare-metal access to the hardware. No need to worry about a hypervisor layer.

Self-sufficient - Each container comprises of just the application and its dependencies. It runs as an isolated process in userspace on the host operating system, sharing the kernel with other containers.

Application - Containers package applications, not machines (making it application centric). Unlike traditional virtual machines a Docker container does not include a separate operating system.

Run Anywhere - Run on any machine, with guaranteed consistency, for example: local (OS X, Linux, Windows), Data Centre (Red Hat, etc.) and Cloud Infrastructure (AWS EC2, Rackspace, etc.)

The primary difference between a traditional Virtual Machine stack and a Docker stack, is that the Docker Engine container includes just the application and its dependencies. 

Virtual Machine Stack VS. Docker Stack

Why Docker?

With Docker, developers can build any application in any language using any toolchain. Just like shipping containers, “Dockerised” apps are completely portable and can be loaded anywhere. This provides developers complete flexibility and consistency, when developing applications.

Docker also has an impressive community offering, with over 13,000+ images available on Docker Hub. This enables rapid application development, through the use of pre-built capabilities.

However, Docker is not just great for developers, system admins can use Docker to provide standardised environments for their development, QA, and production teams, removing the challenges of ensuring consistency across different environments.

Get Started

I plan to post a lot more regarding Docker, but the easiest way to learn is to experience it for yourself. I suggest you head over to the official Docker Installation guide and look-up the instructions for your system, you can then grab an image from the Docker Hub (for example, Ghost, WordPress, PHP, etc.) and start playing.

I've already got a number of web application containers up and running across OS X and Ubuntu and I have set-up my own portable "Heroku-like" PaaS using Dokku, all powered by Docker!

Force.com Org Strategy

As highlighted in my previous article (Force.com Enterprise Application Platform), I have recently spent a lot of time positioning Force.com as an enterprise application platform.

This article focuses on one of the first design decisions, the org strategy!

What is a Force.com Org?

A fundamental part of the Force.com platform is an “organisation” or “org”. 

At a high level, a Force.com org is a logical instance of data and metadata for a set of users. An org is bound by both capacity limits (number of users and storage) and execution computing resources (query sizes and API limits). These limits will depend on your agreement with Salesforce.com and/or your license type.

Every user working on the Force.com platform will do so inside an org.

Enterprise Org Strategy

In a perfect world every company would have just one org for their organisation, however this is not always advisable. There are certain scenarios where a “multi-org” strategy will be required to meet the business need.

One thing that is clear is that you should plan your org strategy from day one! If you don’t it’s possible for your company to unintentionally expand across a number of orgs, which could significantly limit your future deployments, as well as dramatically increase the support complexity.

Single-Org Strategy

Single-Org Advantages:

+ Improved user experience (one Force.com login)
+ Simplified integration (data access and movement)
+ Reuse of objects, data and capabilities
+ Simplified collaboration (no cross-org Chatter)
+ Encourages consistency (developer standards and reviews)
+ Simplified licensing model
+ Cost benefits (purchase integrations and add-ons only once)

Single-Org Disadvantages:

- Complex security (one org = many apps / many business units)
- Complex release / code management (e.g. code merging)
- Increased pressure on Force.com limits (e.g. governor limits)
- Large data volumes (complicating archiving and backup)
- Requires “good citizen developers” to work in a shared environment

A single-org strategy places an emphasis on consistent global business processes and company-wide collaboration.

The key advantage being reuse of objects, data and capabilities, enabling faster development and reducing the need to replicate functionality across multiple orgs.

The key disadvantage is the complexity of managing a shared environment where multiple business units and developers will be deploying applications (often simultaneously). This creates a complex security model and forces the need for a dedicated DevOps team to manage code movement, merging, etc.

Multi-Org Strategy

Multi-Org Advantages

+ Simplified security (one org = one app)
+ Simplified release / code management
+ Reduced pressure on Force.com limits (e.g. governor limits)
+ Smaller data volumes (simplifying archiving and backup)
+ Provides business unit autonomy via a dedicated org

Multi-Org Disadvantages

- Poor user experience (multi-logins, can be mitigated via SSO)
- Complex integration (data access and movement)
- Minimal reuse of objects, data and capabilities (e.g. AppExchange Packages)
- Complex collaboration (cross-org Chatter)
- Risk of design inconsistencies across multiple orgs
- Complicates license model
- Anticipated higher costs

A multi-org strategy is acceptable when business units or regions want autonomy to have direct control, with limited need for company wide collaboration or data sharing.

The key advantage to a multi-org strategy is the autonomy provided for specific business units or regions. This enables them to push enhancements and/or bug fixes with minimal impact on other Force.com applications.

The key disadvantage is the loss of efficiency, meaning that any capability you deploy in one org, will need to be individually deployed and managed in all other orgs (often resulting in additional cost). For example, if you deploy an AppExchange package to manage eSignatures, you would need to deploy the same package across others orgs if this capability was needed by other applications.

It should also be noted that cross-org Chatter and data access can be challenging, generally forcing you to purchase and deploy third party services such as Make Positive Passport (cross-org Chatter) and/or MuleSoft (integration platform).

Recommendation

I would alway recommend starting with a single-org strategy, only expanding to multi-org if you have a very specific business need. However, if you are negotiating a contract with Salesforce.com, it's worth taking into consideration the potential for multi-org, even if you only plan to use one org. This is to ensure you have flexibility to use your existing user licenses across other orgs, in the event you need to expand (reducing the need for future procurement conversations).

Hopefully, by starting with a single-org strategy, but having the commercial flexibility to expand will provide the best of both worlds. It should also be noted that with every Force.com release, Salesforce.com continue to expand the capabilities of an org. Therefore some of the disadvantages highlighted above (e.g. governor limits) will likely become less of an issue.

Hopefully this article has helped highlight the advantages and disadvantages of different Force.com org strategies. As always, the business need should drive your decision, but at least now you can proceed with your eyes open!

Force.com Enterprise Application Platform

Marc Andreessen famously said "Software is Eating the World" and I couldn't agree more!

Only last month taxi drivers across London came to the scary realisation that their world is changing due to the dominance of Uber (a software company). If taxi drivers aren't safe from the software revolution, no one is!

I believe many industries are at a critical turning point and therefore must rapidly evolve or face inevitable extinction. Unfortunately this is easier said than done, especially for enterprise businesses which are historically slow moving but now need to compete with highly agile software companies born out of Silicon Valley.

So how can IT help enterprise businesses succeed in this new world? I believe a key part of the answer is placing a strategic bet on Platform as a Service (PaaS) and embedding agile software development into company culture (regardless of the industry).

This is why I have spent the past nine months positioning Force.com as an enterprise application platform for a large enterprise.

Why Force.com?

On the surface, Force.com (owned by Salesforce.com) may seem like an odd choice, why not Microsoft or Google?

In my opinion there are six key areas that answer this question. Reviewed individually, each area could easily be challenged, however when understood as a whole I believe Salesforce.com have the most compelling, end-to-end PaaS story for the enterprise.

1. API-Centric Architecture

  • Salesforce.com was a pioneer in API-Centric Architecture, meaning every Force.com feature and capability has a corresponding API, reducing "lock in" and enabling massive flexibility for developers.
  • API-Centric design is the cornerstone of what is widely accepted as the next iteration of business development, where having a well-developed API is poised to be the way in which business relationships are established and maintained in a online, 24/7 digital economy (apievangelist.com). This is especially true in a world where everything is connected (people, devices, apps, data, etc).

2. Rapid Application Development

  • Force.com is a true enterprise Platform as a Service (PaaS), which means your developers can focus on creating amazing applications, instead of worrying about the infrastructure, operating system or middleware.
  • Any application built on the Force.com PaaS is elastically scalable, secure and compliant, thanks to their industry leading multi-tenant architecture, which handles approximately two billion transactions per day (trust.salesforce.com).
  • Force.com is the current (JAN-2014) Gartner Magic Quadrant Leader for PaaS.

3. Declarative Development

  • Force.com is a declarative development platform, meaning anyone can create complex applications using clicks, not code. This enables the business (not IT) to directly contribute to the creation of applications. It's estimated that 80% of a Force.com application can be created using declarative development (the other 20% coming from code).
  • Don't worry if you're a true software developer, Force.com has you covered with powerful capabilities such as APEX (JAVA-like language), Visualforce, Mobile SDK and Heroku (which enables endless development opportunities).

4. Social Integration

  • It's clear that the future of collaboration is social. The "working out loud" revolution has already changed the consumer world and it's widely expected that business is next. Force.com is social at its core, leveraging a capability known as Chatter to drive collaboration and provide context to data.

5. End Point Agnostic (Mobile Optimised)

  • Thanks to the Aura framework, all Force.com applications are end point agnostic, with no additional coding required. For example, if you open a Force.com application in the browser on a PC, you'll get served a user interface optimised for mouse and keyboard. However if you open the same application on a tablet or smartphone, the experience will instantly optimise for mobile. Essentially, develop once, use everywhere! 
  • Built using Aura, the Salesforce1 Mobile App delivers a native experience to iOS and Android. This, alongside the powerful Mobile SDK and Wear Developer Pack, guarantees you can build the best customer experience, regardless of the end point.

6. Aggressive Expansion

  • The AppExchange is a rapidly expanding marketplace (2000+ apps) where anyone can submit or install applications built on the Force.com PaaS (many for free). This covers everything from specific functionality (e.g. eSignatures, etc.) to full applications (e.g. ERP solutions, etc).
  • Salesforce.com are the market leaders in Sales, Service and Marketing, they are also industry pioneers with their multi-tenant, API-Centric Architecture. This, alongside their aggressive growth and acquisitions (Radian6ExactTargetHerokuEdgeSpring, etc), proves that they are not resting on their laurels.

Over the next few weeks I'll dive into some of the details of Force.com, specifically the architecture and key design considerations when positioning as an enterprise application platform.

Visualforce and Internet Explorer - Rendering Issue

I recently developed a Force.com application using Visualforce.

Just like HTML, Visualforce can integrate with any standard web technology or JavaScript framework, enabling the developer to create unique force.com applications, while still leveraging the native capabilities of the platform.

Like all web development, Internet Explorer remains a constant challenge, especially when using modern web techniques such as HTML5. I have seen countless examples where a page renders perfectly in Chrome, Firefox and Safari, but fails miserably in Internet Explorer.

Normally, the simplest way to resolve this issue is to define the Internet Explorer document compatibility mode (either via the code or web server). For example, using the "X-UA-Compatible" meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

Unfortunately, this is not an option with Visualforce, as the "X-UA-Compatible" meta tag is automatically stripped by force.com and you have no access to the server configuration.

As a result, you are forced to either "hack" your code to work with Internet Explorer (not recommended), or you could use a simple APEX class to force the "X-UA-Compatible" meta tag.

To start, create the following APEX class (called ieCompatibility):

public class ieCompatibility {

public ieCompatibility() {
Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=Edge');
}
}

Once created, switch to your Visualforce page and add the "controller" attribute, calling the "ieCompatibility" APEX class.

<apex:page docType="html-5.0" controller="ieCompatibility" standardStylesheets="false" showHeader="false" sidebar="false">

Once saved, reload the page in Internet Explorer.

If successful, the page should now render as designed. The other great thing about this approach is that you can easily re-use the "ieCompatibility" APEX class, without any negative impact to force.com.

My Next PC - Eyefinity!

As a technology enthusiast, I tend to upgrade my PC fairly often. Usually a major upgrade every few years, with minor upgrades along the way.

Last year I added RAID 0 to my Ivy Bridge system, which delivered some fairly impressive I/O performance (helping to reduce the bottleneck of SATA).

My current PC system specification is outlined below:

  • MSI Z77A-GD65 (Intel Z77 Chipset)
  • Intel Core i5 3570K @ 4.3GHz
  • Noctua NH-D14
  • 16GB DDR3 Samsung Green (PC3-12800C11, 30nm)
  • Sapphire Radeon HD 7950 OC 3072MB GDDR5 @ 1.1GHz
  • Creative Sound Blaster Recon3D PCI-E
  • 2x SanDisk Extreme SSD - RAID 0 (480GB)
  • Samsung SH-B123L/BSBP Blu-Ray
  • OCZ ModXStream Pro 700w Modular PSU
  • Lian Li V1000 Case

During my last upgrade I also chose to consolidate to a single monitor, thinking that it would help create a clean, minimal setup. This resulted in the purchase of the beautiful Samsung S27A950D 27" 120Hz display, which thanks to its unique design, looked great as a centre piece on my desk.

This setup worked amazingly well and I ended up having my PC, Mac and PS3 connected to the Samsung, which thanks to the 120Hz panel, provided a great 2D and 3D experience.

Unfortunately there are some negatives to having only one display, specifically screen real estate for coding and video/photo editing. I started to regret not having higher than 1920x1080 resolution (missing my old Apple Cinema Display) and the ability to have multiple full screen applications open side by side.

As a result, I started investigating multi-monitor options and thanks to the aggressive price reductions over recent months, I discovered a triple monitor setup was now a viable option. This type of setup delivers massive screen real estate (going from one extreme to the other), but also provides the perfect opportunity to test AMD Eyefinity.

For those who don't know, Eyefinity is the ability to group multiple monitors into a single large surface (SLS), treated by the OS as a single monitor with a very high resolution. In my case, I was aiming for three 24" 1920x1080 monitors, resulting in an impressive 5760x1080 Eyefinity resolution.

After a few weeks of research and bargain hunting I purchased three Asus VN247H 24" monitors from Overclockers UK. The full specification can be found below:

  • Model: Asus VN247H
  • Panel Size: 23.6" - 16:9
  • Resolution: 1920x1080
  • Response Time: 1ms
  • Contrast Ratio: 80000000:1
  • Display Colors: 16.7M
  • Input: 2x HDMI & 1x D-Sub

The impressive 1ms response time and 7mm super narrow bezel were the main selling points for an Eyefinity setup.

To ensure that Eyefinity would work correctly with my Radeon HD 7950, I also needed to purchase an Active DisplayPort adaptor. This is critical to enable three monitors with AMD graphics cards, as they require one monitor to be natively connected via DisplayPort. This was an issue for the Asus VN247H 24" which only has HDMI and D-Sub inputs. However, an Active DisplayPort adaptor immediately fixes the issue by converting the input from HDMI to native DisplayPort (for more information head over to the AMD support website).

Once connected, the Eyefinity setup was ready to go!

As you can see from the image, I decided to VESA mount my monitors instead of using the supplied stands. This provides more desk space, as well as enables you to increase the hight of the setup.

In conclusion, I've decided you can never have enough monitors! Triple display has changed the way I use my system, offering a huge amount of real estate when using applications, as well dramatically improving the Windows 8.1 experience. For example, I can now always have the Start Screen on one display, showing live updates and acting as an application launch pad, while the other two displays are still available for "actual work". This was never possible with the previous setup and therefore resulted in a lot of application switching.

Finally, it's worth mentioning games. Although the Eyefinity driver setup is a little basic, it works surprisingly well. Racing games (e.g. F1 2013 and Dirt 3) are definitely a highlight, with the increased width offering a more impressive sense of speed, as well as providing a better perspective when overtaking and defending. The same can be said for first person shooters (e.g. Bioshock Infinite), which deliver a truly immersive experience by offering peripheral vision. The only watch-out in FPS games is the field of vision (FoV), which sometimes needs to be adjusted to cater for the ultra widescreen.

I was also pleasantly surprised by the number of games that natively support Eyefinity (most modern games in my Steam collection). However, any game that doesn't have native support, can generally be enabled via a simple patch. I recommend heading over to the Wide Screen Gaming Forum (WSGF) for more details and some great videos!

Expect more Eyefinity analysis in the future!