Skip to main content

Posts

Showing posts from January, 2013

Fuslogvw.exe - assembly binding logger

TSM Magazine - number 8 launch event - talking about cloud

For Today Software Magazine, today was an important day. The first number of 2013 was launched. In this month number we can have different subject about web, SEO, IT management and much more.
In this number of the magazine I decided to talk about scalability points on the cloud, using some example that Windows Azure offer to us.
If you know Romanian I invite you to read the full article here, if not you will need to wait 1-2 until I will have time to traduce it.

My presentation slides can be found here: http://www.slideshare.net/raduvunvulea/radu-vunvulea#

Password/Token/PIN definition

Password, Token, PIN, Passcode… every day we use this items when we need to authenticate in different systems. I observed that there are times, during a discussions, when is not very clear what is the difference between this items and the terminology is used in a wrong way.
Let’s see what each item means:
Password: It is a set of characters used during authentication process and is known by the user. The user can also set the password.
Token: It is a temporary access key that is generated by a provider (server, hardware device …) and can be used by someone to have access to different resources. A token cannot be change manually by an end-user to a friendly-value
PIN: It is similar to a password and is used during the authentication process. Normally the PIN is used when the user is partial trusted (for example mobile phone). In general a PIN is not very long and after several attempts of using a wrong PIN the account/device is locked. 
Passcode: Is a combination between PIN and Token and…

Windows Azure Storage Emulator and testing servers

When you start to work with Windows Azure Storage Services like blobs or table you will need to specify an account name and a secret key. Working with the Windows Azure Storage Emulator you ask yourself what credentials I should use.
The good part of the story is that Microsoft offers us a default account name and key that can be used to access the storage. This can be used with success whey you want to use the local storage emulator:
Account Name: devstoreaccount1 Account Key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== Basically these are universal credentials that can be used on all the Windows Azure Emulator instances. The purpose of this is only for development and testing.
When you are staring development an application you should know that the path to the resources is a little bit different between the Windows Azure and your local machine. Your local resources are accessed using a path in the following format:
http(s)://127.0.0.1:1000…

Code refactoring - NULL check (Part 3)

Part 1
Part 2
Part 3
In my last two posts I wrote about “Null Object Pattern” in different scenarios. This post is related to this subject and we will discover how we can use this “pattern” when we are working with interfaces.
Let’s assume that we have the following interface and implementation of the interface:
public interface IFoo { int A { get;set; } int B { get;set; } int C { get;set; } } public class Foo : IFoo { public int A { get;set; } public int B { get;set; } public int C { get;set; } } In this case we would need a mechanism to implement a null object. We could create a static property to the Foo object that represents the null (default) value. This could be a solution but is not the best one.
Off topic: I really don’t like the NULL naming. I would prefer a name like “Default”.
What about creating a class that represents our null interface?
Creating a class that implement our interface that represent our null object will help us a lot when we need to check if t…

[Post-event] Cloud and Windows Azure in 2013 - Codecamp la Cluj-Napoca, 17 ianuarie

Code refactoring - NULL check (Part 2)

Part 1
Part 2
Part 3

In my last post we played a little with how we can check if an object is null or not. What I forget to mention in the post is the way how you can construct the object that can be null.
In the given case the constructor of the object was pretty complicated and you could not create the object without initialize a lot of items around him. As Tudor mention in a comment we could use the “Null Object Pattern”.
Let’s see how the code would look like if we could create an instance of the object. The “Null Object Pattern” is based on a neutral object that is considered the equivalent for NULL. This object contains all the default value of the properties that are exposed.
Using an object like this we don’t need to check if our item is null or not. We can directly access a property of it. During the lifetime of an application we should have only one instance of our object (Null Object) – the instance can be stored in a static field.
Using this solution we would end up with…

Code refactoring - NULL check

Part 1
Part 2
Part 3

Let’s look over the following code:
public class Foo { SomeFoo _some; ... public int GetA() { if(_some == null) { return 0; } return _some.A; } public string GetB() { if(_some == null) { return null; } return _some.B; } public int GetTotalX() { if(_some == null) { return -1; } return _some.A + _some.C; } } We can see that the IF checks appears in more than one place. Even if is only a simple check, there can be a lot of places where it appears.
If we manage to extract this check in a generic method, than the code would be more legible. Because we don’t return each time the default value of an object we need to be able to return custom “default” value for the case when or object is null.
We can image a method that accept as parameter the object that we check if is null or not and another two parameters that represent the default value that need to be return and a gener…

VM Depot - Stepping into a new era

