Software + Services. A Modern Approach. Part 2

Part 2 – The idea

< Part 1 (Intro)

Contents:

  1. A little more Live Mesh (CTP)
  2. The Actors
  3. The Modern Approach

1. A little more Live Mesh (CTP)

Today, online and offline tend to be two different approaches for building software. Most software companies offer either online or offline versions of their software.

If they somehow offer both then mostly sure one is a limited (reduced functionality) version of the other. Moreover companies tend to create a gap between the time when the offline and the online version gets updated. You always hear thing like “the online version does not yet support feature X that is available in the desktop version. Will be available soon”. The bad thing is the soon might mean a couple of months.

Creating software that works the same way both online and offline is not a new idea but until not it would require a lot of overhead. There was the need to simulate either the offline environment online or the reverse.

Now, with Live Mesh, the online environment is simulated on the local machine with no overhead for the developer. The guys from Microsoft resolved this problem and they’ve simplified our lives.

There are some aspects that need to be clarified as pointed in Part 1 about online services and applications:

  • The user experience: this problems was somehow resolved by enabling applications to be based on Silverlight. This technology enables web applications to deliver an improved experience compared to the classical web apps. It is client-side technology.
  • The need of permanent connectivity: just like smart clients, Mesh Enabled Applications can run with no network connectivity, persist offline what needs to be processed online and continue the process when connectivity is available. In other words what can be done offline is done anytime and if Internet access is required the task is queued.

2. The Actors

Lets consider a company named InvoiceGuys which offers a service called InvoiceService that exposes functionality for processing invoices. Anyone can subscribe the this service – for the sake of simplicity we’ll just ignore authorization and authentication; just don’t do this in real life!

Read the rest of this entry »

Software + Services. A Modern Approach. Part 1

Part 1 – Intro

Part 2 (The Idea) >

Contents:

  1. What is Software + Services
  2. Azure Services Platform
  3. Live Mesh

1. What is Software + Services

Over the past decade, the world we live in has been transformed by the Web. More and more people gain Internet access, services become more accessible  and the experience is improving. There are a lot of advantages of using Internet services:

  • Low hardware requirements: services use the resources provided by the vendor and not the local ones. We only need devices capable of displaying the information that the service is sending. Most of the time no processing is done locally.
  • Device independence: a service can be accessed from any device connected the Internet. It does not require special privileges on the local machine and no installation is required.
  • No maintenance: services are maintained and updated by the service provider, the client must do nothing to configure it. The service is an out of the box solution.
  • Flexibility: we can change the service provider whenever we want. This capability creates new opportunities for businesses that can dynamically swap services and choose the one that matches their needs.

However there are still some limitations for which running local software is preferred instead of a web application/service:

  • User experience: browsers are not yet capable of delivering the same user experience as a local running application.
  • Privacy: there are situations when a company chooses the keep all its data within its controlled/trusted borders. There are many privacy concerns when using 3rd party services because there is no control over the security and must rely on the provider’s security. Some complex federation problems might occur.
  • Offline experience: even though the Internet is now available most of the time there are still situation when network access is not available (maybe some technical problems) and the service  cannot be accessed.

What do we do when we want to power of local running applications and the flexibility and ease-of-use of the Internet services? Simple: we take the best part of each, create an architecture that combines them and use it for application that work both online and offline. Ray Ozzie (Microsoft Chief Software Architect) mentioned that “when you combine the ever-growing power of devices and the increasing ubiquity of the Web, you come up with a sum that is greater than its parts. … Software-plus-Services is the next logical step in the evolution of computing.  It represents an industry shift toward a design approach that is neither exclusively software-centric nor browser-centric” [1].

Read the rest of this entry »

Windows Azure Application Architecture

Windows® Azure is a cloud services operating system that serves as the development, service hosting and service management environment for the Azure Services Platform. Windows Azure provides developers with on-demand compute and storage to host, scale, and manage Web applications on the Internet through Microsoft® data centers.

A service hosted in the Windows Azure fabric implements one or more roles. A role is a scalable component built with managed code. A service may run multiple instances of a role. Within the Windows Azure fabric, running instances of a role are replicated across multiple physical machines to implement all or part of the functionality of a service. Each role runs in a virtual machine that has following predictable resources allocation: 64bit Windows Server 2008 OS, 1.5-1.7 64 bit CPU, 1.7 GB RAM memory, 100 MB/s network and 250 GB storage space (only 50 available in the CTP). So basically the developer creates the application as being used by one user and, in the cloud, many instances of it are created to support multiple clients.

The Windows Azure fabric currently supports two types of roles:

  • Web Role is an application accessible through HTTP and/or HTTPS endpoints. A web role is hosted in an environment designed to support a subset of ASP.NET and Windows Communication Foundation technologies.
  • A Worker Role is a background processing application. A worker role may communicate with storage services and with other Internet-based services. It does not expose any external endpoints. A worker role can read requests from a queue defined in the Queue storage service.

Because workers do not have some public endpoints some architectural considerations must be taken. How can a worker process external data? How web roles and workers exchange information? Why do we need workers?

Web roles can send/receive data to/from workers using the Storage Services. Storage Services include Blob, Queues and Tables.

  • Blobs are sets of binary data; they are similar with files from your local windows storage. Blobs are organized in catalogs that are similar to folders.
  • Queues are just message queues. They are FIFO (First In First Out) data structures that can hold messages up to 8kb each.
  • Tables provide structured storage in the form of tables. However this is not a relational database system! They are just some tables that hold data with no relation between them.

Of course, web role or worker role can make any external HTTP/HTTPS request. Also blobs, queues and tables can be accessed from outside the cloud through HTTP(S) requests. I will focus today on the internal could application architecture and not on the outside requests.

architecture

Read the rest of this entry »