Skip to main content

Posts

Showing posts from July, 2013

Coding Stories VII - Add, Subtract the same value

Looking over an open source library I found the following code: interval void SomeMethodName(FooIncoming that) if (that.numAnswers > 0) { SupportClass.IListSupport.AddAll(this.answers, this.numAnswers, (IList) ((ArrayList) that.answers).GetRange(0, that.numAnswers - 0)); this.numAnswers += that.numAnswers; } if (that.numAuthorities > 0) { SupportClass.IListSupport.AddAll(this.answers, this.numAnswers + this.numAuthorities, (IList) ((ArrayList) that.answers).GetRange(that.numAnswers, that.numAnswers + that.numAuthorities - that.numAnswers)); this.numAuthorities += that.numAuthorities; } if (that.numAdditionals > 0) { SupportClass.ICollectionSupport.AddAll(this.answers, (IList) ((ArrayList) that.answers).GetRange(that.numAnswers + that.numAuthorities, that.numAnswers + that.numAuthorities + that.numAdditionals - (that.numAnswers + that.numAuthorities))); this.numAdditionals += that.numAdditionals; } ... } What I loved in this code was: that.numAnswers – 0 that.

Azure and IP Persistence - VM,Web/Worker Roles

If you already worked with Windows Azure, especially with worker roles, web roles or VM I suppose that you noticed that Azure don’t guaranty a static IP of this machines. Because of this it is not recommended to access or connect different Azure resources based on the IP (internal IP). But in the same time, there are moments when the IP is persisted. For example when you restart the resource. In this blog post I will try to explain when the IP of the resources will not change and will remain the same after different actions. Case: Upgrade Let’s suppose that our resource is restarted after an update. In this case the original IP of it will be persisted. Example: Before: VM_IN_0 – 10.0.0.10 VM_IN_1 – 10.0.0.11 (restarted) After: VM_IN_0 – 10.0.0.10 VM_IN_1 – 10.0.0.11 Case: Hardware fail When we have a resource that I take down because of different situations (for example hardware fail) the original IP of the machine will be persisted after the instance is re-deployed. E

Traffic Manager Overview

Starting from today we have a mechanism that give us the possibility to control the traffic that comes to our Azure services. The name of this service is Traffic Manager. What does this means? Performance Load Balancing Well, the simplest scenario is when we have a service running on different data centers. In this case we want to be able to redirect users to the closest data centers. We could have a service that identifies the location of the user and based on this redirect him to a specific data center. This problem is resolved by Traffic Manager Service. Using the client IP, this service will identify the location of the client and will redirect him to the closest data center (the one that have the lowest latency). To be able to monitor the performance of each endpoint you will need to specify a relative path to the resource that is monitored. The monitor part is pretty simple, the latency time of each endpoint resource is measure every 30 seconds. When one of the request ex

Summer Codecamp at Cluj-Napoca (July 31)

At the end of this month Codecamp will organize a community event in Cluj-Napoca. This event will be dedicated to Team Foundation Server 2012, System Center Virtual Machine Manager 2012, Visual Studio 2013 and Cloud. With all this systems we will discover how to manage and write betters test (unit-test and load-tests). Registration link:  codecamp-cluj-iulie2013.eventbrite.com Agenda (for Romanians): 18:15-18:30 - Sosirea participanÈ›ilor 18:30-19:30 - Managementul testelor cu Team Foundation Server 2012 si System Center Virtual Machine Manager 2012, Adrian Stoian 19:30-20:30 - Load Tests using Visual Studio 2013 and cloud, Radu Vunvulea Special thanks for our sponsors:

Subscription count - (Part 7) Testing the limits of Windows Azure Service Bus

Let’s talk about Windows Azure Service Bus and the numbers of subscriptions that a topic can have. I started to prepare a POC for a possible client and it is possible to end up with hundreds of subscriptions on each topic. Looking over the documentation from MSDN, each topic supports 2000 subscriptions. I wanted to see what is happening with the latency of each subscription if we have over 1000 of them per topic. To find an answer to my question, I started to write a worker role that: Creates a new subscription Sends a message to the topic Receives a message using the first subscription I measured how long it takes to send a message to a topic that has 1, 2, … , 2000 subscriptions. The same think I’ve done for the first subscription of the topic. I measured how long it takes to read a message from it when we have 1,2, … , 200 subscriptions. The code is extremely simple but the results are very interesting. The first diagram shows how long the send and receive commands took. Th

Visual Studio 2012 - Strange behavior durring the commit

Based on TFS and local machine configuration, when we make a check-in we can set a task associate with the changeset to Resolve status. There are times when you cannot change a task status to Resolve, for example different policy on TFS machine. If you are using Visual Studio 2008 or Visual Studio 2010, everything will be away – an error message will be displayed that notified you that the commit ended without success. When working with Visual Studio 2012 you will discover that even if an error is displayed during the check-in, the changeset will be pushed to the source control without having a task associate to it. You will receive the TF237124 error, but only after the commit is pushed to source control. This will happen even if on the TFS you enforce a rule that allow to commit only if a task is specified. I hate this behavior, because a commit is made to source control even if an error appears. To be able to assign a task to the changeset, you will need to open the task in TF

Today Software Magazine - Number 13 was published

This week the 13th number of Today Software Magazine was publish. In this number of the magazine a lot of interesting subject were discussed, starting from HTML 5, to lean software development and functional programming. In the current number of TSM I wrote the 3rd part of the article that discuss about Hadoop, especially from the environment, costs and tools that can be used in combination with it. You can find this new number of Today Software Magazine here: http://www.todaysoftmag.com/tsm/ro/13

Remote debug of an application that is on Windows Azure using VPN

One cool thing that I like when working with Azure is the way how you can do remotely debug. In a classic system is not very easily to do something like this. Azure facilitate this using Visual Studio and attached to process mechanism. Theoretically you should not need to do remote debug, but in practice you need to do this from time to time. To be able to do something like this you will need to create a virtual network. Using the virtual network you will be able to establish a VPN connection between the cloud machines (network) and you. Using this feature you can do more complicated stuff, for example integrate your cloud network with the one from your premise, but we don’t needs something like this if we want remote debugging. Creating the virtual network is pretty simple. You need to go to New-> Network -> Virtual Network and create a new one. For this purpose you don’t need to make any kind of custom configurations. Don’t forget to select your affinity group – this should

TechEd 2013 - Day 4

Last day of TechEd 2013 ended, goodbye Spain. This day ended with a lot of interesting sessions related to Windows 8, Azure and Big data. I discover new ways how we can use Bitlocker for enterprise customers and why different 3rd party prefer to use Bitlocker and give up of their own mechanism. I think that you heard that the preview version of Windows 8.1 can be downloaded from Microsoft news. Be aware, if you install the preview version of Windows 8.1, moving to the final version of 8.1 will not be so easily. When you go to the preview version, don’t let the installer to update the backup partition also. In this way it will be very easily to go back to 8.0 and install the final version of Windows 8.1. In general I prefer to use install the preview version of any software o virtual machines. While attending to a session about big data and Hadoop I find out how you can increase the performance of a reduce operation. During the reduce operation it is recommended to have as few as poss