From last year, Windows Azure started to support any kind of system on Virtual Machines. We can install a Linux operating system on them without any kind of problem. Also we have some images created by default, with different operating system, that can be used by anybody.
This year we have a new feature related to these images.  Windows Azure offers VM Depot. This is a place where anybody can upload his image of operation system and share with others. For example we can create and share with others an image of Ubuntu that is preconfigured to run different application like Redmine, Moodle,  Glitorious and so on.
A nice feature of this system is the rating and feedback mechanism. Each user can rate an image and give feedback. In this way people can select more easily an image for themselves. Not only this, but you can take an image, change it and share it again with others.
When you want to deploy an image of a VM machine from Windows Azure, VM Depot will generate the command line that…

Data Model for Reporting over Windows Azure Tables (part 2)

Part 1
In the last post we talked a little about how we can calculate TOP 5 visited URLs per day for each user and TOP 5 visited URL anytime. For these cases I propose some ways on how we can store information on Windows Azure Table in a way that we can generate these reports.
In today post we will see how we can resolve the concurrence problem. We can have 10, 20 or 100 commands that want to execute over the same entity from Windows Azure Table. Because of this we need to guaranty that the writer has the last version of the entity before update it. If we will not be able to guaranty this… than our reporting solution will be compromised.
Windows Azure Table comes with a simple solution. Each entity that is stored on tables contains a unique key named ETag. ETag is changed every time when the entity is updated or changed. Based on this value we can know if we have the last version of an entity or the entity was changed from the moment when we receive it. ETag is the secret that give us…

Data Model for Reporting over Windows Azure Tables

One of my colleague tried implemented a browser history mechanism for MVC. Based on this data he would like to generate two simple reports:
Top 5 web addresses accessed by a given user per dayTop 5 web addresses accessed by all user When the data store is implemented using SQL Azure, this problem can be resolved very simple.  The question that appeared here is: Can we implement a data store model using Windows Azure Table Services?
I will try to propose a possible data model that is using Windows Azure Table.
In the default implementation (using SQL Azure), there were 3 kind of information that is stored in the SQL tables:
URL visited UserDate Because we don’t have an order by, count or a max function in a query over Windows Azure Table we need to think at a model that would help us with this. We will start with the first requirement:

Top 5 web addresses accessed by a given user per day
To be able to solve this problem we need a data model that permit us to refer to URLs for a given da…

Scheduled Backend Tasks - Windows Azure Mobile Services

Using Windows Azure Mobile Services we can create in a short period of time a simple backend for our application. In the last period of time a great feature appeared – Scheduled Backend Tasks
This feature permit users to create jobs that can run at a specific time interval. Imagine that you have an application that track the GPS location of users for the last 6 hours. All the information those are older than 6 hours can be removed. This problem could be solved by a manual trigger, but we are the XXI century, everything needs to be automatized. In this case you would have a job on a server that would make this cleanup. But wait; way would you need something like this when Mobile Services give you the possibility to create your backed very easily.
The scheduled job support gives us the possibility to create a job that run at specific time intervals or demand. Each job that is created can be enabling or disable anytime. Also, jobs can be run manually, using the “RUN ONCE” functionality.�…

Cloud and Windows Azure in 2013 - Codecamp la Cluj-Napoca, 17 ianuarie

Link pentru inregistrare Acest an se anunță un an extrem de interesant. Soluțiile cloud devin mature, iar miza creşte atât pentru provideri cât şi pentru dezvoltatori. Cu această ocazie Codecamp vă invită la "Windows Azure in 2013". În cadrul acestui eveniment o să vedem ce ne oferă Microsoft în lumea cloud.

Participarea la eveniment este gratuită. Mulțumim în special sponsorilor pentru susținere. Agendă

18:15-18:30 Sosirea participanților
18:30-19:30 Scalability in a Cloud Application Radu Vunvulea In this session we will see what are the scalabilities points of a cloud application. In the first part of the session we will look over the services offered by Windows Azure. 19:30-19:40 Pauza

19:40-20:40 Maintenance of Windows Azure applications Mihai TătăranAfter you have developed version 1 of your Windows Azure solution, you need a strategy and strict procedures in place for application maintenance and support. In this session you will learn the basics on Windows Azure applications…

Quality Attributes Scenario Components

When we are talking about the quality attributes of an application we risk to talk all night without approaching the end of the topic. The main scope of this article is to see what are the main components of a scenario that can define a quality attribute.
There are a lot of quality attributes that can be involved. There are 6 attributes that are very common and extremely important in a solution:
Availability Modifiability PerformanceSecurityTestability We saw the most important quality attributes and it would be very easy for us to find another 10. All this attributes are executed based on a predefined scenario. The components of the scenario can be isolated and used to identify, describe and understand each attribute.
Each quality attribute has a SOURCE OF STIMULUS. There is an entity that generates the stimulus. In a simple scenario we can have a person, but the stimulus can be another system, a handler or even a specific time. This stimulus is the source that triggers the specific …