Skip to main content


Showing posts from November, 2012

Mobile Service on Windows Azure (part 3)

Presentation 2
Yesterday I had the last session about Mobile Services on Windows Azure for MSP of UTCN from Cluj-Napoca. We talk about authentication and push notification on mobile devices as Windows 8, Windows Phone 8.
Mobile Services from Windows Azure can save as not only from a lot of work but also can reduce our application complexity. Don’t forget that authentication using Mobile Services will not provide you access to SkyDrive or other services that are coming with a Windows Live account.

Here is my presentation:

Windows 8 Dev Camp Sibiu, 24.11.2012 - Postevent

This Saturday we had our first CodeCamp event in Sibiu. Even if it was the first event in Sibiu we had a lot of attenders – we were almost 100 people that stayed with us almost 7 hours.
This event was dedicated to Windows 8 and was named “Windows 8 Dev Camp”. We tacked a lot about Windows 8 from different perspective and how can be integrated with different services like Mobile Services or Media Services from Windows Azure.
Because this event was an event dedicated to developers and technical persons we tried to explain all the base thing that a develop need to know about Windows 8. One of our speakers (Mihai Tataran), brought in exclusivity a Windows Surface. This is a great device with a high potential. All the people that stayed until the end had the chance to win some software licenses.
At this event I talked about the architecture of Windows 8, WinRT, native languages that are available on this new platform and what thing that a developer need to know. You can find my presentat…

Mobile Services from Windows Azure - Introduction

What do you think about Windows 8 and Windows Store? It has a great potential and is a place where people with good ideas can develop application.
Usually when you develop an application you also need a backend. A place where authenticate users, to store data and so on. Windows Azure comes with a solution that can freaks out any kind of backend developer – Mobile Services
Why is so great? A lot of backend stuff that you need in a normal mobile application is built in. Let me give you some example:
Authentication infrastructure for Windows Live, FB, Twitter, Google and more coming soonPush notificationStore data on the serverCustom scripts on working with server data And this is not all. Imagine that you develop an application for iOS. Could you integrate Mobile Services from Windows Azure? YES, you can. In this moment, after you setup your mobile service you can download a sample application for Windows 8 App, Windows Phone or iOS that contains all the settings for your account and a…

NetCamp 2012 - Windows 8 development experience

During this week I participate to NetCamp 2012.  This was the 6th NetCamp event and is organizing by Evensys. NetCamp is a dedicated event for online entrepreneur and how they can turn their ideas in reality.
What I’m doing there? Well, I had a session where I presented how was the development process of Trip Journal on Windows 8 and what are the things that an entrepreneur should take into account when select the platform for their application.
Any entrepreneur that would like to develop mobile application in Windows 8 should take into account the following thinks (these are the most important ideas from my presentation):
Windows Store – a big opportunity for any person with ideas. It is place where your application can be visible to usersWindows 8 Apps – one application for desktop and tablet version. You don’t need to write different applications for different devices3 native languages that can be used to develop a Windows 8 App – C#, C++, JavaScriptWindows Store App is not an And…

CDN is not the only solution to improve the page speed - Reverse Caching Proxy

I heard more and more often think like this: “If your website is to slow, you should use a CDN.” Great, CDN is THE solution for any kind of problems… or not. Depends what is our problem.
First of all let’s see what does CDN means. Content Delivery Network gives us the possibility to improve our web application performance by distributing our content in different geographical location that is closed to our client. This is a great solution when we have static content like images, videos or any kind of static content.
In this moment there are a lot of great solutions, from Azure CDN that are very easy to config and scalable to EdgeCast or Akamai.
But maybe our problem is not from there. What happens if users are in the same geographical region? Using a CDN may or not may improve our speed performance. The entire request will hit our servers. A bunny will tell us: “It’s not a problem dude, we live in the cloud nowadays, scale up your application on more instances”.
HTTP Caching Reverse…

Windows Azure Tables - One of the request inputs is not valid.

