Skip to main content

Posts

Showing posts from August, 2013

More about 'OnMessage' method of Service Bus

If you are using Service Bus, you should know that you have the ability to be notified when a message is available in the queue or in a subscription. Using this feature you don’t need to call the "Receive" method and catch the timeout exception when there are no new messages are available. OnMessageOptions messageOptions = new OnMessageOptions() { AutoComplete = true, ExceptionReceived += LogErrorsOnMessageReceived }; queueClient.OnMessage((message) => { ... }, messageOptions); As you can see, you register to an event that will be called when a new message is available. If there are more than 1 messages available the event will be triggered more than one. Each notification will run on a different thread. To be able to control the number of concurrent messages that can be received by a client you should change the value of "MaxConcurrentCalls". OnMessageOptions messageOptions = new OnMessageOptions() { AutoComplete = true,

Http Request in .NET Compact Edition ended with "Unable to read data from the transport connection … Unknown error (0x0)"

We are leaving in a world that begin to be dominates by smart devices – device2device communication is not something new. Today I would like tack about a problems that we had when we integrated 2 smart devices. One of the devices expose an HTTP endpoint that can be used to communicate with him. Based on a REST API you can send to him different requests. From our desktops all the communication worked perfectly with this device. When we imported the client code to a Smart Device Project (special project used to write components for Windows Compact Edition and .NET Compact Framework 3.5) we had a big surprise. Each HTTP request to the first device ended with the following error code: “Unable to read data from the transport connection … Unknown error (0x0)” … at System.Net.HttpWebRequest.finishGetResponse() at System.Net.HttpWebRequest.GetResponse()… > The code that generated the error code was: public void SetColor(Color color) { if (color != Color.Red

Control the color of Philips Hue Lamp based on the user status - Friday night undercover project

Yesterday I had the opportunity to put my hands on some lamp from Philips – Hue Lamps . Basically, you have one or more lamps that can be controlled over the network. For each lamp you can control the color, brightness and so on. The communication is done over a simple HTTP API that is well documented. When you will buy one or more lamps you will receive also a small device that needs to be connected to your network. That small device is used to communicate by wireless with your lamps. I had the idea to write an application which controls the color of the lamp based on user status. For example when you are in a call, the color of the lamp will be red, otherwise green. I integrated the application with Skype, Outlook calendar and Lync. If you want to play with this application you can download it from here:  https://huelampstatus.codeplex.com/ You will need to install Skype API SDK, Lync 2013 API SDK and you need to have Outlook 2013. The application is not finished yet, but is a g

Today Software Magazine - number 14 is launched

The number 14 of Today Software Magazine is on the market. Even if is a great weather outside, people still have time for this great magazine – congratulations. In the new number of TSM you can find information related to agile development, Haskell or load testing using Windows Azure - http://www.todaysoftmag.ro/tsm/ro/14 In this number of the magazine I wrote an article about Load Testing using Visual Studio 2013 and Windows Azure. This is a great service lunched by Azure team. Even if the article is in Romanian I already translated it. You can find the article here: http://vunvulearadu.blogspot.ro/2013/08/load-test-using-windows-azure-and.html Also, I already made a presentation related to this subject: http://vunvulearadu.blogspot.ro/2013/08/post-event-summer-codecamp-at-cluj.html         I hope than you will enjoy reading the new number of Today Software Magazine.

Legacy code, improvement task that are not finished

Until now I was involved in several projects that contained a lot of legacy code. On each project of this type people tried to improve the code, refactoring it and so on. I think that all of us know this story. Having a code base with 3 million lines of code or 10 millions lines of code will contain a lot of crape. The code improvement action will never finish, this action will continue until the end of the project (end of maintenance phase) or end of the world. It is very easily to find problems in a code that was not written by you. In cases like this you can propose a solution. If the architect or the person that is responsible on the project will accept your proposal, sometimes you will have allocated time for this task. We can have one, two, ten or more improvement tasks that run in the same time – assigned to different team members. But what is happening when an issue is discovered and you receive a phone call from the client with a 911 problem? You will put the improvement

Load Test using Windows Azure and Visual Studio 2013

In a perfect world I would except to be able to run a load test or a stress test using a cloud provider without being forced to change any line code from my tests.  In this article we will find out how to do this thing using the new cloud service. How a person without knowledge of cloud will be able to run a load test with 50.000 users for 24 hours with minim costs, without being obliged to purchase and configure 10, 20 nodes. What is a load test? What is a load test in fact? An expression that I think it fits when we need to answer this question would be: ”Are you ready to be so popular?”.  The main scope of this kind of test is to define and validate the maximum load that a system can have without affecting the performance. Even though the developer tells that the system can handle without any problem 1000 users in the same time, the load test can prove the contrary even on simple scenarios. There is a tiny difference between the load test and stress test. Many times the load t

[Post Event] Summer Codecamp at Cluj-Napoca (July 31, 2013)

Last afternoon we had another Codecamp event in Cluj-Napoca. Around 70 people came to find out more about Team Foundation Server 2012, Virtual Machine Manager 2012 and how we can make load tests using Visual Studio 2013 and Azure infrastructure. Special thanks for THE sponsors – YONDER and CORESYSTEMS . Recorded sessions: Managementul testelor cu Team Foundation Server 2012 si System Center Virtual Machine Manager 2012, Adrian Stoian Load Tests using Visual Studio 2013 and Azure Radu Vunvulea The slides of my session: Load tests using Visual Studio 2013 and Azure from Radu Vunvulea And in the end you can find some pictures from the event: