Software engineering blog of Clément Bouillier: 2010

Tuesday, November 30, 2010

Alt.Net Paris session summary : "Build your own service bus" by Romain Verdier & Julien Lavigne du Cadet

Romain and Julien made a presentation/feedback about their experience in implementing their own Service Bus in ABC Arbitrage (thanks for the commodities). In addition to this summary, I encourage you to have a look at their (impressive Prezi) presentation.

They started with an overview of the context in which service bus notion is considered, reviewing some low-level concepts of MOM (Message Oriented Middleware) and giving a quick view on EAI/ESB concepts. These are the two exterme sides of the subject and set their implementation around two goals:
- add an abstraction layer to the MOM solutions, with lot of wanted conventions that help to simplify configuration, but keeping the power of these tools like interoperability, reliable message infrastructure...
- make far more simpler than EAI/ESB solutions and platform specific
Obviously, this subject is around Message driven architecture.

Next they went deeper in service bus concepts, that some solution they cited also implement. As they said, they did not invent anything.
First subject was about Message dispatching (how):
  • send: a message to one conterparty waiting a response
  • publish: a message to anyone who wants to pull it without any response
From these two methods, we see that there is two sorts of Message that they implements with two distinct Message concepts:
  • Command that are sent -> tell someone to do something (note the imperative tense)
  • Event that are published -> tell anyone wants to listen that something happened (note the passive tense)
Next, they talked about Sagas that allow to take care of long-running transactions. Their example of a trading application was judicious to understand it. Basically, it receives a "complex" trading order that will be decomposed in simpler orders (in order to accomplish the requested order without revealing the whole intention to the market...).
  • A Saga is initiated by a Command or an Event
  • It starts a process that send Command/publish Events
  • It goes to sleep until waken by another Command or Event
  • ...and it starts over, until the Saga determines it has reached its goal, then it ends.
They also quickly talked about some other (important) details like Pipelines for cross-cutting concerns, Time Service to manage Saga time out typically, Prototype Buffer for interoperable message serialization...

The main thing I would remind about implementation is the convention based aspect. It simplifies configuration (5 lines as they said) and hides some technical details, and then it allows to build the software with a bigger insight in Business value that any software should give to their users. It could be seen as a restrictive framework (just two concepts), but I truely think that it helps abstract from technical topics and focus on business value, and that these concepts are well suited to describe business goals.
Note that we did not talk about lots of related subjects like Event Sourcing, DDD...perhaps the next time :)...but we can say that Message driven architecture does not exclude other paradigms.

error MSB6006: "ResGen.exe" exited with code -532459699

I write my first tip blog post to talk about the following error I got stuck one hour (far too long...) without any search results on Google:

error MSB6006: "ResGen.exe" exited with code -532459699

I got this error when compiling a project targeting 3.5 framework with VS2010, which includes some resource file with CustomAction set to generate associated code.

In fact, I was doing some change to my configuration. Long time ago, I had set up the use of DEVPATH (configure it in the machine.config on dev machine). Due to a problem explained next, I have removed the DEVPATH environement variable, but keeping machine.config as is (to avoid full reconfiguration in case I would need temporarily the DEVPATH...ok I am really lazy :)).
Then, I discover that ResGen.exe fails, I find it when I launched compilation from command line with MSBuild and it was clear in exception trace details...really bad! (note that it works when you do not have RESX files...)

By the way, you should avoid using DEVPATH. It tries to replace GAC, but in fact it fails since it does not take care of DLL versions. But do not through it away to quickly, it could be useful to debug tier DLL for example without modifying all your references...
I found it when I have to install EntLib 5.0 side to side with EntLib 4.1...then only DLL found in first path referenced in DEVPATH was taken in account.
So 2 solutions: you are not lazy and you remove configuration in machine.config OR you are lazy and you set DEVPATH environment variable to something else than empty one (for example "D:").

Tuesday, November 23, 2010

Team Foundation Server Check In Policy Pack

