joi, 29 septembrie 2011

Google App Engine Campfire One Transcript


Google App Engine Campfire One Transcript

Kevin Gibbs, App Engine Tech Lead
April 2008
The following is text from a presentation on Google App Engine, delivered by Kevin Gibbs at Campfire One, April 7, 2008. You can watch the video of this presentation by clicking the play button below.

Introduction

Hi everyone, thanks for coming. I'd like to start by emphasizing that Google App Engine is different from other systems you may heard about for running web applications. From the ground up, Google App Engine is an attempt at making creating and running web apps easy. In the same way Blogger made it much easier to create a blog, we're looking to make it easier to create and deploy a web application — and make it free to get started.
So, what is Google App Engine? Well, as Tom mentioned, Google App Engine is a system that exposes various pieces of Google's scalable infrastructure so that you can write server-side applications on top of them.

Why are we doing this? What's the problem?

But let's step back a bit. Why is Google doing this? Well, we built App Engine because we want more web apps to get created. What we noticed is that, today, it's pretty hard to create one: there are significant upfront challenges to deploying even the simplest of web applications. You've got a lot of tasks to do. First, you have to write the code for your app, of course.
But then, you also have to write your Apache web server configs and startup scripts, set up your SQL database, create all of its tables and hook up the passwords, set up monitoring so you can tell what's going on with your traffic and logs, decide how you'll push new versions of your code, and on, and on.
That's the technical setup challenge that we noticed. And then, once you've done all that sysadmin work, you have another challenge: you have to actually go find machines you can use somewhere, physically or from a virtual provider, to run your app somewhere. Right now, that costs money: even for the smallest app, which you use a few times a week, you have to pay a pretty big upfront fee to run that app with a traditional hosting provider.
So that's the financial or physical challenge. And then, once you've got the whole thing set up and working, and found and paid for a place to test it out, you've got another challenge: you've got to maintain it all as your app grows. Your machines crash, your configs have errors, your hard disks break, your traffic starts to grow, you have to re-shard your databases, set up more machines and on. Keeping everything going as your app grows is a hassle.
All of these hassles are what we're trying to abstract away with App Engine. They are the problems that we're trying to fix.

Design goals

Thus, it follows that our design goals for the system are: Make the system easy to use. Make it easy to scale. And make it free to get started.
OK, I've mentioned our design goals, and talked about what we're trying to fix. Let's get a little more detail: what is App Engine?

What is App Engine?

There are three key facets to the App Engine system that are important to understand.
First, Google App Engine provides an infrastructure for running web apps. By that, I mean that we're focused, specifically on web applications: making them easy to run, easy to deploy, and easy to scale. App Engine is different than a lot of other things out there: App Engine is not a grid computing solution-- we don't run arbitrary compute jobs. We also don't give you a raw virtual machine. Instead, we provide a way for you to package up your code, specify how you want it to run in response to requests, and then we run and serve it for you. You don't reserve resources, or machines, or RAM or a number of CPUs, or anything like that. It's a fluid system, that runs your code in response to load and demand.
What you define are the URLs you use, what code they map to, and upload an application. We do everything else.
This leads me to my next point: Another big part of App Engine is that we provide for the entire life cycle of a web app. By that, I mean that App Engine is a complete system. We provide ways to run your code, serve your static content, a database, request and application logs, methods to push new releases of your code, and more. Ultimately, we are trying to provide an simpler alternative to the traditional LAMP stack. This is a big leap for you to take, and this is a big challenge for us. We've got a lot of tools that we need to provide good alternatives for. What we're trying to do, though, is to integrate all of these tools together into one system. We do this because we want to make the whole task of writing serious web applications easier.
Finally, the other key part of App Engine is that we're providing you access to Google's infrastructure. The APIs and systems we are providing to you are built off of the same distributed, scalable infrastructure we use to power Google's other applications, like Google Accounts, GFS, and Bigtable. We're giving you access to those powerful building blocks, and giving you the ability to write real code and real apps that make use of them.

What's our stack?

Those three facets explain how the App Engine system works. Now, what's the App Engine stack that we provide? To answer that, I'd like to give a quick overview of the key components of the system Then, I want to link you to a demo, so you can see how it all works.
Our first major component is our web serving infrastructure, which connects HTTP requests from the user down to your app and your code. The serving infrastructure is automatic and transparent, regardless of how large your app gets. Second, we are providing a Python language runtime, which is our first supported language for server-side code. You can include and run nearly any Python module in your app. Next there is our SDK. The SDK completely emulates our server environment, and lets you develop all your code locally, in real time, without uploading it. The fourth component is a web based admin interface, which integrates all the tools you need to manage and debug your app. Finally, our fifth component is the Datastore, our scalable persistence layer.
[Demo]

What did you see? What development is like

What did you just see in that demo?
Well, step 1, as I've mentioned, is that you use your local development environment to write your code and develop your app locally. You can test all aspects of serving your app, setting up a framework, and populating our APIs with sample data.
Step 2, as part of that local development, you write a deployment file, called app.yaml. This file is simple, and it encompasses bits of your program configuration and your web server configuration, all in one file. Here, I've given my app a specific identifier, and a version number, so that I can deploy multiple versions of my app, one for testing, one for users, etc. Then, I've indicated that I'm using the Python runtime, which is the only language we offer for right now. Finally, you set up a simple mapping of URLs to code files, which tells us how to execute your code in response to requests.
Finally, step 3, once you've happy with everything and have it working, you run our appcfg command-line utility to deploy a copy of your app to Google. In this case, I'd just type in http://helloworld.appspot.com into my browser, and I can start testing my app online. If I find some bugs, I hit update and deploy a new copy.
And that's it. Whenever you're ready, just send your app out to the world. You've launched.
Now, what didn't you see? Well, you didn't see any setup. We didn't have to set up a database, or go create a machine image and do a bunch of config files. We just wrote our code, and we were ready to go.