In this blog post we will talk about an error that occurs when we want to delete or update entities from Windows Azure Tables. Let’s assume that we have the following code:
TableServiceContext serviceContext; … serviceContext.AttachTo(“MyFooTable”,entity); serviceContext.DeleteObject(entity); serviceContext.SaveChanges(); When we run the code we will see the following error message:
One of the request inputs is not valid. The source of the problem is the ETag. ETag is used to track changes of an entity and commands like delete use this ETag to check if the entity that is deleted is the last version of entity. If we are share that we want to delete this entity we can set the 3th parameter of AttachTo to “*”. Using “*”, you will specify to the context to not track the entity based on the ETag.
Our code should look something like this:
TableServiceContext serviceContext; … serviceContext.AttachTo(“MyFooTable”,entity, “*”); serviceContext.DeleteObject(entity); serviceContext.SaveChanges()…

Why and Where for MongoDB, Cassandra, CouchDB, HBase, Membase, Redis

More and more people are starting to use NoSQL. I think this is extremely good. NoSQL can make our life better in a lot of situations. In this post I will try make a list of current NoSQL solutions that exist on the market and when we should use each other.

Dynamic queryContent is stored as documentsBig database that need to be very fastWhere
Properties are stored like query and indexCan be used for voting system, CMS or comment storage
When you make a lot of updates and insertReading data is not the main scope of the database (writes are faster than reads)Content is stored as columnHigh availability Where
Can be used with success for loggingFinancial industry or any place where we work with a lot of data that is needed to be writtenBasket of an e-commerce application

For data that don’t change very often (insert and read and NOT update)We have a lot of predefined queries and we need versioning supportWhere
Is a great database for CMS and CRM.
When yo…

Service Bus Topic - Automatic forward messages from a subscription to a topic

Windows Azure Service Bus Topic is a service that enables us to distribute the same messages to different consumers without having to know each consumer. The only think that we need to do is to know the topic name. Each consumer will need to create and connect to a different subscription. Each message added to topic will be forward to each subscription.
There are times when we need to forward a message from a subscription to another topic or queue. Until now we had to use a worker role that took the message from the subscription and adding it to the second topic.
From now, a subscription supports this great functionality, by default. We only need to set the name of the topic or queue of the Service Bus where we want to forward the message.
SubscriptionDescription description = new SubscriptionDescription("topic1","subscription1"); description.ForwardTo = "topic2"; SqlFilter filter = new SqlFilter("FW = true"); namespaceManager.CreateSubscription…

WOWZAPP2012 - Awesome Hackathon

This weekend, all around the word we had WOWZAPP Hackathon.  This Windows 8 Hackathon was a 48 marathon of Windows 8 App development. Over 15.000 people were connected with Visual Studio 2012 and develop great application for the new operating system – Windows 8.
I participate at this event with other 3 colleges and we develop an application that could help you to find location when you don’t have internet connection. We didn’t manage to finish it, we tried to apply MVVM pattern 100%. Our main focus was the code quality and not to finish in 48h. The team name was DOTNET Vampires and team member were: Costin Morariu, Iulia Gorcea, Alexandra Vunvulea and @me.
This was a great event and we had a lot of fun. In Bucharest, we had almost 40 team. At this event I was not only as a percipient, I was part of the Windows 8 SWAT team. We were the persons that offered technical support for all teams. I think that almost all project had at least 3 lines of code written by me. It was a lot of fun…

Windows 8 Dev Camp in Sibiu - 24 nov 2012

After the Windows 8 Dev Camp from Cluj-Napoca, we are preparing Windows 8 Dev Camp in Sibiu. To be able to register please follow this link: Here is the announcement message for Romanian guys: În urmă cu aproape o luna, Microsoft a lansat un nou sistem de operare - Windows 8. Cu această ocazie Codecamp împreună cu ITSpark vă invită la “Windows 8 Dev Camp”. În cadrul acestui eveniment o să disecăm o parte din secretele pe care un dezvoltator trebuie să le cunoască despre Windows 8. Participarea la eveniment este gratuită. Mulțumim în special iQuest pentru susținere. Agendă
9:15-09:30 Sosirea participanților 09:30-10:20 What's new in Windows 8? Tudor Damian A brief overview of the new features and performance improvements in Windows 8. 10:30-11:20 Developing modern web applications: HTML 5, MVVM, Web Sockets Mihai Tătăran In this session you will see a modern approach to web applications, from designing the client-side JavaScript code, to co…

Caliburn.Micro + Windows 8 App - How to send parameter between ViewModel's