I search over the web for some Check In Policies for TFS, and some were founds, some really interesting in my case. I think to:
But there are several drawbacks:
  • TFS Power Tools Check In Policy pack is lacking open cannot contribute, too bad when you miss just an adjustment to an existing policy
  • Configurability go from none to too much
  • Too much packages with different heterogeneous deliverables (package, docs...)
So why not an open sourced Check In Policy pack, on codeplex for example...I think we can gain from homogenization of development practices for Check-In Policies.

Here are some practices I think to:
  • MSI deployment with Wix : one feature by policy for example to allow flexible installation
  • Policy configuration management unified
  • Encapsulate common functionnalities in shared components (path exclusion...)
I was thinking to this pack to share my first Check In policy around Work Items, when I discovered that TFS bundled one and TFS Power Tools one are really basic and not contributable (do not allow link/hierarchy query) !!

Could be great if several projects could merge in one...

Thursday, November 4, 2010

First ALM France UG session

The session
I do not remember how I found this new user group, but I was really happy to assist to this first session.
Contents were "ecumenical", differents points of view and different communities represented (ok a little bit more of .NET one...oddly...). It was a first good point :).
Next, very important, I meet and talk with interesting people, and I hope we will share more in the future through this group.

Quickly about content, what is ALM? François Merand gives 3 major axes : Governance, Dev and Exploitation. Simple, great. So it is not just source control or continuous integration...

Then, Lucian Precup and Arnaud Heritier have made a quick overview of Open Source ALM ecosystem : Maven, IDE, IceScrum, Mantis, Git...and many more.

Daniel Cohen-Zardi followed with a presentation of his company and their product Code Fluent Entities, that proposes a DSL abstracting languages (he does not use the term DSL...but it seems like that to me).
The main points were around 3 concepts : agility, model-driven and executable models. I agree with him on these points. But for the solution, I remain to be convinced for now by this type of product...I prefer coding approach around DDD architecture.

Finally, François Tonic talked about his vision of ALM.

The group
To start, for french people, go to, for others hope it will develop in other countries ! :)
I am looking forward to Google Group discussion list to continue discussions...

Some ideas/reflexions to discuss...
1) We heard a lot the word "industrialization"...opposed to "craftsmanship"...we have to take care of these words use, there are a lot of misconception around over-standardization/normalization (quality ivory tower), over-specialization (like in classic industry) be discussed in the group :)
2) I consider ALM practices as central in day to day work, and badly initial formation are lacking in this field (at least mine and some of my colleagues...). There is certainly something to do about that.
3) I would like to share my current experience around ALM, and more importantly to have boss and me were thinking about that...perhaps a good chance to try...:)

Thanks again for the creation of this group !

Friday, April 9, 2010

DDD and CQRS resources

I see CQRS as a great extension of DDD approach. Some people say that you cannot do DDD without...I am not convinced yet.
DDD and CQRS are a lot discussed on the web, but I would like to try to keep in this post a list of resources that are really useful to start...but it depends from where you start.

DDD is becoming more and more known by the community, based on the "bible" of Eric Evans. You could go through the book and other conceptual resources, but I have to admit that it is not always easy to conceptualize without concrete application. That's why I point you to some resources that lead you to enter in DDD and CQRS world through really concrete examples starting from what most people knows.

Today, I think that Anemic Domain Model along with Transactional Script "business services" are a wide spread use of how OOP is used in enterprise (talking about Java and .NET world mainly).

First you can start with great series "Strenghtening your model" of Jimmy Bogard to understand DDD basics, and what are the differences with OOP basics. In his last post, you will see the reference to a great article of Udi Dahan about the concept of Domain Events.
Obviously, there are a lot of DDD concepts that are not covered (bounded contexts for example), but I think that starting from what people knows is a really great approach. You could then dig in other concepts of DDD.