Components

Now that you've seen the system in action, I'd like to cover our five major components in a little more detail.
One of the biggest things that we offer is a scalable web serving infrastructure. To be more technical, Google App Engine is a distributed system for running your web applications with a very low overhead. When you submit your app, your code is automatically pushed to a number of fault tolerant servers, and Google's web serving and datacenter infrastructure handles all the details of connecting requests from the user down to a running instance of your code. You're never tied to just one machine, or just one failure. Further, the system is designed to make it easy to scale your application. We watch your app, and fluidly devote more resources to your app when it needs it, and move your app around as its needs change.
Next, right now what we're offering in this preview release is a Python language runtime for your code. You write your server side code in Python, and you get to do the same things you're already used to: you program in real Python code, you can make use of a wealth of Python modules and libraries out there, and you can use any web framework you'd like. You can use any Python code you like, serve up your requests any way you like, and use any sort of HTML output you can think of. We don't want to tie you down to any specific framework or one way of doing things.
On that note, I'd also like to mention that Python is the just first language that we're offering with App Engine. We're working on more, but for now, we'd like to get feedback from you on the system as a whole, to see what you like.
Now, as you saw in the demo, another pretty big part of App Engine is our SDK. Our SDK lets you build, debug, and test your applications locally, on your own machine, using emulated versions of all of our APIs. It's a snap to set up, and it means that you can do all of your tough development and debugging work locally, with an incredibly short code-compile-test cycle: just change a line of your code, and hit reload in your browser.
I told you earlier that we're providing an alternative to the standard LAMP stack with Google App Engine. What we provide instead is our web-based Admin Console. The admin console allows you to check the status of your application, see what versions you have deployed, control who can administer your app, and use various other tools. It also integrates a number of tasks: it gives you access to your logs, both request logs and app logs. It provides a Datastore explorer to view and edit your data. It lets you hook up a domain name. It gives a stats dashboard with real-time counts on your application's requests, any errors, and your resource usage. It integrates all of this information into a single tool for administering your app.

Datastore: In Depth

One of the most significant components in the system is our Datastore. It is the most important API in App Engine, and our key persistence layer. As I mentioned earlier, the Datastore is something new: it's a flexible, schema-less object database, or an entity store. It supports huge datasets with millions of entities, but under the covers, it does not run on a set of clustered SQL servers, which is the usual way you do something like this. Instead, it is based on Bigtable, the same system Google uses for its massive scalable applications.
For most of you, working with the Datastore will probably take a little getting used to: as I've said, it's not SQL. That's a big difference. However, we think that after a while, the Datastore may actually grow on you, because it makes some things easier. For one thing, our datastore is schema-less, meaning it can support arbitrary new properties or columns, which you can create as you code, without having to design everything up front and create a schema. This comes back to our goal of making writing a web app as easy as possible: just start coding. Your data model can evolve along with your app.
Even though the Datastore is a departure from SQL, we still support a lot of powerful functionality that you usually expect from a traditional database. The Datastore supports efficient queries on any single property or set of properties you provide. It supports provides sort orderings on your query results, including sort orders on multiple properties. It supports transactions for writes, with transactional groupings that you control. It supports batch operations for fetching or creating a large number of entities. It optionally allows you to control the primary key of your entities, for more efficient queries and shorter URLs.
And, even though the Datastore is not SQL, we're providing you with a SQL-like query language, called GQL, to make it easier to formulate queries. GQL is in the spirit of jQuery and FBQL: the underlying store is not SQL, but nearly all of the queries that you'd like to do can still be accomplished.
Here's an example of the sort of complex queries you can do with GQL:
SELECT * FROM Story
         WHERE title = 'App Engine Launch'
           AND author = :current_user
           AND rating >= 10
         ORDER BY rating, created DESC
One big feature that you may have noticed that our Datastore doesn't have, though, is joins. The reason for this is that joins are usually a source of performance problems in a distributed system, when you go beyond a single machine: it's much harder to efficiently support a join on a distributed system that spans many computers and many hard disks.
That actually underscores the strength of the Datastore, and why what we are doing is exciting. The Datastore is built on Google infrastructure like GFS, the Google Distributed Filesystem, and Bigtable, our horizontally scalable distributed storage layer. You can read papers about both GFS and Bigtable online, if you'd like-- they're fascinating. The long and the short of it, though, is that Bigtable is a storage system that can be used to support queries like ours, but which doesn't run on a single computer, or even a sharded set of computers, like a SQL database does. Rather, it is a fault-tolerant, distributed system that can span tens of thousands of hard disks on thousands of machines, making all of them appear to be a single storage table. It moves your data around and restructures the system automatically to account for hotspots and increased storage.
What it all means, is that if you use the Datastore correctly, making efficient queries and thinking ahead a little bit about how your app will grow, the datastore will make it easy to scale your application as it grows, from a few entities to millions. No need to shard your databases, or to restructure your schema. This is part of how App Engine makes it easy to scale your web application from the ground up.

More to know

Now, there are a lot of other things about the system that I haven't covered. We've got other APIs beyond the datastore.
One is Email sending. Your app can send emails to users, and we make it easy: no SMTP setup, no other fancy footwork required. Just create a Mail object and send it.
Another API we provide the URL fetch API, which allows you to make outbound HTTP requests from the system, to contact other servers. You can fetch other web pages and make web service calls. This is really helpful for integrating your code with other existing systems.
For authentication, we provide you with standard Google Accounts authentication, and we handle maintaining login, logout, and user accounts for you. You don't have to maintain your own account infrastructure, and we help you cut down on spam by ensuring accounts have passed a CAPTCHA, along with other features.
We also support much larger web frameworks, like Django. These frameworks are really helpful from when you go from writing small apps to big, complex applications.
There's tons more about the system that I won't get to right now, but I hope that I've given you a quick overview of what App Engine is, the components we provide, and how App Engine provides a simpler alternative for writing web apps.

