A Note on Cloud Application Architecture

When dealing with a Cloud Architecture the ability to scale out becomes available by adding computational resources to process job queues. The application’s work load is divided across a number of servers who each process a job or set of jobs retrieved from a queue.

What you lose in the power earned from Classic Architecture you gain in power though parallelism and cost saving through flexibility in Cloud Architecture. In Cloud Architecture, when more resources are needed more servers are added and when demand has been met and those resources are no longer needed they are removed.

This type of resource management is powerfully meaningful from a cost perspective when the process of scaling out and back is automated.

A Note on Classic Application Architecture

Classic Applications are usually comprised of three core components. The Web Application, a Document Storage System, and a Database System. In the Classic Application Architecture model these components are distributed across one or more servers.

When resources become maxed out on these servers new hardware must be added to meet the demand. This is called Scaling up because you scale up your hardware’s specification to meet the demands of your application’s requirements and will probably lead to big servers, slow servers, or high maintenance costs, so it’s not very flexible or efficient from a resource management perspective.

But this is fine actually because this resource management model is perfectly well suited to clients who can accurately predict their usage of an application and have adequate resources to hand.

How Many King James Bibles Can You Store In SQL Server 2008

1GB = 1073741824

Bible in Characters: 3228076

Hard Disk Size 500G: 536870912000

SQL Server Hard Disk Space 3.6G: 3865470565

Sophos Anti Virus 500 MB: 536870912
Sophos Firewall 100 MB: 107374182
Windows XP 1.5GB: 1610612736

Windows XP Service Pack 3 1230 MB: 1320702443

Bytes Remaining: 529429881162

Bible Count: 164007

Twitter4j Twitter OAuth Example

Today I’m going to show you some sample code regarding how to send a tweet to twitter using twitter4j and OAuth. The following code example is a command line twitter client that authenticates a user with oAuth and allows them to post a tweet.

All you need to to create a project in your favourite IDE.. for ease of use. Add the twitter4j library to your build path. Compile and run. If you run into any problems shoot them into the comments and I’ll lend a hand. Happy hacking.

Read More

Simple Introduction to HTML5 Local Storage API

Okay, so if you not looking into HTML5 your letting the biggest movement in web application development since the introduction of CSS pass you by. In this simple example you can see how an object can be stored into your HTML5 compatible browsers localStorage.

Try this, copy and paste the following code to a simple HTML file and save it onto you desktop. Open it in Chrome or Firefox 4 or Opera. Then, edit the Hello World text. The HTML5 contentEditable=”true” allows the containing element to be editable. This is a really nice attribute that makes textarea redundant in an AJAX app, in my opinion.

Read More

One Way Tweet a Java App

One way tweet is a sending application for twitter. In this tutorial you will see/learn how to send stuff to twitter by writing a java desktop UI. You will create a new project in NetBeans and choose java application, and create a new package called org.me.owt.

Then, create a new java source file and call it main.java, and another called tweet.java. Two simple classes and you’ve got yourself a twitter client. The end result will look like this:
One Way Tweet
Read More

Universal Translator for your Tweets

I thought this was going to be easy… SO much for preconceptions. Today, I’m going to give you the code to create a twitter translation App using, HTML, CSS, JavaScript and Java, the Twitter API and the Google Translate API. In a future tutorial I will demonstrate cross domain Ajax to get this Application to work totally on the client side but in the mean time you will need to have a Java enabled server to execute the server-side JSP that requests the API for twitter.

As you type your tweet the the JavaScript will analyze your keystrokes and check for when a space is entered assuming you are done typing a word, at this point the text is passed to Google for translation. When your done typing hit tweet and it’s off to twitter with your tweet.

This is what your app will look like when it’s finished:



Read More