From there, you would better understand CQRS. I think these DDD basics are all shared by CQRS leaders, in addition to the fact that CQRS prones the segregation of Query and Command in two parallel "layers", i.e Query to display some information and Command to treat business users' actions (through Domain Model).
As said by Greg Young, I see today mainly two major differences between CQRS proposed implementation, it concerns domain model persistence :
Main resources are some blogs of "concept leaders" :
To start, Greg, Jonathan and Udi have published theirs presentations of CQRS (video). It is a good start before reading blogs. Here is some of these :
Let's try now...for french people, Alt.Net France community has started a sort of Dojo Design around CQRS, we are also trying Google Wave for this. Join Alt.Net France to follow.

PS : Rinat Abdullin has tried to summarize and give some key points to start with DDD, CQRS and others buzz words

Tuesday, February 16, 2010

About communication mediums in general, but especially in enterprise

I'd like to give my point of view about the subject of communication mediums in general, It is just a first try on this subject. I will dig communication mediums in enterprise through communication tooling. The goal of this post is to analyse which communication medium should be for which purpose.

This post is quite general and focused on concepts (even if I am not an expert in the field), I will publish an example of what I mean with an example around tools that can implement what I explain in this post.

Note : I do not talk about how people can change communication according to their behaviour, which is more psychology, I just talk about means, even it is sure that the way you communicate is also an important subject.

I think communication as the main factor of success in any project in general, because a project is rarely a personal one but the one of a community in general (which could be a couple, a team, a service, a department, an enterprise, and so on...). Good communication leads to more efficiency and comprehension.

A quick analysis of common communication mediums

Since I am not an expert in sociology, psychology or communication mediums history, I just give a quick analysis of my understanding of what communication is becoming today.

Our society is called today "information society", because more and more information is exchanged between more and more people.

I see several main technologies that bring us to it:

  • In first days, there were just physical meeting and mail (and carrier pigeon...)
  • The first major discoveries that make evolve communication were radio and phone, which allow long distance communication with voice only (first unidirectional and broadcast, and then bidirectional)
  • Then there was television that allows broadcasting a communication with voice and image
  • And lastly, there were computer, networks and internet that allow to communicate with voice, image, writing...and disclosed to everyone today and with many means (email, chat, community sites, twitter, blogs,...), which makes communication so important in our society

But if we look at the means that are used today, we can see that email has a place of choice in our communications mediums, even more in professional world. Innovation in communications mediums are mainly spread on the internet and mostly by younger people who were born with them.
I think last point is a major reason why communications mediums in entreprise are so badly developed and late, since there, there is people from 20 to 70 years old. But it is time to change our use of technology in entreprise to avoid what I call "email trash for all" syndrom, i.e using your email box as the only "last generation" communications mediums (I do not take in account phone in this category), which leads to too many email boxes with hundreds emails a day...

Some characteristics of communications mediums

I see 3 main characteristics of communications mediums. I do not take them from reading, just from situation analysis, so it must be incomplete. They are important to define in order to analyse how to use which communications medium for which purpose:

  • Delay between messages of a communication
    • Synchronous: the most interactive way, quick message exchanges (ex: phone, face to face conversation)
    • Asynchronous: there is different level of latency in the exchange, from seconds (ex: chat) to months or years (ex: documents that persist...)
  • Basic characteristics
    • Presence: perception of people reactions and feelings, possibility to share concrete material (for example goods, paper documents or board)
    • Sight: perception of some people reactions, possibility to share visual aid
    • Speech: perception of some people reactions, limited expression if you have not sight
    • Dynamic visual aid: people can interactively exchange through it, with two distinct types
      • Free to make any representation (text, graph, diagram, drawing...)
      • Constrained to some representation
    • Static visual aid: people can only exchange asynchronously on it
  • Types of organisation
    • Presentation: very directive, poor interactivity (ex: lecture...)
    • Interactive presentation: restricted number of participants, directed by a leader but more interactive, self-censorship because of the group and given direction by leader (ex: committee, meeting, class...)
    • Group discussion: directed by the group, even more interactive, less self-censorship since there is no imposed direction (ex: workshop, open session...)
    • Face to face: (ex: with your manager, with someone of your staff, interview...)