Google AppEngine Intro


What Is Google App Engine?

Google App Engine lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users.
You can serve your app from your own domain name (such as http://www.example.com/) using Google Apps. Or, you can serve your app using a free name on the appspot.com domain. You can share your application with the world, or limit access to members of your organization.
Google App Engine supports apps written in several programming languages. With App Engine's Java runtime environment, you can build your app using standard Java technologies, including the JVM, Java servlets, and the Java programming language—or any other language using a JVM-based interpreter or compiler, such as JavaScript or Ruby. App Engine also features a dedicated Python runtime environment, which includes a fast Python interpreter and the Python standard library, and a Go runtime environment that runs natively compiled Go code. These runtime environments are built to ensure that your application runs quickly, securely, and without interference from other apps on the system.
With App Engine, you only pay for what you use. There are no set-up costs and no recurring fees. The resources your application uses, such as storage and bandwidth, are measured by the gigabyte, and billed at competitive rates. You control the maximum amounts of resources your app can consume, so it always stays within your budget.
App Engine costs nothing to get started. All applications can use up to 1 GB of storage and enough CPU and bandwidth to support an efficient app serving around 5 million page views a month, absolutely free. When you enable billing for your application, your free limits are raised, and you only pay for resources you use above the free levels.

The Application Environment

Google App Engine makes it easy to build an application that runs reliably, even under heavy load and with large amounts of data. App Engine includes the following features:
  • dynamic web serving, with full support for common web technologies
  • persistent storage with queries, sorting and transactions
  • automatic scaling and load balancing
  • APIs for authenticating users and sending email using Google Accounts
  • a fully featured local development environment that simulates Google App Engine on your computer
  • task queues for performing work outside of the scope of a web request
  • scheduled tasks for triggering events at specified times and regular intervals
Your application can run in one of three runtime environments: the Go environment, the Java environment, and the Python environment. Each environment provides standard protocols and common technologies for web application development.

The Sandbox

Applications run in a secure environment that provides limited access to the underlying operating system. These limitations allow App Engine to distribute web requests for the application across multiple servers, and start and stop servers to meet traffic demands. The sandbox isolates your application in its own secure, reliable environment that is independent of the hardware, operating system and physical location of the web server.
Examples of the limitations of the secure sandbox environment include:
  • An application can only access other computers on the Internet through the provided URL fetch and email services. Other computers can only connect to the application by making HTTP (or HTTPS) requests on the standard ports.
  • An application cannot write to the file system. An app can read files, but only files uploaded with the application code. The app must use the App Engine datastore, memcache or other services for all data that persists between requests.
  • Application code only runs in response to a web request, a queued task, or a scheduled task, and must return response data within 30 seconds in any case. A request handler cannot spawn a sub-process or execute code after the response has been sent.

The Go Runtime Environment

App Engine's Go runtime environment provides a convenient way to implement and deploy web applications written in the Go Programming Language.
The Go runtime environment uses Go release r58.1. The SDK includes the Go compiler and standard library, so it has no additional dependencies. As with the Java and Python environments, not all the standard library's functionality is available inside the sandbox. For example, attempts to open a socket or write to a file will return an os.EINVAL error.
The SDK includes an automated build service to compile your app, so you'll never need to invoke the compiler yourself. And—as with the Python SDK—your app will be automatically re-built whenever you change the source. This keeps you productive by making the edit-compile-run cycle refreshingly short.
The Go environment provides idiomatic Go APIs for most of the App Engine services.
You can upload other third-party libraries with your application, as long as they are implmented in pure Go.
For more information about the Go runtime environment, see The Go Runtime Environment.

The Java Runtime Environment

You can develop your application for the Java runtime environment using common Java web development tools and API standards. Your app interacts with the environment using the Java Servlet standard, and can use common web application technologies such as JavaServer Pages (JSPs).
The Java runtime environment uses Java 6. The App Engine Java SDK supports developing apps using either Java 5 or 6.
The environment includes the Java SE Runtime Environment (JRE) 6 platform and libraries. The restrictions of the sandbox environment are implemented in the JVM. An app can use any JVM bytecode or library feature, as long as it does not exceed the sandbox restrictions. For instance, bytecode that attempts to open a socket or write to a file will throw a runtime exception.
Your app accesses most App Engine services using Java standard APIs. For the App Engine datastore, the Java SDK includes implementations of theJava Data Objects (JDO) and Java Persistence API (JPA) interfaces. Your app can use the JavaMail API to send email messages with the App Engine Mail service. The java.net HTTP APIs access the App Engine URL fetch service. App Engine also includes low-level APIs for its services to implement additional adapters, or to use directly from the application. See the documentation for the datastorememcacheURL fetchmailimagesand Google Accounts APIs.
Typically, Java developers use the Java programming language and APIs to implement web applications for the JVM. With the use of JVM-compatible compilers or interpreters, you can also use other languages to develop web applications, such as JavaScript, Ruby, or Scala.
For more information about the Java runtime environment, see The Java Runtime Environment.

The Python Runtime Environment

With App Engine's Python runtime environment, you can implement your app using the Python programming language, and run it on an optimized Python interpreter. App Engine includes rich APIs and tools for Python web application development, including a feature rich data modeling API, an easy-to-use web application framework, and tools for managing and accessing your app's data. You can also take advantage of a wide variety of mature libraries and frameworks for Python web application development, such as Django.
The Python runtime environment uses Python version 2.5.2. Additional support for Python 3 is being considered for a future release.
The Python environment includes the Python standard library. Of course, not all of the library's features can run in the sandbox environment. For instance, a call to a method that attempts to open a socket or write to a file will raise an exception. For convenience, several modules in the standard library whose core features are not supported by the runtime environment have been disabled, and code that imports them will raise an error.
Application code written for the Python environment must be written exclusively in Python. Extensions written in the C language are not supported.
The Python environment provides rich Python APIs for the datastoreGoogle AccountsURL fetch, and email services. App Engine also provides a simple Python web application framework called webapp to make it easy to start building applications.
You can upload other third-party libraries with your application, as long as they are implemented in pure Python and do not require any unsupported standard library modules.
For more information about the Python runtime environment, see The Python Runtime Environment.

The Datastore

App Engine provides a distributed data storage service that features a query engine and transactions. Just as the distributed web server grows with your traffic, the distributed datastore grows with your data. You have the choice between two different data storage options differentiated by their availability and consistency guarantees.
The App Engine datastore is not like a traditional relational database. Data objects, or "entities," have a kind and a set of properties. Queries can retrieve entities of a given kind filtered and sorted by the values of the properties. Property values can be of any of the supported property value types.
Datastore entities are "schemaless." The structure of data entities is provided by and enforced by your application code. The Java JDO/JPA interfaces and the Python datastore interface include features for applying and enforcing structure within your app. Your app can also access the datastore directly to apply as much or as little structure as it needs.
The datastore is strongly consistent and uses optimistic concurrency control. An update of a entity occurs in a transaction that is retried a fixed number of times if other processes are trying to update the same entity simultaneously. Your application can execute multiple datastore operations in a single transaction which either all succeed or all fail, ensuring the integrity of your data.
The datastore implements transactions across its distributed network using "entity groups." A transaction manipulates entities within a single group. Entities of the same group are stored together for efficient execution of transactions. Your application can assign entities to groups when the entities are created.

Google Accounts

App Engine supports integrating an app with Google Accounts for user authentication. Your application can allow a user to sign in with a Google account, and access the email address and displayable name associated with the account. Using Google Accounts lets the user start using your application faster, because the user may not need to create a new account. It also saves you the effort of implementing a user account system just for your application.
If your application is running under Google Apps, it can use the same features with members of your organization and Google Apps accounts.
The Users API can also tell the application whether the current user is a registered administrator for the application. This makes it easy to implement admin-only areas of your site.
For more information about integrating with Google Accounts, see the Users API reference.

App Engine Services

App Engine provides a variety of services that enable you to perform common operations when managing your application. The following APIs are provided to access these services:

URL Fetch

Applications can access resources on the Internet, such as web services or other data, using App Engine's URL fetch service. The URL fetch service retrieves web resources using the same high-speed Google infrastructure that retrieves web pages for many other Google products.

Mail

Applications can send email messages using App Engine's mail service. The mail service uses Google infrastructure to send email messages.

Memcache

The Memcache service provides your application with a high performance in-memory key-value cache that is accessible by multiple instances of your application. Memcache is useful for data that does not need the persistence and transactional features of the datastore, such as temporary data or data copied from the datastore to the cache for high speed access.

Image Manipulation

The Image service lets your application manipulate images. With this API, you can resize, crop, rotate and flip images in JPEG and PNG formats.

Scheduled Tasks and Task Queues

An application can perform tasks outside of responding to web requests. Your application can perform these tasks on a schedule that you configure, such as on a daily or hourly basis. Or, the application can perform tasks added to a queue by the application itself, such as a background task created while handling a request.
Scheduled tasks are also known as "cron jobs," handled by the Cron service. For more information on using the Cron service, see the Python or Javacron documentation.
Task queues are currently released as an experimental feature. The Python, Java, and Go runtime environments can use task queues. For information about the task queue service, see the Python API documentationthe Java API documentation or the the Go API documentation.

Development Workflow

The App Engine software development kits (SDKs) for Java, Python, and Go each include a web server application that emulates all of the App Engine services on your local computer. Each SDK includes all of the APIs and libraries available on App Engine. The web server also simulates the secure sandbox environment, including checks for attempts to access system resources disallowed in the App Engine runtime environment.
Each SDK also includes a tool to upload your application to App Engine. Once you have created your application's code, static files and configuration files, you run the tool to upload the data. The tool prompts you for your Google account email address and password.
When you build a new major release of an application that is already running on App Engine, you can upload the new release as a new version. The old version will continue to serve users until you switch to the new version. You can test the new version on App Engine while the old version is still running.
The Java SDK runs on any platform with Java 5 or Java 6. The SDK is available as a Zip file. If you use the Eclipse development environment, you can use the Google Plugin for Eclipse to create, test and upload App Engine applications. The SDK also includes command-line tools for running the development server and uploading your app.
The Python SDK is implemented in pure Python, and runs on any platform with Python 2.5, including Windows, Mac OS X and Linux. The SDK is available as a Zip file, and installers are available for Windows and Mac OS X.
The Go SDK features an idiomatic, native Go API for using the App Engine services, and uses the same tools as the Python SDK (with some additional machinery for automatically compiling your Go apps). The Go SDK is stand-alone—you do not need to install Go separately—and is available as a Zip file for both Mac OS X and Linux (a Windows version will be available soon).
The Administration Console is the web-based interface for managing your applications running on App Engine. You can use it to create new applications, configure domain names, change which version of your application is live, examine access and error logs, and browse an application's datastore.

Quotas and Limits

Not only is creating an App Engine application easy, it's free! You can create an account and publish an application that people can use right away at no charge, and with no obligation. An application on a free account can use up to 1 GB of storage and up to 5 million page views a month. When you are ready for more, you can enable billing, set a maximum daily budget, and allocate your budget for each resource according to your needs.
You can register up to 10 applications per developer account.
Each app is allocated resources within limits, or "quotas." A quota determines how much of a given resource an app can use during a calendar day. In the near future, you will be able to adjust some of these quotas by purchasing additional resources.
Some features impose limits unrelated to quotas to protect the stability of the system. For example, when an application is called to serve a web request, it must issue a response within 30 seconds. If the application takes too long, the process is terminated and the server returns an error code to the user. The request timeout is dynamic, and may be shortened if a request handler reaches its timeout frequently to conserve resources.
Attempts to subvert or abuse quotas, such as by operating applications on multiple accounts that work in tandem, are a violation of the Terms of Service, and could result in apps being disabled or accounts being closed.
For a list of quotas and an explanation of the quota system, including which quotas can be increased by enabling billing, see Quotas.

For More Information...

For more information about Google App Engine:
Welcome to Google App Engine!

miercuri, 28 septembrie 2011

Monitor

Contrast Ratio


The Contrast Ratio of a TFT is the difference between the darkest black and the brightest white it is able to display. This is really defined by the pixel structure and how effectively it can let light through and block light out from the backlight unit. As a rule of thumb, the higher the contrast ratio, the better. The depth of blacks and the brightness of the whites are better with a higher contrast ratio. This is also referred to as the static contrast ratio.

When considering a TFT monitor, a contrast ratio of 700:1 to 1000:1 is pretty standard nowadays, but there are models which boast specs up to over 1000:1. Be wary of quoted specs however, as sometimes they can be exaggerated. VA panel specs are generally the most reliable and accurate to reality when considering contrast ratio. Figures of 3000:1 are now available using modern AMVA and cPVA panels.

Some technologies boast the ability to dynamically control contrast and offer much higher contrast ratios which are incredibly high (millions:1 for instance!). Be wary of these specs as they are dynamic only, and the technology is not always very useful in practice. Traditionally, TFT monitors were said to offer poor black depth, but with the extended use of VA panels, the improvements from IPS and TN Film technology, and new Dynamic Contrast Control technologies, we are seeing good improvements in this area. Black point is also tied in to contrast ratio. The lower the black point, the better, as this will ensure detail is not lost in dark image when trying to distinguish between different shades.




Brightness


Brightness is a measure of the brightest white the TFT can display. Typically TFT’s are far too bright for comfortable use, and the On Screen Display (OSD) is used to turn the brightness setting down. Brightness is measure in cd/m2 (candella per metre squared). Note that the recommended brightness setting for a TFT screen in normal lighting conditions is 120 cd/m2
 


Colour Depth


The colour depth of a TFT monitor is related to how many colours it can produce and should not be confused with colour space (gamut). The more colours available, the better the colour range can potentially be. Colour reproduction is also different however as this related to how reliably produced the colours are compared with those desired.


Panel Colour Depth
Total Bits Per Colour
Steps Per Sub pixel
Total Colours
6-bit
18-bit
64
262,144
6-bit + FRC
-
-
16.2 million
8-bit
24-bit
256
16.7 million
8-bit + FRC
"30-bit"
256
1.07 billion
10-bit
30-bit
1024
1.07 billion

The colour depth of a panel is determined really by the number of posible orientations of each sub pixel (red, blue and green). These different orientations basically determine the different shade of grey (or colours when filtered in the specific way via RGB sub pixels) and the more "steps" between each shade, the more possible colours the panel can display.

At the lower end, TN Film panels are quite economical, and their sub pixels only have 64 possible orientations each, giving rise to a true colour depth of only 262,144 (i.e. 64 steps on each RGB = 64 x 64 x 64 = 18). This is also referred to commonly s 18-bit colour (i.e. 6 bits per RGB sub pixel = 6 + 6 + 6) This colour depth is pretty limited and so in order to reach 16 million colours and above, panel manufacturers commonly use two technologies: Dithering and Frame Rate Control (FRC). These terms are often interchanged, but strictly can mean different things. These technologies simulate other colours allowing the colour depth to improve to typically 16.2 million colours.

  • Spaital Dithering  - The dithering method involves assigning appropriate color values from the available color palette to close-by pixels in such a way that it gives the impression of a new color tone which otherwise could not have been created at all. In doing so, there complex mappings according to which the ground colors are mutually assigned, otherwise it could result in color noise / dithering noise. Dithering can be used to allow 6-Bit panels, like TN Film, to show 16.2 million perceived colours. This can however sometimes be detectable to the user, and can result in chessboard like patterns being visible in some cases.
     
  • Frame Rate Control / Temporal Dithering - The other method is Frame-Rate-Control (FRC), also referred to sometimes as temporal dithering. This works by combining four colour frames as a sequence in time, resulting in perceived mixture. In basic terms, it involves flashing between two colour tones rapidly to give the impression of a third tone, not normally available in the palette. This allows a total of 16.2 reproducible million colors. Thanks to Frame-Rate-Control, TN panel monitors have come pretty close to matching the colors and image quality of VA or IPS panel technology, but there are a number of FRC algorithms which vary in their effectiveness. Sometimes, a twinkling artefact can be seen, particularly in darker shades, which is a side affect of such technologies. Some TN Film panels are now quoted as being 16.7 million colours, and this is down to new processes allowing these panels to offer a better colour depth compared with older TN panels. See this articlefor more information.

Other panel technologies however can offer more possible pixel orientation and therefore more steps between each shade. VA and IPS panels are traditionally capable of 256 steps for each RGB sub pixel, allowing for a possible 16.7 million colours (true 8-bit, without FRC). These are referred to as 8-bit panels with 24-bit colour (8-bit per sub pixel = 8 + 8 + 8 = 24). While most IPS and VA panels support 8-bit colour, modern e-IPS and cPVA panels do sometimes use 6-bit + FRC instead. See this news piece for further information.

10-bit colour depth is typically only used for very high end graphics uses and in professional grade monitors. There are three main ways of implementing 10-bit colour depth support. Most screens which are advertised as having 10-bit support are actually using true 8-bit panels. There is an additional FRC stage added to extend the colour palette. This FRC can be applied either on the panel side (8-bit +  FRC panels) or on the monitor LUT/electronics side. Either way, the screen simulates a larger colour depth and does not offer a 'true' 10-bit support. You can also only make use of this 10-bit support if you have a full end-to-end 10-bit workflow, including a supporting software, graphics card and operating system. There are a few 'true' 10-bit panels available but these are prohobitively expensive and rarely used at the moment. See our panel parts database for more information about different panels.




Colour Gamut

Experiments at the beginning of the last century into the human eye eventually led to the creation of a system that encompassed all the range of colors our eyes can perceive. Its graphical representation is called a CIE diagram as shown in the image above. All the colors perceived by the eye are within the colored area. The borderline of this area is made up of pure, monochromatic colors. The interior corresponds to non-monochromic colors, up to white which is marked with a white dot. 'White Colour' is actually a subjective notion for the eye as we can perceive different colors as white depending on the conditions. The white dot in the CIE diagram is the so-called flat spectrum dot with coordinates of x=y=1/3. Under ordinary conditions, this color looks very cold, bluish.


Above: CIE diagram showing total gamut range of the human eye

If we had three sources of different colours the question is which other colours can be made by mixing the sources? If you mark points with the coordinates of the basic colors in the CIE diagram, everything you can get by mixing them up is within the triangle you can draw by connecting the points. This triangle is referred to as a color gamut.


Above: gamut triangle of a laser display

Laser Displays are capable of producing the biggest color gamut for a system with three basic colors, but even a laser display cannot reproduce all the colors the human eye can see, although it is quite close to doing that. However, in today's monitors, both CRT and LCD (except for some models I’ll discuss below), the spectrum of each of the basic colors is far from monochromatic. In the terms of the CIE diagram it means that the vertexes of the triangle are shifted from the border of the diagram towards its center.

Above: sRGB colour space triangle
 


The colour space produced by any given TFT monitor is defined by its backlighting unit and is not influenced by the panel technology.

Traditionally, LCD monitors were capable of giving approximate coverage of the sRGB reference colour space as shown in the diagram above. This is defined by the backlighting used in these displays - Cold-cathode fluorescent lamps (CCFL) that are employed which emit radiation in the ultraviolet range which is transformed into white color with the phosphors on the lamp’s walls. These backlight lamps shine through the LCD panel, and through the RGB sub-pixels which act as filters for each of the colours. Each filter cuts a portion of spectrum, corresponding to its pass-band, out of the lamp’s light. This portion must be as narrow as possible to achieve the largest color gamut.

Traditional CCFL backlighting offers a gamut pretty much covering the sRGB colour space. However, the sRGB space is a little small to use as a reference in specifications for colour gamuts and so the larger NTSC colour space reference tends to be more commonly referred to nowadays. The sRGB space corresponds to approximately 72% of the NTSC colour space, which is a figure commonly used in modern specifications for standard CCFL backlit monitors. If you read the reviews here, you will see that analysis with colorimeters allows us to measure the colour gamut, and you can easily spot those screens utilising regular CCFL backlighting by the fact their gamut triangle is pretty much mapped to the reference sRGB triangle. The rRGB colour space is lacking most in green hues as compared with the gamut of the human eye.


Enhanced / Wide Colour Gamut CCFL Backlighting (WCG-CCFL)


 Above Left: a typical measurement of a standard CCFL backlit monitor, covering pretty much the sRGB colour space, 72% of NTSC colour space
Above Right: a typical measurement of a monitor with enhanced CCFL backlighting, covering more than the sRGB colour space and about 92% of the NTSC space
 
More recent displays have started to utilise a newer generation of CCFL backlighting, offering a widened gamut and typically a coverage of the NTSC colour space of 92 - 102%. There is a difference in practice, however. The colour space available is extended mainly in green shades as you can see from the image above. Red coverage is also extended in some cases. This extended colour space sounds appealing on face value since the screens featuring WCG-CCFL backlighting can offer a broader range of colours. Manufacturers will often promote the colour space coverage of their screens with these high figures. In practice you need to consider what impact this would have on your use.


It's important to consider what colour space your content is based around. sRGB has long been the preferred colour space of all monitors, and is in fact the reference for the Windows operating system and the internet. As such, most content an average user would ever use is based on sRGB. If you view sRGB content on a wide gamut screen then this can lead to some colours looking incorrect as they are not mapped correctly to the output device. In practice this can lead to oversaturation, and greens and reds can often appear false or neon. Colour managed applications and a colour managed workflow can prevent this but for the average user the cross-compatibility of widely used sRGB content and a wide gamut screen may present problems and prove troublesome. Some users don't object to the over saturated and cartoony colours for their use, but to many, it is an issue.

Of course the opposite is true if in fact you are working with content which is based on a wider colour space. In photography, the AdobeRGB colour space is often used and is wider than the sRGB reference. If you are working with wide gamut content, with wide gamut supported applications, you would want a screen that can correctly display the full range of colours. This could not be achieved using a traditional CCFL backlit display with only sRGB coverage, and so a wide gamut screen would be needed. Wide gamut displays are often aimed at colour enthusiasts and professional uses as a result.

A compromise is sometimes available in the form of a screen which can support a range of colour spaces accurately. Some higher end screens come with a wide gamut backlight unit. Natively these offer a gamut covering 92 - 102% of the NTSC colour space. However, they also feature emulation modes which can simulate a smaller colour space. These emulation modes are normaly available through the OSD menu and offer varying options with varying degrees of reliability. In the best cases the screens can emulate the smaller Adobe RGB colour space, and also the sRGB colour space. This allows the user to work in whichever colour space they prefer but gives them compatibility with a wider range of content if they have the need. The success of these colour space emulations will vary from one screen to another however and are not always accurate.

Further reading: X-bit Labs Article




LED Backlighting


LED backlighting units come in two flavours typically for desktop monitors, those being White-LED and RGB LED. With White-LED (W-LED) The LED's are placed in a line along the edge of the matrix, and the uniform brightness of the screen is ensured by a special design of the diffuser. The colour gamut is limited to around 68 - 72% NTSC but the units are cheaper to manufacturer and so are being utilised in more and more screens, even in the more budget range. They do have their environmental benefits as they can be recylced, and they have a thinner profile making them popular in super-slim range models and notebook PC's.


Above: colour gamut of a typical LED backlit display, covering 114% of the NTSC colour space

RGB LED backlighting consists of an LED backlight based on RGB triads, each triad including one red, one green and one blue LED. With RGB LED backlighting the spectrum of each LED is rather wide, so their radiation can’t be called strictly monochromatic and they can’t match a laser display, yet they are much better than the spectrum of CCFL and WCG-CCFL backlighting. RGB LED backlighting is not common yet in desktop monitors, and their price tends to put them way above the budget of all but professional colour enthusiast and business users. We will probably see more monitors featuring RGB LED backlighting over the coming years, and these models are currently capable of offering a gamut covering > 114% of the NTSC colour space.

Further reading: LED Backlighting Article

HiColor Technology
Panel manufacturer AU Optronics has successfully developed and commercialized HiColor technology utilizing CCFL backlight to reach a 33% color saturation increase compared with conventional LCDs. Targeting the development trend of LEDs, AUO has further developed the new HiColor Technology with RGB LED backlight. HiColor Technology with LED backlight can reach 105% NTSC, a 45% increase from 72% NTSC. It also provides the true natural performance of Red, Green and Blue and enables bright, rich, and vivid display colors.
      
In addition, AUO has adopts several specific techniques to enhance the image performance of LED backlights. The Color Management function can eliminate the artificial colors caused by inconsistent chromaticity between the light source and the signal. The Flexible Color Temperature Setting can change the intensity of RGB LEDs to adjust the white point of backlights and meet different application requirements without much luminance loss.
Other advantages of LED backlights include mercury and lead free, instant light, low DC voltage, shock and vibration safe, fast response time, and low temperature start.

Gamut References
You will commonly see a monitor's gamut listed as a percentage compared with a reference colour space. This will vary depending on which reference a manufacturer uses, but commonly you will see a % against the NTSC or Adobe RGB colour spaces. Bear in mind also that the gamut / colour space of the sRGB standard equates to about 72 - 75% of the NTSC reference. This is the standard colour space for the Windows operating system and the internet, and so where extended colour spaces are produced from a monitor, considerations need to be made as to the colour space of the content you are viewing.
Here is how several of the colour spaces are linked:
NTSC (%)
Adobe RGB (%)
72
92
95
102
97.8
116
114
125
123

Viewing Angles

Viewing angles are quoted in horizontal and vertical fields and often look like this in listed specifications: 170/160 (170° in horizontal viewing field, 160° in vertical). The angles are related to how the image looks as you move away from the central point of view, as it can become darker or lighter, and colours can become distorted as you move away from your central field of view. Because of the pixel orientation, the screen may not be viewable as clearly when looking at the screen from an angle, but viewing angles of TFT’s vary depending on the panel technology used.


As a general rule, the viewing angles are IPS > VA > TN Film. The viewing angles are often over exaggerated in manufacturers specs, especially with TN Film panels where quoted specs of 160 / 160 and even 170 / 170 are based on overly loose measuring techniques. Be wary of 176/176 figures as these are often over exagerated specs for a TN Film panel and are based on more lapse measurement techniques.

In reality, IPS and VA panels are the only technologies which can truly offer wide viewing fields and are commonly quoted as 178/178. VA panels can show a colour / contrast distortion as you move slightly away from a central point. While most people do not notice this anomaly, others find it distracting. IPS panels do not suffer from this and are generally considered the superior technology for wide fields of view.

Further reading: Viewsonic's Whitepaper - Why Viewing Angle is a Key Element in Choosing an LCD

 

Refresh Rate
 
On a CRT monitor, the refresh rate relates to how often the whole screen is refreshed by a cathode ray gun. This is fired down the screen at a certain speed which is determined by the vertical frequency set in your graphics card. If the refresh rate is too low, this can result in flickering of the screen and is often reported to lead to head aches and eye strain. On a CRT, a refresh rate of 72Hz is deemed to be "flicker free", but generally, the higher the refresh rate the better.

TFT screens do not refresh in the same way as a CRT screen does, where the image is redrawn at a certain rate. A TFT monitor will only support refresh rates coming from your graphics card between 60Hz and 75Hz (ignoring modern 120Hz monitors for a moment). Anything outside this will result in a "signal out of range" message or similar. The “recommended” refresh rate for a TFT is 60hz, a value which would be difficult to use on a CRT. The “maximum” refresh rate of a TFT is 75hz, but sometimes if you are using a DVI connection the refresh is capped at 60hz anyway.

As a TFT is a static image, and each pixel refreshes independently, setting the TFT at 60hz does not cause the same problems as it would on a CRT. There is no cathode ray gun redrawing the image as a whole on a TFT. You will not get flicker, which is the main reason for having a high refresh rate on a CRT in the first place. The reason that 60Hz is recommended by all the manufacturers is that it is related to the vertical frequency that TFT panels run at. Some more detailed data sheets for the panels themselves clearly show that the operating vertical frequency is between about 56 and 64Hz, and that the panels 'typically' run at 60Hz (see the LG.Philips LM230W02 datasheet for instance - page 11). If you decide to run your refresh rate from your graphics card above the recommended 60Hz it will work fine, but the interface chip on the monitor will be in charge of scaling the frequency down to 60Hz anyway. The reason that some DVI connections are capped at 60Hz in Windows is that some DVI interface chips cannot scale the frequency properly and so the option to run above 60Hz is disabled. You may find that the screen looks better at 60Hz as you are avoiding the need for the interface chip to scale the resolution. Try it on both and see which you prefer, the monitor can handle either.


One thing which some people are concerned about is the frames per second (fps) which their games can display. This is related to the refresh rate of your screen and graphics card. There is an option for your graphics card to enable a feature called Vsync which synchronizes the frame rate of your graphics card with the operating frequency of your graphics card (i.e. the refresh rate). Without vsync on, the graphics card is not limited in it's frame rate output and so will just output as many frames as it can. This can often result in graphical anomalies including 'tearing' of the image where the screen and graphics card are out of sync and the picture appears mixed as the monitor tries to keep up with the demanding frame rate from the card. To avoid this annoying symptom, vsync needs to be enabled.

With vsync on, the frame rate that your graphics card is determined by the refresh rate you have set in Windows. Capping the refresh rate at 60hz in your display settings limits your graphics card to only output 60fps. If you set the refresh at 75hz then the card is outputting 75fps. What is actually displayed on the monitor might be a different matter though. You can measure the internal frame rate of your system using programs like 'fraps' and also some games report your frame rate. Remember, the frequency of the monitor is still being scaled down to 60Hz by the interface chip. If you are worried about frame rate in fast games then it is a good idea to try the refresh rate at 75Hz and see if you think it looks better. A lot of it could be based on placebo effect though, and if you have a decent graphics card which can handle a constant 60fps it might look just as good as if it were outputting 75fps. See which one you prefer.

One other thing to note for Overdrive (RTC) enabled monitors is that running a TFT outside of it's recommended refresh rate can lead to a deterioration in the performance of this technology and the panel responsiveness is adversely effected! Read the details here.


120Hz Monitors and LCD TV's

You will see more mention of higher refresh rates from both LCD televisions and now desktop monitors. It's important to understand the different technologies being used though and what constitutes a 'real' 120Hz and what is 'interpolated':
  • Interpolated 120Hz and above - These technologies are the ones commonly used in LCD TV's where TV signal input is limited to 50 / 60 Hz anyway (depending on PAL vs NTSC). To help overcome the issues relating to motion blur on such sets, manufacturers began to introduce a technology to artificially boost the frame rate of the screen. This is done by an internal processing within the hadrware which adds an intermediate and interpolated (guessed / calculated) frame between each real frame, boosting from 50 / 60fps to 100 / 120 fps. This technology does actually offer a noticeable improvement in practice and is controlled very well. Some sets even have 240 and 360Hz technologies which operate in the same way, but with further interpolation and inserted frames. See here for further information.
     
  • True 120HZ technology - to have a true 120Hz screen, it must be capable of accepting a full 120Hz signal output from a device (e.g. a graphics card). Because TV's are limited at the moment by their input sources they tend to use the above interpolation technology, but with the advent of 3D TV and higher frequency input sources, this will change. Desktop monitors are a different matter though as graphics cards can obviously output a true 120Hz if you have a decent enough card. Some models can accept a 120Hz signal but need different interfaces to cope (e.g. dual-link DVI). These monitors are also introduced with the development of 3D gaming so will no doubt become more and more mainstream. Again these offer obvious advantages in terms of gaming where a frame rate of >60fps can be properly displayed. It also helps improve any motion blur and produce smoother movement. It can also help reduce RTC related artefacts and overshoot which is an added bonus. As an example, see our review of the 120Hz Samsung SM2233RZ. Also, please see here for further information

 


Pixel Pitch

Unlike on CRT’s where the dot pitch is related to the sharpness of the image, the pixel pitch of a TFT is related to the distance between pixels. This value is fixed and the same for all TFT’s which are the same size. This is because a 17” TFT for instance will always be the same 17” viewable area, and will always have the same number of pixels (1280 x 1024). Pixel pitch is normally listed in the manufacturers specifcation. Generally you need to consider that the 'tighter' the pixel pitch, the smaller the text will be, and potentially the sharper the image will be. To be honest, monitors are produced with a sensible resolution for their size and so even the largest pixel pitches return a sharp images and a reasonable text size. Some people do still prefer the larger-resolution-crammed-into-smaller-screen option though, giving a smaller pixel pitch and smaller text. It's down to choice and ultimately eye-sight.

To calculate the pixel pitch of a given monitor size and resolution, you can use this useful pixel pitch calculator



Interfaces and Connectivity

This relates to the connection type from the TFT to your PC. Nearly all TFT’s come with an analogue connection, which is commonly referred to as D-sub or VGA. This allows a connection from the VGA port on your graphics card, where the signal being produced from the graphics card is converted from a pure digital to an analogue signal. There are a number of algorithms implemented in TFT’s which have varying effectiveness in improving the image quality over a VGA connection.

Some TFT’s offer a DVI input as well to allow you to make use of the DVI output from your graphics card which you might have. This will allow a pure digital connection which can sometimes offer an improved image quality. Whether a DVI connection will make any difference to the image quality depends on several things including the model of TFT, quality of VGA connection and graphics card used. Please see this section for < more info >


It is possible to get DVI – VGA converters. These will not offer any improvements over a standard analogue connection, as you are still going through a conversion from digital to analogue somewhere along the line. Some screens also offer other interfaces designed for external devices such as games consoles and DVD players. HDMI, DisplayPort, S-Video, Composite and Component are available on some models if this functionality is appealing and are widely implemented to allow connection of other external devices. Some of these interfaces are also capable of carrying sound as well as video (e.g. HDMI and DisplayPort)

 

TCO Standards



The TCO standard is related to the specifications of the model as a whole and is a classification system used to certify a TFT.

TCO- labelling of media displays guarantees:
  • Ergonomics-High visual ergonomic requirement on the picture screen which brings with it high picture quality and good color rendition. Good quality even when the screen displays moving pictures by means of short response time, good black level and expanded requirement of grey levels.
  • Emission-Substantial reduction of magnetic and electrical fields.
  • Energy-Low energy consumption in stand-by mode
  • Ecology-That the manufactures are certified according to ISO 14001 or EMAS
    -Reduced dispersion into the environment of brominating and chloridizing flame-resistant material and heavy metals (complying even with RoHS directive from 1st of July 2006).
    -That the display unit is pre-prepared for recycling which facilitates recycling of materials.

Please see http://www.tcodevelopment.com/ for more info on which standard a TFT meets.