What do you think about the development process in a C#/XAML app for Windows 8. When we are starting developing an application for this platform we should never forget about MVVM. A great framework for this is Caliburn.Micro. It is a pretty simple and clean framework, with a lot of extensions points.
When we will try to navigate between screens we will use INavigationService.NavigateToViewModel<TDestionViewModel>. This will work great.
Navigation.NavigateToViewModel<MyFooPageViewModel>(); Each ViewModel need to implement the Screen class. This will give access to all the features that we need in the view mode. But what about sending data from one view to another. The method NavigateToViewModel can accept an parameter of type object.
Navigation.NavigateToViewModel<MyFooPageViewModel>(“some data”); Looks good but you will be surprised when you will try to get this data in your destination ViewModel. You will not be able to find this data anywhere.
To be able to acce…

How to fix "Could not load file or assembly 'msshrtmi.dll' ... when you are using .NET 4.5 and Windows Azure 1.8 SDK

vIf you started to work with Windows Azure SDK 1.8 on a .NET 4.5 projects, maybe you received the following error message:
The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception. … {"Could not load file or assembly 'msshrtmi.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)":"msshrtmi.dll"} This problem usually appears in a console or desktop application when you are trying to use storage service from Windows Azure (blobs, tables or queues).
The solution is pretty simple, but can give you a lot of headaches until you find what the problem is. The code is okay; you didn’t make any kind of mistake. You only need to change some configurations from app.config.
You will need to add “useLegacyV2RuntimeActivationPolicy” attribute to the startup node and set it to true. This flat notifies the .NET framework that you have dependencies …

Today Software Magazine number 6 - Message Patterns using Windows Azure Service Bus

This week, Today Software Magazine lunched a new number of their magazine. Great article about software development can be found in this paper. Great articles about SEO, to clean code and cloud can be found in this number.
I wrote an article about message patterns and Windows Azure Service Bus Topic. In this article I presented two cases when message patterns in combination with Windows Azure Service Bus Topic can make our life easier and to be more prepared for change.
The current number can be downloading from the following link: 
At the lunch event I made a short presentation of my article. I added to this blog post my slides:

Message pattern in windows azure service bus from Radu Vunvulea

How to start Windows Azure emulator when running unit tests

Unit test need to be written even if we are working with on-premise services or with services from cloud. When working with Windows Azure, there are times when we want to write some integration test for Windows Azure tables, blobs or queues.
For these cases we don’t want to hit the Windows Azure from the cloud. This would increase or monthly subscription costs. Usually for this this Windows Storage emulator is used in combination with development storage account.
When we are on a development machine, where we already have Windows Azure Emulator stared we will not have any kind of problems. But will happen on a machine where Windows Azure Emulator is not started. All the tests will fail.
We can write a code in the class initialize step that star the emulator. In the end, the emulator is only a process that can be started from the command line.
The code that we would need to use will look something like this:
public class CloudStorageEmulatorShepherd { public void St…

How to view Skype messages older than 3 months

This blog post will not be about programing. In this morning, while I was playing with my Windows Phone 7 I run our off battery. Of course the phone closed. The only problem was the PIN, I don’t remember my SIM pin (this is the first time in 7 months when I closed the phone).
I knew that I have the SIM pin in my Skype history, but the message is older than 3 months, because of this I could not access the history from that period of time. The good part with Skype is even if is not displaying all the history, he still persist the older messages.
All the messages can be found in the “%appdata%\skype” in the directory with your Skype user. The easiest way to go at this location is to open a command line and write “%appdata%\skype”. The file that stores all this content is main.db.
Don’t worry about how you can open this file of is encrypted. It is a simple SQLite file. Is not encrypted and can be pen very easily. A good tool for this purpose is Skype Log View. He will automatically open the …

Duplicate Detection in Windows Azure Service Bus

One great feature of Windows Azure Service Bus is the ability to identify the messages that are duplicate. Using this feature we can automatically remove messages from Service Bus Queue or Topic when we have more than one the same message. By default this mechanism is deactivated, but we can activate it very easily.
Let’s see how this mechanism works. When we activate this mechanism Windows Azure Service Bus will start to store a history with our messages. This period of time can be configures from only a few minutes to days. If a duplicate message is send to Service Bus, the service will automatically ignore the message.
Because the content of each message need to be serializable, the duplicate detection mechanism will look to the serialized items that were added to the message. If the content is the same, than the message will be consider as duplicate. For example we have the following class that we add to each message:
[DataContract] public Foo { [DataMember] public string …