Given these definitions, I can try to explain why and how communication must not be reduced to meeting, phone and email, especially in entreprise world. Moreover, about meeting, they need more formality and simplicity.

About delay between messages in a communication
, meeting and phone are good mediums for synchronous communications, but email cannot be the only medium for all asynchronous communications! First, because the purpose is too much different between an instant communication and an entreprise directive to be followed for example. Second, because our email boxes are exploding, and I do not believe that search and incoming email rules could be enough to bypass the problem (even if, of course, it is a good practice to use it!)

About basic characteristics, meeting, phone and email combine all of these. However, nowadays, there are more and more distributed teams, and more and more interactions, so these three "old" mediums have to complemented. Solutions exist, just have to implement and distribute it.

About types of organisation, there are all used more or less depending on people involved and on corporate culture. I think there is nothing really new about that. But, what is interesting is to see how they are used, for example: how is a meeting prepared? how are meeting minutes spread? how actions are tracked? And for that, I think we can win in simplicity with new mediums.

Now it's time to see how to implement these principles with real tools. I will propose this in a future post mainly around Microsoft products.

Saturday, February 13, 2010

My technological playground...

Well, it has been a long time since my last published fact, I got several post waiting to be finalized...about application architecture, conception and communication.

Waiting for these post to be published, I would like to blog on the last evolution of my "technological playground".

My technological playground
For a little more than 5 years, I have done technological survey through web review, beta software test, community frameworks discovery...and I always consider this activity as a necessity to leverage my competencies.

For 2 years, I also maintain my own personal web site, using last Microsoft technology. It is a good way to dig some technologies (even if sometimes my wife complains of instability of our site...).

And now, for 1 year, I got a MSDN licence with Visual Studio Team Developer. With it, I can make tests environment. Now, I plan to build several virtual tests environments.

So today my technological playground is made of:
I am not on Twitter yet...but wondering, I see Google Buzz coming out or just Comment Sharing on Google Reader.

My virtual tests environments
I used to have a robust computer but a little undersized to be used as an efficient playground...but it was enough for the minimum. Now I reach a point where I need a little more powerful environment.

So I buy a new laptop, briefly Asus UL80vt boosted with an Intel Postville SSD drive, using hard drive in an external USB box for VMs as well as two hot USB keys (16Go Corsair Flash Voyager GT). Work well, great autonomy and powerfull...just a deception : I haven't an eSATA port, I have to rely only on USB...what a shame. But it is just what I need to support my plans.

So with this configuration, I can run several virtual machines given the 4Go RAM and 64bits host OS. For now, I am using VMWare Player as virtual hosting environment (mainly because Virtual PC does not support 64bits guests).

VMs allow me to separate tests. For now, for instance, I got the following VMs:
  • Windows Server 2008 with TFS2010 Beta2 (I need to upgrade to just released RC I know...)
  • Windows 7 with VS2010 Beta2
  • Windows 7 with VS2008
To build these VMs, I always keep a clean copy of each OS VM with base software I am used to. It is a little bit as if I do snapshot with VMWare Workstation.
Moreover, I track what I installed on each VMs (software version) in an Excel sheet.

My Google Reader & Delicious accounts
I use it to track RSS feeds on the web. There are mainly of three types:
I use my Share Items to share news. I prefer Delicious to bookmark and share my favorite web pages. On Delicious, I can better and simpler organize bookmarks through tags.

Participating in community
That the part I discovered last year with Alt.Net Paris community starting. It is the best place to learn and share with maximum interactivity. You learn a lot from others experiences, you meet some great people with rich experience.
Definitively a great experience!! Come to join us.

And finally this blog
I started this blog one year ago, and I experience difficulty to post regularly...I try my best and hope I will improve.