<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Tech blog</title><link>http://www.robychechi.it:80/roby/</link><description>Tech blog</description><item><title>ElmahR is dead, long live RElmah!</title><link>http://www.robychechi.it:80/roby/elmahr-is-dead-long-live-relmah</link><description>&lt;p&gt;
	&lt;a href="http://elmahr.apphb.com"&gt;ElmahR&lt;/a&gt; is my pet project, although I must say so far &lt;a href="http://www.nuget.org/packages?q=elmahr"&gt;it&amp;#39;s been much more successful than expected&lt;/a&gt;. It was really born as a playground to test and learn some new stuff, but it caught momentum, and it even received some contributions. It has about 30 forks on Bitbucket, and a few collateral projects using it or modding it have popped up. I&amp;#39;m pretty happy with all that!&lt;/p&gt;
&lt;p&gt;
	But... It started more than two years ago, and the way I built it while experimenting new things made it grow in a way which wasn&amp;#39;t really following a plan. I tried to keep it tidy and simple, but honestly there are portions of the code which are not as clean as I&amp;#39;d like, and they would need some major rethinking. Also, several of the features that I pushed into it are not actually so useful, so why keep them? And finally, the world has been running fast, delivering new libraries, or new versions of existing ones, at a very high pace which I was not really able to cope with. SignalR is the main issue here, ElmahR is still using v1.x, and moving to v2.x would be a breaking change. Furthermore, the task of &lt;a href="http://www.robychechi.it/roby/signalr-cookbook-ready-and-available-on-stores"&gt;writing a book&lt;/a&gt; did not really help with all that...&lt;/p&gt;
&lt;p&gt;
	While I really want to keep ElmahR alive and actual, on the other hand the codebase really needs a lot to reorg to enable easy maintenance and addition of new needed features. There&amp;#39;s no way I can do that while keeping backward compatibility and avoiding getting crazy...&lt;/p&gt;
&lt;p&gt;
	So, I really see only one way to move forward: a reboot! And to make it clear that it&amp;#39;s a real restart, I decided to rename it! It&amp;#39;s a drastic decision, I love the ElmahR name and I&amp;#39;ll miss it. Also, there&amp;#39;s a concrete risk of loosing users with this move, and I&amp;#39;ll try my best to prevent this from happening. But I think the reasons for doing such a move are stronger than the potential drawbacks. So be it: from ElmahR to &lt;strong&gt;RElmah&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;
	Why &lt;strong&gt;RElmah&lt;/strong&gt;?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		It&amp;#39;s a big reset, without backward compatibility, so I need to make that disconnect very clear. I do not want people to assume that a Nuget package update will automagically fix things...&lt;/li&gt;
	&lt;li&gt;
		It&amp;#39;s a full redesign, which several concepts going away and several others added.&lt;/li&gt;
	&lt;li&gt;
		The name &amp;quot;ElmahR&amp;quot; was trying to express how the project was born (ElmahR = ELMAH + SignalR), whereas &lt;strong&gt;RElmah&lt;/strong&gt; stands for &amp;quot;Reactive ELMAH&amp;quot;, and it&amp;#39;s putting the focus on the Reactive spirit this new version is willing to embrace.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	So, I officially announce that the project is taking this direction, and in the next few months &lt;strong&gt;RElmah&lt;/strong&gt; will gradually become available. The main features of this new project will be:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="https://github.com/"&gt;Github&lt;/a&gt;: ElmahR is on &lt;a href="https://bitbucket.org/wasp/elmahr/overview"&gt;Bitbucket&lt;/a&gt; and I&amp;#39;m very happy with it, but I want to check if the Github community can bring more help to the project than it happened there&lt;/li&gt;
	&lt;li&gt;
		It will still be based on &lt;a href="https://code.google.com/p/elmah/"&gt;ELMAH&lt;/a&gt; and &lt;a href="http://www.asp.net/signalr"&gt;SignalR&lt;/a&gt; (v2), of course, but also on &lt;a href="http://owin.org/"&gt;Owin&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/data/gg577609.aspx"&gt;Rx&lt;/a&gt; on the server, and probably on &lt;a href="http://requirejs.org/"&gt;RequireJS&lt;/a&gt; on the client&lt;/li&gt;
	&lt;li&gt;
		The code base will be simpler, streamlined, with fewer but stronger features: less is more :) Among them we&amp;#39;ll have:
		&lt;ul&gt;
			&lt;li&gt;
				application groups&lt;/li&gt;
			&lt;li&gt;
				users per application group&lt;/li&gt;
			&lt;li&gt;
				better organized server side, with a clean separation between the portion serving dashboard clients and a new &amp;quot;admin&amp;quot; one&lt;/li&gt;
			&lt;li&gt;
				more fine grained configuration, with a better way to make it &amp;quot;live&amp;quot; and not just from web.config&lt;/li&gt;
			&lt;li&gt;
				independent js client, cross domain&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;
		The dashboard will be redesigned on top of &lt;a href="http://getbootstrap.com/"&gt;Bootstrap 3&lt;/a&gt;. I might switch from &lt;a href="http://knockoutjs.com/"&gt;Knockout&lt;/a&gt; to &lt;a href="https://angularjs.org/"&gt;AngularJS&lt;/a&gt;, but I&amp;#39;m not yet sure about that either&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Ok, this is the plan, in the next few days I&amp;#39;ll do a few early experiments before actually starting pushing stuff in its &lt;a href="https://github.com/wasphub/RElmah"&gt;new repo&lt;/a&gt;. Stay tuned!&lt;/p&gt;
</description><pubDate>Tue, 10 Apr 2018 17:53:47 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-is-dead-long-live-relmah</guid></item><item><title>SignalR Real-time Application Cookbook ready and available on stores!</title><link>http://www.robychechi.it:80/roby/signalr-cookbook-ready-and-available-on-stores</link><description>&lt;p&gt;
	I&amp;#39;ve been quite silent lately, but I really needed to use all my spare time for my last adventure: &lt;a href="new-adventure-writing-a-book-about-signalr"&gt;writing a technical book about Signalr&lt;/a&gt;! Well, the adventure is over and the book is now available on both the &lt;a href="http://www.packtpub.com/signalr-real-time-application-cookbook/book"&gt;Packt online store&lt;/a&gt; and on &lt;a href="http://www.amazon.com/SignalR-Real-time-Application-Cookbook-Roberto/dp/1783285958/ref=sr_1_3?ie=UTF8&amp;amp;qid=1398281697&amp;amp;sr=8-3&amp;amp;keywords=signalr"&gt;Amazon&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
	It&amp;#39;s been a very interesting experience, from which I learned a lot about how tough writing a book is :) And I also improved a lot my knowledge about SignalR itself.&lt;/p&gt;
&lt;p&gt;
	I just want to thank Packt for the opportunity and their support through the whole process, and all the reviewers who helped me improving the content.&lt;/p&gt;
&lt;p&gt;
	Now, some rest and then back to work. Next adventure? Probably ElmahR 2.0 :) And for sure I&amp;#39;ll try to write more here, I&amp;#39;ve been neglecting this blog quite a lot lately...&lt;/p&gt;
</description><pubDate>Wed, 23 Apr 2014 19:45:06 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/signalr-cookbook-ready-and-available-on-stores</guid></item><item><title>New adventure: writing a book about SignalR!</title><link>http://www.robychechi.it:80/roby/new-adventure-writing-a-book-about-signalr</link><description>&lt;p&gt;
	After almost 2 years dedicating my spare time to &lt;a href="http://elmahr.apphb.com/"&gt;ElmahR&lt;/a&gt;, now I&amp;#39;m giving it some rest while thinking about how to accommodate in a hypothetical v2.0 new ideas I have and &lt;a href="https://bitbucket.org/wasp/elmahr/issues?status=new&amp;amp;status=open"&gt;new suggestions I received&lt;/a&gt;. In the meantime, I started a new adventure for the next few months: I&amp;#39;m writing a book about &lt;a href="http://signalr.net/"&gt;SignalR&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;
	It&amp;#39;s an interesting opportunity that &lt;a href="http://www.packtpub.com/"&gt;PacktPub&lt;/a&gt; offered me, I never wrote a book before but I thought it could be a nice challenge. The book itself will be a relatively easy one to write, it&amp;#39;s not about how SignalR works and its architecture, or about esoteric usage scenarios, it&amp;#39;s a &lt;em&gt;cookbook&lt;/em&gt;, a set of readymade &lt;em&gt;recipes&lt;/em&gt; that readers will be able to apply with a small effort in order to tackle specific problems. This kind of content should fit both my limited spoken English and my SignalR knowledge, which is quite extensive (it&amp;#39;s one if the pillars for ElmahR) but maybe not too &amp;quot;hardcore&amp;quot;.&lt;/p&gt;
&lt;p&gt;
	I&amp;#39;m already targeting SignalR 2.0, so this will give me an opportunity to update my knowledge to the latest release.&lt;/p&gt;
&lt;p&gt;
	It will be fun, and I&amp;#39;ll do my best to produce a book which delivers what it promises to.&lt;/p&gt;
</description><pubDate>Sat, 19 Oct 2013 09:35:29 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/new-adventure-writing-a-book-about-signalr</guid></item><item><title>ElmahR 1.1.5, ready for Azure!</title><link>http://www.robychechi.it:80/roby/elmahr-1.1.5-ready-for-azure</link><description>&lt;p&gt;
	Thanks to a notification I received &lt;a href="https://bitbucket.org/wasp/elmahr/issue/65/elmahr-dashboard-deploy-to-azure-website"&gt;here&lt;/a&gt;, I discovered that &lt;a href="http://elmahr.apphb.com/"&gt;ElmahR&lt;/a&gt; was not behaving well on Azure, Actually the problem is a little bit fuzzy, and it has to do with the exact sequence used to initialize SignalR bits, but anyway I found some detail about the problem and, after tweaking a bit the way ElmahR bootstrap, I was able to &lt;a href="https://bitbucket.org/wasp/elmahr/commits/all"&gt;patch it&lt;/a&gt; and deploy a new &lt;a href="https://www.nuget.org/packages/ElmahR.Core/1.1.5"&gt;1.1.5&lt;/a&gt; version on Nuget.&lt;/p&gt;
&lt;p&gt;
	Go and get it :)&lt;/p&gt;
</description><pubDate>Tue, 08 Oct 2013 17:29:05 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-1.1.5-ready-for-azure</guid></item><item><title>ElmahR status, a new feature is enabling an interesting scenario</title><link>http://www.robychechi.it:80/roby/elmahr-status-a-new-feature-is-enabling-an-interesting-scenario</link><description>&lt;p&gt;
	During the last few months I took a break from &lt;strong&gt;ElmahR&lt;/strong&gt;, and I did not add any big new feature. I did some bug fixing and I added little things, but the last one I introduced in &lt;a href="http://www.nuget.org/packages/ElmahR.Core/"&gt;1.1.0&lt;/a&gt; is actually interesting, so I decided to talk a little bit about it.&lt;/p&gt;
&lt;p&gt;
	It&amp;#39;s been inspired by &lt;a href="https://bitbucket.org/wasp/elmahr/issue/60/registering-new-client-with-elmahrs-hubs"&gt;a feature request&lt;/a&gt; I received, and the resulting scenario is about connecting to an ElmahR dashboard which does not live under the same domain of the client code. The problem behind this is a &lt;a href="http://en.wikipedia.org/wiki/Same-origin_policy"&gt;well known one&lt;/a&gt;, and SignalR already handles it in a easy way to exploit. The problem with &lt;strong&gt;ElmahR&lt;/strong&gt; was that I wasn&amp;#39;t exposing that feature, but now with 1.1.0 you can specify if you want to enable cross domain requests by simply supplying a &lt;code&gt;true&lt;/code&gt; value to the &lt;code&gt;Bootstrapper.PreBootstrap()&lt;/code&gt; method, which must be called to startup the dashboard and it&amp;#39;s usually called from the &lt;code&gt;ElmahR.Core.cs&lt;/code&gt; file placed in the &lt;code&gt;App_Start&lt;/code&gt; folder by the Nuget package.&lt;/p&gt;
&lt;p&gt;
	With that support in place, it become fairly easy to connect the client-side &lt;strong&gt;ElmahR&lt;/strong&gt; Javascript library to a dashboard living under a different domain. If you check out the &lt;strong&gt;ElmahR&lt;/strong&gt; &lt;a href="https://bitbucket.org/wasp/elmahr/wiki/Home"&gt;repository&lt;/a&gt;, you will find a new simple test web site called CORS, and the &lt;a href="https://bitbucket.org/wasp/elmahr/src/e59c189d7c9033d3499841a454c58b168f64aee8/src/temp/CORS/index.html?at=default"&gt;index.html&lt;/a&gt; page there will illustrate you how easily you can configure the library. The process is quite simple:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		configure the dashboard paths as it&amp;#39;s done in the &lt;a href="https://bitbucket.org/wasp/elmahr/src/e59c189d7c9033d3499841a454c58b168f64aee8/src/temp/CORS/index.html?at=default"&gt;index.html&lt;/a&gt; sample, of course using your specific dashboard address&lt;/li&gt;
	&lt;li&gt;
		call &lt;code&gt;registerBuilder&lt;/code&gt;, which expects an object defining method which extend the &lt;code&gt;elmahr&lt;/code&gt; global object; for example, if you want to receive errors notifications you&amp;#39;ll need to redefine the &lt;code&gt;notifyErrors&lt;/code&gt; callback; the code in index.html should be quite self explanatory&lt;/li&gt;
	&lt;li&gt;
		the new callback will be called at the right moment and each time you&amp;#39;ll receive an array of errors which you&amp;#39;ll be able to examine and manipulate&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Everything described must be done when the DOM is ready. You can see which events are available on the client library looking at the source code &lt;a href="https://bitbucket.org/wasp/elmahr/src/e59c189d7c9033d3499841a454c58b168f64aee8/src/ElmahR.Core/Scripts/ElmahR/elmahr.core.js?at=default#cl-283"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
	Finally, you might have noticed that the &lt;code&gt;notifyErrors&lt;/code&gt; callback is defined with an object containing a member called &lt;code&gt;replacer&lt;/code&gt;, this way we&amp;#39;re instructing the &lt;code&gt;elmahr&lt;/code&gt; object to remove the default callback and use this new one. If you prefer, you can keep the default callback and just append yours, in this case it is enough to specify your callback directly as the value for the &lt;code&gt;notifyErrors&lt;/code&gt; member of the &lt;code&gt;callbacks&lt;/code&gt; object, without any intermediate object.&lt;/p&gt;
&lt;p&gt;
	On the &lt;a href="http://bitbucket.org/wasp/elmahr/issues?status=new&amp;amp;status=open"&gt;issue tracker&lt;/a&gt; there are a few more interesting suggestions, I&amp;#39;m currently thinking about them and I might do some work to implement them in the next few weeks.&lt;/p&gt;
</description><pubDate>Wed, 28 Aug 2013 19:58:18 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-status-a-new-feature-is-enabling-an-interesting-scenario</guid></item><item><title>ElmahR 1.0!</title><link>http://www.robychechi.it:80/roby/elmahr-1.0</link><description>&lt;p&gt;
	Three months after my last port, this one is to announce that &lt;strong&gt;ElmahR&lt;/strong&gt; has reached version 1.0! Last time I was not expecting such a long time to finish the latest &amp;quot;details&amp;quot;, but some feedback I received (like &lt;a href="http://ben.onfabrik.com/posts/centralized-logging-and-diagnostics-with-elmah-and-nlog" target="_blank"&gt;this one&lt;/a&gt;) made me realized that I was still missing more modularity, and that has not been so easy to achieve. I had to deeply reorganize a lot of things in order to separate different concerns not only from a code perspective (that part was already fairly ok), but also from a packaging one. It&amp;#39;s been though, but I&amp;#39;m very happy about what I achieved, and this allowed me to produce a set of new &lt;a href="https://nuget.org/packages?q=elmahr" target="_blank"&gt;Nuget packages&lt;/a&gt; from which you can built a full &lt;strong&gt;ElmahR&lt;/strong&gt; dashboard from scratch in Visual Studio, or add it to any existing monitoring application yo might have in place.&lt;/p&gt;
&lt;p&gt;
	The &lt;strong&gt;ElmahR.Elmah&lt;/strong&gt; package was already available, and was making easy to hook an existing application to a dashboard instance, but now we have several more to build a dashboard:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR.Core&lt;/strong&gt;: this is the foundation of the dashboard, where posted errors are handled, associated to applications and broadcast to client, where all the necessary abstraction and related default implementations, are introduced, and where a basic &lt;em&gt;streaming log&lt;/em&gt; page is deployed&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR.Modules.Dashboard&lt;/strong&gt;: this modules works on top of &lt;strong&gt;ElmahR.Core&lt;/strong&gt; and add the full fledged &lt;em&gt;SPA&lt;/em&gt; (Single Page Application) dashboard page I&amp;#39;ve been working on since the beginning of the project&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR.Persistence.*&lt;/strong&gt;: while &lt;strong&gt;ElmahR.Core&lt;/strong&gt; by default keeps errors in memory without storing them anywhere, these modules let you persist errors on several different durable support&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR.IoC.&lt;/strong&gt;&lt;em&gt;: the main module &lt;strong&gt;ElmahR.Core&lt;/strong&gt; embeds an *IoC container&lt;/em&gt; (thanks to &lt;em&gt;&lt;a href="https://github.com/grumpydev/TinyIoC" target="_blank"&gt;TinyIoC&lt;/a&gt;&lt;/em&gt;)to make dependencies resolution management easier and to integrate it with &lt;em&gt;&lt;a href="http://signalr.net/" target="_blank"&gt;SignalR&lt;/a&gt;&lt;/em&gt; &lt;code&gt;DepandencyResolver&lt;/code&gt;, this set of modules (so far there&amp;#39;s only one implementation for &lt;em&gt;&lt;a href="http://www.ninject.org/" target="_blank"&gt;NInject&lt;/a&gt;&lt;/em&gt;) will allow you to have more integration with your favorite container you might be using already&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	I also took advantage of this step to update &lt;strong&gt;ElmahR&lt;/strong&gt; dependencies to the latest available versions, including the amazing official release of &lt;em&gt;SignalR&lt;/em&gt;!&lt;/p&gt;
&lt;p&gt;
	During the next days I&amp;#39;ll try to write a few more blog posts about some (hopefully) interesting details, in any case I did a lot of work on the &lt;a href="https://bitbucket.org/wasp/elmahr/wiki/Home" target="_blank"&gt;documentation&lt;/a&gt;, you can check it to understand how &lt;strong&gt;ElmahR&lt;/strong&gt; works and for most of the configuration cases.&lt;/p&gt;
&lt;p&gt;
	I&amp;#39;m very excited about this release, and now I&amp;#39;ll hopefully take some rest, I&amp;#39;ll keep on working on the project in order to fix bugs that might come up, and I&amp;#39;ll be thinking about how to make it evolve in useful and interesting directions. I&amp;#39;d really want to thank a all the people who supported me with their feedback or concrete contributions, in particular &lt;a href="http://www.raboof.com/" target="_blank"&gt;Atif&lt;/a&gt;, the author of &lt;a href="https://code.google.com/p/elmah/" target="_blank"&gt;ELMAH&lt;/a&gt;, who I had the pleasure to work with and who supported me a lot especially at the beginning of the project, &lt;a href="http://weblogs.asp.net/davidfowler/" target="_blank"&gt;David&lt;/a&gt;, &amp;quot;SignalR man&amp;quot;, and then &lt;a href="http://gregorsuttie.com/" target="_blank"&gt;Gregor&lt;/a&gt;, &lt;a href="https://twitter.com/nportelli" target="_blank"&gt;Nick&lt;/a&gt;, &lt;a href="http://ben.onfabrik.com/" target="_blank"&gt;Ben&lt;/a&gt;, &lt;a href="http://www.linkedin.com/in/carlossardo" target="_blank"&gt;Carlos&lt;/a&gt;, and my wife :)&lt;/p&gt;
&lt;p&gt;
	As usual, yo can give it a try &lt;a href="http://elmahr.apphb.com/" target="_blank"&gt;here&lt;/a&gt; and check the source code on &lt;a href="https://bitbucket.org/wasp/elmahr" target="_blank"&gt;the repo&lt;/a&gt;.&lt;/p&gt;
</description><pubDate>Sun, 24 Mar 2013 17:56:52 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-1.0</guid></item><item><title>The resultor pattern</title><link>http://www.robychechi.it:80/roby/the-resultor-pattern</link><description>&lt;p&gt;
	In this short post belonging to &lt;a href="http://www.robychechi.it/roby/Tags/extending%20the%20world" target="_blank"&gt;the series about extending the world of Linq&lt;/a&gt;, I&amp;#39;ll talk about an interesting way to leverage anonymous types through a pattern we use at work. We all know what they are, and we all know their most important limitation: once defined, an anonymous type cannot be passed to other functions or returned to the caller of the function which defined it (we are talking about language features, and we don&amp;#39;t consider any technique based on reflection or other knowledge about the runtime internal structure of such types). It is quite common to write functions which return complex values, and if we want to make them reusable we need at some point to define some structure representing the result of the computation. We could use tuples, but they are not that good at communicating information, so we must surrender and define small DTOs just to represent those answers, just because anonymous type cannot cross the boundaries of a function. But is that completely true?&lt;/p&gt;
&lt;p&gt;
	Let&amp;#39;s suppose we need a function which parses string, and for each one we want to return a set of values. We could write something like this:&lt;/p&gt;
&lt;pre class="brush:csharp"&gt;
public static IEnumerable&amp;lt;DTO&amp;gt; Parse(
    this IEnumerable&amp;lt;string&amp;gt; source, 
    int someParam, string someOtherParam)
{
    return from item in source
           select new DTO
           {
               First  = item,
	       Second = item.Length,
	       Third  = new DateTime(2012, 1, 1),
	       Fourth = 42
           };
}

public class DTO
{
    public string   First   { get; set; }    
    public int      Second  { get; set; }    
    public DateTime Third   { get; set; }    
    public decimal  Fourth  { get; set; }    
}
&lt;/pre&gt;
&lt;p&gt;
	The body of the &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function is doing some stupid calculations, but that&amp;#39;s not the point, what I want to show here is that for even for simple cases like this one we need to define a special class (&lt;span style="font-family:courier new,courier,monospace;"&gt;DTO&lt;/span&gt;) just for the sake of returning four values for each parsed string. It feels like a &amp;quot;waste&amp;quot; of power. We need to define some static type to return our answers. And even more disturbing, it often happens that the caller does not really need all the values that we are returning, but just some of them.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	But there is a way out. Type inference helps us to put a &amp;#39;trick&amp;#39; in place and make anonymous types cross the function boundary. Let&amp;#39;s look at our &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function: each time it parses a string it &amp;#39;calculates&amp;#39; 4 values and it packs them in our &lt;span style="font-family:courier new,courier,monospace;"&gt;DTO&lt;/span&gt; to return them to the caller, but we could slightly change the point of view and say that the &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function calculates those values and &amp;#39;passes&amp;#39; them to the caller. This subtle change makes us think that we could do what we always do in such cases: call a function.&lt;/p&gt;
&lt;p&gt;
	Let&amp;#39;s change our &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function signature like this:&lt;/p&gt;
&lt;pre class="brush:csharp"&gt;
public static IEnumerable&amp;lt;T&amp;gt; Parse&amp;lt;T&amp;gt;(
    this IEnumerable&amp;lt;string&amp;gt; source, 
    int someParam, string someOtherParam, 
    Func&amp;lt;string, int, DateTime, decimal, T&amp;gt; resultor)&lt;/pre&gt;
&lt;p&gt;
	In this new version we changed 2 things:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		the return values is not an enumeration of &lt;span style="font-family:courier new,courier,monospace;"&gt;DTO&lt;/span&gt;s (or whatever well-defined type), but &lt;span style="font-family:courier new,courier,monospace;"&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		the same &lt;span style="font-family:courier new,courier,monospace;"&gt;T&lt;/span&gt; appears as part of the type of a new parameter we added to the already existing ones: this new parameter (a callback) is declared as a &lt;span style="font-family:courier new,courier,monospace;"&gt;Func&amp;lt;...&amp;gt;&lt;/span&gt; with N+1 type parameters, where the first N types are the same types of the properties in the original &lt;span style="font-family:courier new,courier,monospace;"&gt;DTO&lt;/span&gt;, and the last type parameter is &lt;span style="font-family:courier new,courier,monospace;"&gt;T&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	This &amp;#39;strange&amp;#39; signature is in fact very handy, and thanks to type inference we can modify our test call like this:&lt;/p&gt;
&lt;pre class="brush:csharp"&gt;
var parsed = from p in items.Parse(0, &amp;quot;wasp&amp;quot;, 
                 (first, second, third, fourth) =&amp;gt; new
                 {
                     First  = first,
                     Second = second,
                     Third  = third,
                     Fourth = fourth
                 })
             where p.First
                    .Equals(&amp;quot;a&amp;quot;, 
                            StringComparison.OrdinalIgnoreCase)
             select p;
&lt;/pre&gt;
&lt;p&gt;
	The lambda expression we pass as the last parameter in the call defines an anonymous type, which thanks to type inference becomes the &lt;span style="font-family:courier new,courier,monospace;"&gt;T&lt;/span&gt; of the generic &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function. The complete body of &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function could therefore be something like this:&lt;/p&gt;
&lt;pre class="brush:csharp"&gt;
public static IEnumerable&amp;lt;T&amp;gt; Parse&amp;lt;T&amp;gt;(
    this IEnumerable&amp;lt;string&amp;gt; source, 
    int someParam, string someOtherParam, 
    Func&amp;lt;string, int, DateTime, decimal, T&amp;gt; resultor)
{
    return from item in source 
	   select resultor 
           ( 
               item, 
               item.Length,
               new DateTime(2012, 1, 1), 
               42 
           ); 
}&lt;/pre&gt;
&lt;p&gt;
	It&amp;#39;s very similar to the original version, but the &lt;span style="font-family:courier new,courier,monospace;"&gt;new DTO()&lt;/span&gt;&amp;nbsp;part has been replaced to a function call to the supplied &lt;span style="font-family:courier new,courier,monospace;"&gt;Func&amp;lt;...&amp;gt;&lt;/span&gt; delegate, which is called &lt;span style="font-family:courier new,courier,monospace;"&gt;resultor&lt;/span&gt;. So we now have moved the responsibility of creating a representation of our &amp;#39;answer&amp;#39; outside of the &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; function, which now just calls someone capable of building such a representation. Thanks to type inference we can define the builder on the fly through a lambda, and use an anonymous type to contain the representation. We don&amp;#39;t need the &lt;span style="font-family:courier new,courier,monospace;"&gt;DTO&lt;/span&gt; class anymore, and one more advantage that we gain now is that we can easily handle cases where we are not interested in all the components of an answer. If for instance we just want to deal with the first and the fourth value, we can call &lt;span style="font-family:courier new,courier,monospace;"&gt;Parse&lt;/span&gt; like this:&lt;/p&gt;
&lt;pre class="brush:csharp"&gt;
var parsed = from p in items.Parse(0, &amp;quot;wasp&amp;quot;, 
                 (p1, _, ___, p2) =&amp;gt; new
                 {
                     This  = p1,
                     That = p2
                 })
             where p.This
                    .Equals(&amp;quot;a&amp;quot;,
                            StringComparison.OrdinalIgnoreCase)
             select p;
&lt;/pre&gt;
&lt;p&gt;
	I learned about this &lt;a href="http://www.raboof.com" target="_blank"&gt;at work&lt;/a&gt;, and there we name it the &lt;strong&gt;resultor pattern&lt;/strong&gt;. So far I did not find anything around describing this technique explicily, Bill Wagner in one of his books talks about something similar but in a more basic way. It adds one more piece to our toolbox which helps us move our coding more &amp;#39;into Linq&amp;#39;. It could be used in other contexts too, but it really shines inside Linq queries.&lt;/p&gt;
</description><pubDate>Thu, 21 Mar 2013 05:00:24 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/the-resultor-pattern</guid></item><item><title>ElmahR 1.0? Almost there!</title><link>http://www.robychechi.it:80/roby/elmahr-1.0-almost-there</link><description>&lt;p&gt;
	It&amp;#39;s been &lt;a href="http://www.robychechi.it/roby/tech-blog/elmah-signalr-elmahr"&gt;almost one year&lt;/a&gt; since I started &lt;a href="https://bitbucket.org/wasp/elmahr"&gt;ElmahR&lt;/a&gt;, and it&amp;#39;s been a long journey, with a lot of fun and learning: I added a lot of features, which are described &lt;a href="http://www.robychechi.it/roby/Tags/elmahr"&gt;in my blog posts about the project&lt;/a&gt;, and probably many others could be added, but I think I&amp;#39;m getting near to what I&amp;#39;ll release as version 1.0. In the last weeks I did some cleanup to the plugin system (which is not yet as good as I&amp;#39;d like, but it&amp;#39;s good enough for now), and I enabled some &amp;quot;startup&amp;quot; statistics which allowed me to send down to clients numbers that apply not only to the errors received since the connections, but to the whole errors history. This means that now both the numbers related to the errors grouped by type and the errors piechart reflect the whole persisted errors history, which I think is a more useful information.&lt;/p&gt;
&lt;p&gt;
	But what will bring me to do the move to the 1.0 release will be the &lt;a href="https://github.com/SignalR/SignalR"&gt;SignalR 1.0&lt;/a&gt; RTM (right now it is &lt;a href="https://github.com/SignalR/SignalR/blob/master/ReleaseNotes.md"&gt;1.0 RC1&lt;/a&gt;). I&amp;#39;m pretty excited about that and, as soon as SignalR will be officially released with the &lt;a href="http://weblogs.asp.net/scottgu/archive/2012/12/14/announcing-the-asp-net-and-web-tools-2012-2-release-candidate.aspx"&gt;ASP.NET and Web Tools 2012.2 update&lt;/a&gt; (this should happen in January) I&amp;#39;ll migrate ElmahR from SignalR 0.5.3, and when done I will align its version number. Can&amp;#39;t wait to do that! :)&lt;/p&gt;
&lt;p&gt;
	After that I think I&amp;#39;ll take break from development and I&amp;#39;ll spend more time in documenting it, I wrote a lot about it but &lt;a href="https://bitbucket.org/wasp/elmahr/wiki/Home"&gt;the &lt;em&gt;official&lt;/em&gt; documentation&lt;/a&gt; is not as much complete as I&amp;#39;d like. I will also try to write a new descriptive article about it, with the goal of updating the &lt;a href="http://www.codeproject.com/Articles/377394/ElmahR-equals-ELMAH-plus-SignalR"&gt;current one&lt;/a&gt; available in CodeProject.&lt;/p&gt;
&lt;p&gt;
	So, stay tuned for 1.0 :)&lt;/p&gt;
</description><pubDate>Wed, 19 Dec 2012 20:04:05 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-1.0-almost-there</guid></item><item><title>ElmahR current status</title><link>http://www.robychechi.it:80/roby/elmahr-current-status</link><description>&lt;p&gt;I've been quite silent about &lt;a href="http://elmahr.apphb.com/"&gt;ElmahR&lt;/a&gt; on my blog lately, but that was just because I was taking some more rest than I usually do, I needed it :) This does not mean I did not do anything on the project, actually I added at least 3 interesting new features.&lt;/p&gt;

&lt;h1&gt;Asynchronous persistence&lt;/h1&gt;

&lt;p&gt;Errors persitence has always been intended as something important, but in a way less crucial that the error notifications. I never wanted to have failures during persistence get into the way of notifications, causing hiccups on that side. In order to achieve that I already introduced improvements in the past about how I was handling error happening inside ElmahR itself, but that was not the only way persistence could interfere with notifications. The other way was because persistence was happening synchronously with notification, and that could cause some issues. Now persistence happens asynchronously, letting notifications go out as fast as possible.&lt;/p&gt;

&lt;h1&gt;MongoDB persistor&lt;/h1&gt;

&lt;p&gt;Errors persistence has always been an isolated piece, and it was possible to replace it with different implementations, but there were not many options. I had an "in memory" implementation, which was there mostly for development reasons and could no really be considered trustworthy, and the "official" one based on Entity Framework. I already talked about &lt;a href="http://www.robychechi.it/roby/tech-blog/elmahr-persistence-and-what-about-documentation"&gt;why I choose EF&lt;/a&gt;, and in general this was because it allowed me to easily and quickly cover persistence over relational databases. But it's true that ElmahR persistence suits pretty well to the usage of document-oriented databases, so as a proof of concept I build a MongDB persistor. If you use Mongo you are good to go and persist your errors there, while if you use a different "NoSql" database you will find the &lt;a href="https://bitbucket.org/wasp/elmahr/src/6444fe8648d40fbe6206eaeea4b8711f2e4d2014/src/ElmahR.Persistence.MongoDB/MongoDBPersistor.cs?at=default"&gt;MongoDBPersistor&lt;/a&gt; implementation quite useful to build your own for your target (and you might want to contribute it back when done ;) ). An implementation for RavenDB is on its way thanks to &lt;a href="https://twitter.com/#!/gsuttie"&gt;@gsuttie&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Error post encryption&lt;/h1&gt;

&lt;p&gt;Reacting to an &lt;a href="http://www.codeproject.com/Articles/377394/ElmahR-equals-ELMAH-plus-SignalR?msg=4422973#xx4422973xx"&gt;interesting comment&lt;/a&gt; by I received on CodeProject, I added optional encryption when the ErrorPostModule sends errors info to a dashboard. Now you can specify a shared secret on both the monitored application and the receiving dashboard, if you do so messages will be encrypted. To do so is as easy as doing the 2 following things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;adding a &lt;code&gt;secret&lt;/code&gt; attribute inside your &lt;code&gt;errorPost&lt;/code&gt; section from the &lt;code&gt;web.config&lt;/code&gt; of your monitored application&lt;/li&gt;
&lt;li&gt;adding a corresponding &lt;code&gt;secret&lt;/code&gt; attribute inside the matching &lt;code&gt;application&lt;/code&gt; section from the &lt;code&gt;web.config&lt;/code&gt; of your dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course both attributes will have the same value specified. The &lt;a href="http://nuget.org/packages/ElmahR.Elmah"&gt;Nuget package for the ElmahR.Elmah module&lt;/a&gt; has been updated to reflect this addition.&lt;/p&gt;

&lt;h1&gt;SignalR has gone 1.0 alpha&lt;/h1&gt;

&lt;p&gt;One last short thing about the fact that SignalR has reached the 1.0 alpha state, and &lt;a href="http://www.asp.net/vnext/overview/fall-2012-update/aspnet-fall-2012-update-release-notes"&gt;it will be released as an official ASP.NET piece in the next ASP.NET Fall Update&lt;/a&gt;. I already started keeping an eye on it, as soon as it will be in a stable and complete status ElmahR will be updated accordingly.&lt;/p&gt;
</description><pubDate>Sun, 11 Nov 2012 16:53:55 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-current-status</guid></item><item><title>ElmahR cleanup features</title><link>http://www.robychechi.it:80/roby/elmahr-cleanup-features</link><description>&lt;h1&gt;
	Latest additions&lt;/h1&gt;
&lt;p&gt;
	So, lately I&amp;#39;ve been working on features that improve the way &lt;a href="http://elmahr.apphb.com/" target="_blank" title="ElmahR demo"&gt;ElmahR&lt;/a&gt; help you in maintaining ElmahR itself healthy. Earlier &lt;a href="http://www.robychechi.it/roby/tech-blog/elmahr-low-level-logging" target="_blank" title="Low-level Logging"&gt;I improved the way it notifies about error happening in ElmahR itself&lt;/a&gt;, and lately I added a new feature that allows you to see how many historical errors have been recorded for each monitored app. It also let you clean up those error offering a set of &amp;#39;trash bin&amp;#39; buttons which give you a (hopefully) easy way to clear ranges of errors that are not interesting anymore. Each application box has a new icon like this:&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="Errors stats" src="http://elmahr.apphb.com/Content/Images/glyphicons_041_charts.png" title="Errors stats" /&gt;&lt;/p&gt;
&lt;p&gt;
	If you press it a popup window will appear, with all the details that I just described. It&amp;#39;s more easy to actually &lt;a href="http://elmahr.apphb.com/" target="_blank" title="ElmahR demo"&gt;try it&lt;/a&gt; than explaining it.&lt;/p&gt;
&lt;h1&gt;
	Future steps&lt;/h1&gt;
&lt;p&gt;
	I think that I will not add any particular new feature until I&amp;#39;ll decide to go to 1.0, I will just go back to do some clean up which is there in the queue since a while, expecially regarding javascript and css, but also around the persistence server side code. I will also wait for &lt;a href="https://github.com/SignalR/SignalR" target="_blank"&gt;SignalR&lt;/a&gt; to go 1.0 before going 1.0 myself, and I will also take my time to move the project to Visual Studio 2012. A lot of things to do yet, but mainly behind the scenes.&lt;/p&gt;
&lt;p&gt;
	Keep on polling the project for the latest bits, and if you are using it please let me know, any feedback is welcome!&lt;/p&gt;
</description><pubDate>Thu, 20 Sep 2012 15:40:02 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-cleanup-features</guid></item><item><title>ElmahR low-level logging</title><link>http://www.robychechi.it:80/roby/elmahr-low-level-logging</link><description>&lt;p&gt;
	Vacations are over, so I&amp;#39;m back working on &lt;a href="http://elmahr.apphb.com" title="ElmahR" target="_blank"&gt;ElmahR&lt;/a&gt;. In my &lt;a href="http://www.robychechi.it/roby/tech-blog/elmahr-0.9.1-is-out" target="_blank"&gt;previous post&lt;/a&gt; I already described what I&amp;#39;ve been doing to make ElmahR more robust, during the last weeks I&amp;#39;ve been going on developing those features. The most important feature I added is a new &amp;#39;way&amp;#39; to launch an ElmahR dashboard. If you specify a &lt;code&gt;log&lt;/code&gt; parameter on the query string, and you give it a &lt;em&gt;truthy&lt;/em&gt; value (&lt;code&gt;1&lt;/code&gt;, &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;yes&lt;/code&gt;), like this:&lt;/p&gt;
&lt;p&gt;
	&lt;a href="http://elmahr.apphb.com?log=1" title="ElmahR with low level log" target="_blank"&gt;http://elmahr.apphb.com?log=1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	ElmahR will add a log window on top of the dashboard, and there you will see low-level logging messages appearing live. These messages might originate on both client and server side of ElmahR, and give you a way to have a fine grained level of detail about what&amp;#39;s exactly happening in your setup. You could add ElmahR as an application feed as I explained the last time, and that&amp;#39;s a more clean way to handle problems in a stable way, but if you are experiencing some unexpected behavior, and especially if you&amp;#39;re just setting up your dashboard instance for the first time and things do not go smooth, this log can be very helpful in identifying what&amp;#39;s wrong.&lt;/p&gt;
&lt;p&gt;
	There are still a few things I want to add to ElmahR before considering &amp;#39;finished&amp;#39;, and I decided to publish them on a &lt;a href="https://www.pivotaltracker.com/projects/626709" title="Pivotal Tracker" target="_blank"&gt;Pivotal Tracker dashboard&lt;/a&gt;, so if you are interested in them just have a look. If you think there&amp;#39;s something that should be added and it&amp;#39;s not listed there, &lt;a href="https://bitbucket.org/wasp/elmahr/issues?status=new&amp;amp;status=open" target="_blank"&gt;open an issue on Bitbucket&lt;/a&gt;, or even better &lt;a href="https://bitbucket.org/wasp/elmahr/descendants" target="_blank"&gt;fork ElmahR, implement it and send a pull request&lt;/a&gt;, I&amp;#39;d be happy to discuss your ideas about it :)&lt;/p&gt;
</description><pubDate>Tue, 04 Sep 2012 20:03:29 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-low-level-logging</guid></item><item><title>ElmahR @ aspConf, it's been amazing!</title><link>http://www.robychechi.it:80/roby/elmahr-aspconf-it-s-been-amazing</link><description>&lt;p&gt;
	UPDATE: the recording of the session is now available on Channel9 &lt;a href="http://goo.gl/oRHIF" target="_blank"&gt;here&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;
	It&amp;#39;s been already one week, but yes, I did my session about &lt;a href="http://elmahr.apphb.com/" target="_blank"&gt;ElmahR&lt;/a&gt; @ &lt;a href="http://www.aspconf.net/" target="_blank"&gt;aspConf.net&lt;/a&gt;! I did not blog about it before because I really needed some rest, so every day since last week, after work, I&amp;#39;ve been just trying to relax and do some other stuff, but it&amp;#39;s really been an amazing experience. It was my first talk ever in a conference, and starting from such a big one made me a little bit nervous, but everything went smoothly, my english was not too bad and I managed to stay in time. I had the chance to rehearsal my session at the company where I work a couple of days before, and I received some great feedback that allowed me to fine tune the contents just before the big day. I think that the final result was ok, and attending the talk you can have a pretty good idea about what&amp;#39;s ElmahR and how it works. If you did not have any chance to attend it live and you&amp;#39;re interested in the project, very soon the recording of the talk will be available on &lt;a href="http://channel9.msdn.com/Events/aspConf/aspConf" target="_blank"&gt;Channel9&lt;/a&gt;!&amp;nbsp;They&amp;#39;re publishing the videos day by day, so ElmahR should pop up any time soon, and in general a lot of great material came out from the conference, so check the recordings out.&lt;/p&gt;
&lt;p&gt;
	It&amp;#39;s been tiring, much more than I was estimating when I decided to answer the call for presentation. It&amp;#39;s tough because you keep on fixing things and fine tuning the contents, it took me some time and I lost some sleep; but it&amp;#39;s very rewarding at the same time, I received very good feedback so far and I want to thank all the people that found the time to help or to let their impressions afterward. And of course I want to thank all the guys that organized such a great conference, and all the other speakers that made it possible, it&amp;#39;s been a pleasure to be part of it! :)&lt;/p&gt;
</description><pubDate>Tue, 04 Sep 2012 12:14:31 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-aspconf-it-s-been-amazing</guid></item><item><title>ElmahR 0.9.1 is out</title><link>http://www.robychechi.it:80/roby/elmahr-0.9.1-is-out</link><description>&lt;p&gt;
	I&amp;#39;m enjoying my vacations, and today I was having a nice, quiet and relaxing day at home, so at some point I said &amp;quot;there&amp;#39;s no better day than today to fix some &lt;a href="http://elmahr.apphb.com" target="_blank"&gt;ElmahR&lt;/a&gt; bugs&amp;quot; :)&lt;/p&gt;
&lt;p&gt;
	During the last few weeks I have been notified about &lt;a href="https://bitbucket.org/wasp/elmahr/issue/26/zip-download-not-working-on-64bit-systems" target="_blank"&gt;a couple&lt;/a&gt; of &lt;a href="http://stackoverflow.com/questions/11847911/elmahr-doesnt-load-properly-on-iis" target="_blank"&gt;problems&lt;/a&gt; with ElmahR, and at the same time I&amp;#39;ve been working on ElmahR internals to introduce some mechanisms to make it more robust and to give people an easier experience when installing it. ElmahR is doing quite good when dealing with errors from other applications, but it was still missing, for example, a good way to notify about errors happening inside ElmahR itself. You know, s**t can happen in any place, right? Let&amp;#39;s suppose, for example, that we have a problem with the database where ElmahR persists errors, if we do not handle that case the right way the risk is that external errors don&amp;#39;t reach the connected clients, and nobody will notice them. At the same time we had no easy way to know that such a problem occurred.&lt;/p&gt;
&lt;p&gt;
	In theory I could have treated ElmahR as an errors source like any other application, and have it posting errors to itself through &lt;a href="http://code.google.com/p/elmah/"&gt;ELMAH&lt;/a&gt; and the &lt;a href="https://bitbucket.org/wasp/elmahr/src/a5e65de53cb9/src/ElmahR.Elmah/ErrorPostModule.cs"&gt;ErrorPostModule&lt;/a&gt;, but that way it could have been easy to trigger infinite loops of errors. I needed something more directly targeting this kind of scenario, but at the same time the basic ELMAH strategy seemed to me the way to go: an HTTP module subscribing to the application-level Error event. That works quite fine when something happens during a regular HTTP request (i.e. when an error POST arrives), but it doesn&amp;#39;t when &lt;a href="https://github.com/SignalR/SignalR/" target="_blank"&gt;SignalR&lt;/a&gt; hubs are involved. At the time of this writing, &lt;a href="https://github.com/SignalR/SignalR/issues/147" target="_blank"&gt;SignalR swallows any unhandled exception coming out of a hub public method&lt;/a&gt;, and this makes impossible to centralize any&amp;nbsp;&lt;span style="font-family: Tahoma, 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; "&gt;management of&amp;nbsp;&lt;/span&gt;unhandled errors in an HTTP module. This problem &lt;a href="https://github.com/SignalR/SignalR/issues/548" target="_blank"&gt;will be solved in future versions&lt;/a&gt; of SignalR, so I decided to handle it with a &amp;#39;quick and dirty&amp;#39; approach while waiting for some nicer way to do it. I added some exception handling logic in every public method exposed by my main hub, and the same logic is available in an HTTP module called &lt;a href="https://bitbucket.org/wasp/elmahr/src/a5e65de53cb9/src/ElmahR.Core/ErrorTrapModule.cs" target="_blank"&gt;ErrorTrapModule&lt;/a&gt;, which you can add to your configuration if you want to track error during regular HTTP requests. The result of this logic is that errors happening inside ElmahR are treated like errors coming from an external app, and it is possible to associate them to a specific error feed. You will need to do 2 things to your &lt;code&gt;web.config&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		add an &lt;code&gt;application&lt;/code&gt; element inside your &lt;code&gt;elmahr&lt;/code&gt; section to represent the feed of errors happening inside ElmahR&lt;/li&gt;
	&lt;li&gt;
		add the &lt;code&gt;ErrorTrapModule&lt;/code&gt; to your HTTP modules&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	The result will be something like this:&lt;/p&gt;
&lt;pre class="brush:xml"&gt;
...
&amp;lt;elmahr&amp;gt;
  ...
  &amp;lt;application name=&amp;quot;Myself&amp;quot; sourceId=&amp;quot;###ElmahR###&amp;quot; 
                             boxColor=&amp;quot;boxColorElmahR&amp;quot; /&amp;gt;
&amp;lt;/elmahr&amp;gt;
&amp;lt;system.webServer&amp;gt;
  &amp;lt;modules runAllManagedModulesForAllRequests=&amp;quot;true&amp;quot;&amp;gt;
    &amp;lt;add name=&amp;quot;ErrorPost&amp;quot; 
         type=&amp;quot;ElmahR.Core.ErrorTrapModule, ElmahR.Core&amp;quot; /&amp;gt;
  &amp;lt;/modules&amp;gt;
&amp;lt;/system.webServer&amp;gt;
...
&lt;/pre&gt;
&lt;p&gt;
	It should be quite straightforward, we just have to pay attention to 2 small pieces:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;p&gt;
			the &lt;code&gt;sourceId&lt;/code&gt; value is a special one, its value is &lt;code&gt;###ElmahR###&lt;/code&gt;, and such a value allows ElmahR to understand that this is a feed for internal errors; this default value can be changed to any other string with an additional attribute to the &lt;code&gt;elmahr&lt;/code&gt; tag called &lt;code&gt;selfSourceId&lt;/code&gt;, like this:&lt;/p&gt;
		&lt;pre class="brush:xml"&gt;
...
&amp;lt;elmahr selfSourceId=&amp;quot;foo&amp;quot;&amp;gt;
  ...
  &amp;lt;application name=&amp;quot;Myself&amp;quot; sourceId=&amp;quot;foo&amp;quot; 
                             boxColor=&amp;quot;boxColorElmahR&amp;quot; /&amp;gt;
&amp;lt;/elmahr&amp;gt;
...
&lt;/pre&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;p&gt;
			the &lt;code&gt;boxColor&lt;/code&gt; attribute allows us to associate the box representing any feed with a specific CSS class, this way we can &lt;em&gt;highlight&lt;/em&gt; special boxes like this one with any ad-hoc styling&lt;/p&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	This strategy is already available in the source code repository, and it works quite fine. It can be improved, I&amp;#39;ll work on it, but it&amp;#39;s already quite helpful. Such a system would have helped to easily spot the cause of the error happening &lt;a href="https://bitbucket.org/wasp/elmahr/issue/26/zip-download-not-working-on-64bit-systems" target="_blank"&gt;in this first scenario&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
	I will also work some more on the client-side part of ElmahR, to make easier to solve problems when they happen there, but that&amp;#39;s where thing could become more hard to grasp, and where only deep testing can really give strong guarantees. &lt;a href="http://stackoverflow.com/questions/11847911/elmahr-doesnt-load-properly-on-iis" target="_blank"&gt;The second problem&lt;/a&gt; I was mentioning at the beginning of this post was actually caused by a couple of javascript problems. One of them was 100% my fault, and it&amp;#39;s fixed, but the other one was because of javascript inconsistencies across browser versions. During the last few weeks I honestly did not spend much time in testing ElmahR on IE7/8, but one of the latest addition to the project (the &lt;em&gt;plugins&lt;/em&gt; system) introduced a subtle bug happening only on those versions. Now it&amp;#39;s fixed, but this will work as a good reminder for me about always testing on all the browser versions I want to support. Automated client-side &amp;nbsp;testing will probably be one major step I will have to take soon.&lt;/p&gt;
&lt;p&gt;
	While I was working on these problems, I also decided to follow &lt;a href="https://twitter.com/GregRatner" target="_blank"&gt;@GregRatner&lt;/a&gt; advice, and now both &lt;a href="https://bitbucket.org/wasp/elmahr" target="_blank"&gt;the main solution&lt;/a&gt; and &lt;a href="https://bitbucket.org/wasp/elmahr/downloads/ElmahRSampleSetup.0.9.1.zip" target="_blank"&gt;the sample setup zip&lt;/a&gt; contain an MVC source application, which will allow me to keep the testing phase more complete, and it will work as a sample for anybody wanting to monitor MVC apps with ElmahR.&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;PS&lt;/strong&gt;: &lt;em&gt;the bug related to javascript issues was at first appearing to be related to a problem with IIS 7.5, so in order to reproduce the issue exactly as described I needed to test it under Windows 2008 R2. I downloaded a test VHD from Microsoft, but then I discovered that it was not possible to run such a virtual machine with Virtual PC on Windows 7. That&amp;#39;s where &lt;a href="http://ocpbbc.blogspot.ch/2012/04/run-windows-2008r2-vhd-under-vmware.html" target="_blank"&gt;this post&lt;/a&gt; became very useful :)&lt;/em&gt;&lt;/p&gt;
</description><pubDate>Fri, 17 Aug 2012 15:46:59 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-0.9.1-is-out</guid></item><item><title>Making ElmahR more rock solid</title><link>http://www.robychechi.it:80/roby/making-elmahr-more-rock-solid</link><description>&lt;p&gt;
	After the &lt;a href="http://www.aspconf.net/" target="_blank"&gt;aspConf&lt;/a&gt; session I slowed down a little bit because I needed some rest, and right now I&amp;#39;m having some vacation, so my work on &lt;a href="http://elmahr.apphb.com/" target="_blank"&gt;ElmahR&lt;/a&gt; is going on at a lower pace. As I mentioned in earlier posts and im my &lt;a href="http://channel9.msdn.com/Events/aspConf/aspConf/ElmahR-ELMAH-SignalR" target="_blank"&gt;aspConf session&lt;/a&gt;, ElmahR is growing but it still needs some work to make it more error proof. ElmahR is about errors happening on monitored applications, but errors can happen inside ElmahR itself, no? In the latest days I started working on this particular aspect, and soon an ElmahR dashboard will be able to treat errors happening on the dashboard itself. You might think that this is not a problem: why didn&amp;#39;t I just configure the dashboard to post errors to itself through ELMAH + ErrorPostModule? Well, that&amp;#39;s possible of course, but it&amp;#39;s also very easy to fall in cases where this scenario could generate endless loops of errors. Imagine you have a problem connecting to the database where errors are stored: when ElmahR receives a new error from a monitored source, it tries to store it and it fails, the error is intercepted, posted to ElmahR itself and received, then ElmahR will try to store this one too, and that will fail, and the loop starts again... &amp;nbsp;A different approach is needed, and I begun to work on it. I already released some bits of it, but soon after my short vacation I will review a couple of details to make it cleaner, and I&amp;#39;ll tell you more about the internals of this piece.&lt;/p&gt;
&lt;p&gt;
	Switch off! :)&lt;/p&gt;
</description><pubDate>Mon, 13 Aug 2012 09:56:36 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/making-elmahr-more-rock-solid</guid></item><item><title>Stuff about ElmahR</title><link>http://www.robychechi.it:80/roby/stuff-about-elmahr</link><description>&lt;p&gt;
	I decided to have a post about things happening around ElmahR. Lately people around blogged or talked about it, and those interactions are, or have been, available on the web, here I&amp;#39;ll just collect them for (my) future memory :)&lt;/p&gt;
&lt;p&gt;
	List updated on 01/07/2012&lt;/p&gt;
&lt;h3&gt;
	&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
	The Daily #nuget&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://paper.li/bsimser/1288656218"&gt;Home page&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://paper.li/bsimser/1288656218?edition_id=579aa980-b5b4-11e1-912c-0025907212f4"&gt;Permalink for 14/06/2012&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
	&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
	The Morning Brew&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://blog.cwa.me.uk"&gt;Home page&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://blog.cwa.me.uk/2012/04/17/the-morning-brew-1086/"&gt;Permalink for 17/04/2012&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;
	Gregor Suttie&amp;#39;s blog&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://gregorsuttie.com/2012/06/04/elmahr-elmah-fused-with-signalr/"&gt;ElmahR post about ElmahR&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
	&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
	Brady Gaster session about Web API&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://channel9.msdn.com/Events/Web-Camps/Web-Camp-Brussels-2012/Adding-an-API-to-Web-Sites-using-ASP-NET-Web-API"&gt;Mentioning and showing ElmahR at the very beginning of the recording&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
	&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
	ASP.NET Portal Home Page (!!!)&lt;/h3&gt;
&lt;p&gt;
	ElmahR appeared here on 13/06/2012 thanks to a reference to Gregor Suttie&amp;#39;s blog, it will stay there for a few days and then it will go away, but still... :)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://www.asp.net"&gt;Home page&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://www.asp.net/community"&gt;Community page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
	People hacking Elmahr&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="https://twitter.com/bitsprint/status/218731928583544832"&gt;https://twitter.com/bitsprint/status/218731928583544832&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Not bad :)&lt;/p&gt;
</description><pubDate>Sun, 01 Jul 2012 15:38:43 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/stuff-about-elmahr</guid></item><item><title>ElmahR and Appharbor: plugins and structure review</title><link>http://www.robychechi.it:80/roby/elmahr-and-appharbor-plugins-and-structure-review</link><description>&lt;p&gt;
	&lt;a href="http://www.robychechi.it/roby/tech-blog/elmahr-0.8.5-will-be-at-aspconf" target="_blank"&gt;Last time&lt;/a&gt; I&amp;#39;ve been already mentioning the new &lt;a href="https://appharbor.com/" target="_blank"&gt;Appharbor&lt;/a&gt; integration plugin I&amp;#39;ve been working on, but there&amp;#39;s more to tell about it, mainly for two reasons: the plugin system deserves some more details, and along with the Appharbor plugin I completed a quite deep restructuring of &lt;a href="https://bitbucket.org/wasp/elmahr/wiki" target="_blank"&gt;the whole project&lt;/a&gt;, which actually makes much easier to start from a repository clone and build up a fully functional and customizable ElmahR installation with just a few clicks. Nothing is perfect, and actually these advantages come with a little more maintenance burden on my side, but so far I&amp;#39;m happy with it and when I&amp;#39;ll have some more time I&amp;#39;ll work on it. But first let&amp;#39;s see more about the finished Appharbor plugin.&lt;/p&gt;
&lt;h2&gt;
	Appharbor build events integration&lt;/h2&gt;
&lt;p&gt;
	When you add a source application inside a dashboard, you know that you will receive there any unhandled exception occurring on the monitored application in real-time. In a context where applications are monitored for errors, probably you will have someone taking care of fixing them, and when fixed a new application version will be deployed. People monitoring the applications must be very interested in knowing when the mentioned deploys occur, and what this plugin makes possible is to have live notifications about the builds occurring if the hosting infrastructure is from Appharbor. The plugin takes advantage of the Appharbor HTTP API, and it&amp;#39;s basically creating an endpoint where build events can be sent through HTTP POSTs by any service hook you may configure inside your Appharbor control panel. When those are received, a new &lt;a href="https://github.com/SignalR/SignalR" target="_blank"&gt;SignalR&lt;/a&gt; hub packs and routes them to the dashboard, which the plugin enriches with some new UI elements where the messages end up stacking up, as for the error messages.&lt;/p&gt;
&lt;h2&gt;
	But how a plugin works?&lt;/h2&gt;
&lt;p&gt;
	Let&amp;#39;s see how a plugin (which by the way is a new .NET class library, no surprise here) in the context of ElmahR project is composed by up to 5 components:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;strong&gt;a server-side endpoint&lt;/strong&gt;: a plugin might set up an endpoint where external system would send messages, such an endpoint should normally be built as an http handler where to POST data&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;a server-side hub&lt;/strong&gt;: if the plugin is not about errors, it might need to deliver real-time communication events about different type of messages, therefore a new type of SignalR hub might be necessary; this piece is actually very easy because SignalR infrastructure already does all the discovery job, so adding a Hub-derived type inside the plugin assembly will do the trick&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;client-side logic&lt;/strong&gt;: the plugin might need some javascript code to do its job on the client, and this will be mandatory if you have an additional hub sending stuff down to the client&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;client-side rendering&lt;/strong&gt;: ElmahR is a visual dashboard, so quite likely a plugin will need to emit appropriate HTML, which could be created with whatever DOM manipulation strategy you like, but probably the easiest way would be to leverage the already integrated &lt;a href="http://knockoutjs.com/" target="_blank"&gt;Knockoutjs&lt;/a&gt; support for this&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;client-side resources&lt;/strong&gt;: images, css... those will be needed too, right?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Several of the just described pieces are straightforward, but there is one of them which is actually tricky: if you need to integrate new client-side visual widgets or processing logic, you need to integrate them inside a framework which must be totally unaware of the added plugin. That&amp;#39;s obvious, a plugin requiring some manual intervention on the existing code or UI in order to be used is not really a plugin, but that actually poses a small challenge, because you&amp;#39;ll need a way to add those pieces at run time, which also mean at the right time. Back to the Appharbor plugin, I needed to add a new messages counter for each enabled application, and also a container where to stack received build messages. It&amp;#39;s similar to what happens for errors, but these are not error messages, so they have ad hoc data and visual representations. ElmahR is a &lt;em&gt;Single Page Application&lt;/em&gt;, and that page is there unaware of plugins, how can we enrich it with new UI widgets? Believe it or not, it&amp;#39;s again SignalR coming to rescue. Here you have the main steps:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		I defined a few points inside default.cshtml where I might want to drop UI widgets, and I just put there divs with well-known ids&lt;/li&gt;
	&lt;li&gt;
		when a plugin wants to fill one of more of those extension points with its stuff, all it has to do is put cshtml &lt;strong&gt;extensors&lt;/strong&gt;&amp;nbsp;(that&amp;#39;s how I call them now) files inside &lt;span style="font-family:courier new,courier,monospace;"&gt;App_Data&lt;/span&gt; folder of the target dashboard, with a well-known subfolders&amp;nbsp;structure (which I&amp;#39;ll document as soon as possible); extensor are mainly pieces of &lt;strong&gt;Razor&lt;/strong&gt;-enabled html, but thanks for some naming conventions in place they can also be blocks of javascript or css&lt;/li&gt;
	&lt;li&gt;
		when default.cshtml kicks in on the browser, it first does a call to a SignalR endpoint called &lt;span style="font-family:courier new,courier,monospace;"&gt;commands&lt;/span&gt;, which is bound to a &lt;a href="https://github.com/SignalR/SignalR/wiki/QuickStart-Persistent-Connections" target="_blank"&gt;persistent connection&lt;/a&gt; that looks for extensors, compiles them through &lt;strong&gt;RazorEngine&lt;/strong&gt;, caches them, and sends them back to the client&lt;/li&gt;
	&lt;li&gt;
		when the extensors are received, they are dynamically added to the DOM through jQuery&lt;/li&gt;
	&lt;li&gt;
		at this point the normal lifecycle starts, the SignalR hubs are initialized and Knockoutjs bindings are applied&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	Why using a &lt;em&gt;persistent connection&lt;/em&gt;? As far as I know (and I might not know the whole story), SignalR initializes all the hubs at the same time with the call to the &lt;span style="font-family:courier new,courier,monospace;"&gt;start()&lt;/span&gt; javascript method, and at that moment all the javascript callbacks must have been already added to the client side hub counterparts, so that SignalR machinery can register them. This means that a plugin must have a chance to add its javascript pieces before hubs start. The only way to use SignalR before hubs are started is using a persistent connection, which is not related to hubs infrastructure and can be used beforehand. Sequencing asynchroous client-side callbacks in an appropriate way, I&amp;#39;ve been able to guarantee that extensors get added to the DOM before hubs kick in, and to ensure that Knockoutjs bindings are applied as the last step. This last detail is also important, because it allows us to enrich our view models before Knockoutjs starts running, therefore plugins can take full advantage of the MVVM infrastructure in place.&lt;/p&gt;
&lt;p&gt;
	This is been a very interesting pieces to build, and I could say more about it, but there one more piece that deserves more details now.&lt;/p&gt;
&lt;h2&gt;
	A new structure for the project&lt;/h2&gt;
&lt;p&gt;
	The plugins infrastructure brings several advantages, but in order for it to be effective the host must be of course unaware of any extension. This brought to my attention a problem that was already there since the beginning of the project, but whose importance became relevant just after these latest additions. ElmahR solution was made of a few libraries and a web application, which was setup to be up and running after a build with all the features enabled, and that was the way I arranged the solution because I wanted an easy and seamlessly way to deploy it to Appharbor, but this organization was also bringing some confusion to any people wanting to try themselves to setup an ElmahR dashboard for their infrastructure. &lt;a href="http://elmahr.apphb.com/" target="_blank"&gt;The demo application&lt;/a&gt; was playing both source and dashboard roles, and despite to some documentation I wrote I had the feeling that this was not enough clear. The plugins made this even worse, and a reorganization became necessary. Now the project contains 3 web applications:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR&lt;/strong&gt;: this is a dashboard with minimal configuration, ready to use and with no unnecessary configuration bits, hardcoded plugins or fake parts&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR.SampleSource&lt;/strong&gt;: this is a minimal web application which is there just to show how to raise errors and send them to a dashboard; it is already configured to talk to ElmahR dashboard just mentioned, making very easy to test things with no effort&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;ElmahR.Demo&lt;/strong&gt;: this is a more complex setup, it&amp;#39;s the dashboard hosted on Appharbor which is able to play as a set of sources and as an aggregating dashboard; its dependencies are declared directly inside the &lt;em&gt;csproj&lt;/em&gt;&amp;nbsp;file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	When I say &lt;em&gt;project&lt;/em&gt;, I do not mean a C# project, or a web application project, but I mean the whole ElmahR work in a more general sense. In such a way, the project is composed by 3 web apps, a few libraries and 2 solutions, one called &lt;em&gt;ElmahR &lt;/em&gt;containing all the other pieces, and one called &lt;em&gt;Appharbor &lt;/em&gt;which is the one the gets deployed on Appharbor infrastructure thanks to some naming conventions in place, and which contains only one web application, &lt;strong&gt;ElmahR.Demo&lt;/strong&gt;. The project also contains all the bits necessary to build 2 Nuget packages, &lt;a href="https://nuget.org/packages/ElmahR.Elmah" target="_blank"&gt;one for the ElmahR.Elmah&lt;/a&gt; assembly which exposed the &lt;strong&gt;ErrorPostModule&lt;/strong&gt;, and &lt;a href="https://nuget.org/packages/ElmahR.Appharbor" target="_blank"&gt;one for ElmahR.Appharbor&lt;/a&gt;. Both can be found in the Nuget Gallery.&lt;/p&gt;
&lt;h2&gt;
	Conclusions&lt;/h2&gt;
&lt;p&gt;
	In the next weeks I&amp;#39;ll try to write more formal documentation about all these things, for now what I want to say to close this long post is that it should be much easier for you to play with ElmahR code, and more straightforward to hack a repository clone for your need in your real infrastructure, and maybe to try to contribute back with interesting stuff. Just try and let me know :)&lt;/p&gt;
</description><pubDate>Sun, 01 Jul 2012 11:04:02 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-and-appharbor-plugins-and-structure-review</guid></item><item><title>ElmahR 0.8.5 will be at aspConf!</title><link>http://www.robychechi.it:80/roby/elmahr-0.8.5-will-be-at-aspconf</link><description>&lt;p&gt;
	Last time I blogged about &lt;a href="https://bitbucket.org/wasp/elmahr/overview" target="_blank"&gt;ElmahR&lt;/a&gt; progress was less that 2 weeks ago, but to me it seemed much more than that, probably because I worked a lot on it, and amount of things I did made me feel those days have been longer. Most of the work I did has been &amp;#39;behind the scenes&amp;#39; stuff, reorganizing projects and files in order to make room to new things, so if you will give it a try you will not notice big changes, but still there are a couple of new features, and the new structure will help a lot to build more of them.&lt;/p&gt;
&lt;p&gt;
	But before going into details, I have to tell you that I&amp;#39;m really excited because &lt;a href="http://www.aspconf.net/speakers" target="_blank"&gt;I&amp;#39;ve been accepted as a speaker for the next aspConf&lt;/a&gt;! I&amp;#39;ll be talking about ElmahR of course, but not because the project itself is really relevant, but because it&amp;#39;s been a very interesting and challenging playground where to learn and experiment about what the ASP.NET platform and the web Open Source world give us today to build (hopefully) great and cool applications. If you feel you have a good idea, there is a lot of great stuff out there you can use to make it real, in my talk I&amp;#39;ll try to expand on this showing those pieces in action inside ElmahR. It will be my first time as a speaker in a conference (and this is a BIG one), and I&amp;#39;ll be surrounded by awesome speakers, I hope I won&amp;#39;t be too bad. No pressure :) For more details go to &lt;a href="http://www.aspconf.net/" target="_blank"&gt;the aspConf web site&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
	Appharbor integration&lt;/h2&gt;
&lt;p&gt;
	&lt;a href="http://elmahr.apphb.com" target="_blank"&gt;ElmahR is hosted on Appharbor infrastructure&lt;/a&gt;, which since the very first days has revealed as a very good place where to easily deploy it. Reading stuff about Appharbor platform I came to know a little more about their HTTP API, and one of the things I read made me think that I could build some more direct integration with their platform. ElmahR is about monitoring errors, and an errors normally implies building a solution for them and deploying it. Therefore I began finding interesting the way Appharbor allows you to configure a &amp;#39;service hook&amp;#39; in your monitored application, in order to post info about how a build went when triggered. This way a dashboard user would know that a new version of the buggy app is available, and would therefore monitored it with different eyes :)&lt;/p&gt;
&lt;p&gt;
	Looking at Appharbor docs it&amp;#39;s been quite easy to build such a functionality, and now ElmahR supports this feature. Whenever your monitored application is hosted on Appharbor infrastructure, you can have the dashboard notified about build events related to that application, and have them displayed real-time inside the box associated to the source application. So far the implementation is quite basic, and most noticeable there is no persistence for build info events yet, but after some more code reorganization it should be quite easy to store them for future retrieval.&lt;/p&gt;
&lt;h2&gt;
	A plugin system, and related projects reorganization&lt;/h2&gt;
&lt;p&gt;
	ElmahR codebase it&amp;#39;s always been very simple, we always had just a web application and a .NET assembly where the ErrorPostModule lives. But during the last week I reorganized it in a slightly more complex, but more flexible structure. Now most of the code of ElmahR moved in an assembly called ElmahR.Core, including things like the SignalR hub or the persistence system.&lt;/p&gt;
&lt;p&gt;
	Why did I do this? I just told you about the Appharbor integration, that&amp;#39;s indeed a very interesting feature, but to be honest I worked on it because it was a (good) excuse to find a way to build a plugin system into ElmahR. I started writing the new functionality first, and then working on it to extract it out in a way that I could get to the point where that piece becomes totally isolated to the rest of ElmahR, and easily pluggable, maybe soon with a Nuget package. And, by the way, that&amp;#39;s the only way it would have made sense, having Appharbor related stuff hardcoded inside ElmahR would have been a too much strong statement, especially&amp;nbsp;&lt;span style="font-family: Tahoma, 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; "&gt;if your hosting platform is different&lt;/span&gt;. Reorganizing the code base has been a first step towards that goal, and having isolated ElmahR.Core helped with it, and it will in general do for future pluggable features.&lt;/p&gt;
&lt;p&gt;
	I&amp;#39;ve been thinking a lot about how an ElmahR plugin should look like, and so far I identified 5 components:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;em&gt;server-side endpoint&lt;/em&gt;: a plugin might set up an endpoint where external system would send messages&lt;/li&gt;
	&lt;li&gt;
		&lt;em&gt;server-side hub&lt;/em&gt;: if the plugin is not about errors, it might need to deliver real-time communications about different type of messages, therefore a new type of SignalR hub might be necessary&lt;/li&gt;
	&lt;li&gt;
		&lt;em&gt;client-side logic&lt;/em&gt;: the plugin might need javascript code to do its job on the client&lt;/li&gt;
	&lt;li&gt;
		&lt;em&gt;client-side rendering&lt;/em&gt;: ElmahR is a visual dashboard, so quite likely a plugin will need to emit appropriate (and possibly Knockoutjs-integrated) HTML&lt;/li&gt;
	&lt;li&gt;
		&lt;em&gt;client-side resources&lt;/em&gt;: images, css... those will be needed too!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Working on this vision, I refactored out most of the Appharbor stuff into a new assembly (ElmahR.Appharbor), containing a dedicated endpoint and a specific hub. I said &amp;#39;most of it&amp;#39; and not &amp;#39;everything&amp;#39; because the client-side stuff is still in the main ElmahR projects, but that&amp;#39;s just a matter of a more general reorganization of the whole solution, which is pending since a while and I&amp;#39;ll try to achieve soon. If we forget about this last tiny detail, the plugin system works just fine, and actually it&amp;#39;s been a very interesting piece to develop because it allowed me to learn more about SignalR, which in this context I used in a less conventional way: a content distribution system. Curious about this? Next time... :)&lt;/p&gt;
</description><pubDate>Mon, 25 Jun 2012 17:15:15 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-0.8.5-will-be-at-aspconf</guid></item><item><title>ElmahR 0.7.5</title><link>http://www.robychechi.it:80/roby/elmahr-0.7.5</link><description>&lt;p&gt;
	ElmahR reached today 0.7.5, with more improvements in several areas. Let&amp;#39;s see them very briefly.&lt;/p&gt;
&lt;h2&gt;
	Settings Persistence&lt;/h2&gt;
&lt;p&gt;
	Now ElmahR is smarted and recognizes the current settings you have in place when you decide that you want to be remembered and tick the corresponding checkbox, while previous version was remembering only settings changed after ticking it. It also remembers about more things: as you might know you can reorder the application boxes as you like, now ElmahR records the positions you gave them and restores them when you reconnect. Persistence of error types status coming soon.&lt;/p&gt;
&lt;h2&gt;
	Connection status diagnostics&lt;/h2&gt;
&lt;p&gt;
	On the top right corner of your window you might notice messages appearing every now and then, those are giving feedback about things that SignalR does under the hood when dealing with connection glitches, those messages are there mainly for me for debugging purposes and to understand better what goes on, they should not get too much in your way.&lt;/p&gt;
&lt;h2&gt;
	SignalR groups, finally!&lt;/h2&gt;
&lt;p&gt;
	The latest version does a first network optimization thanks to &lt;a href="https://github.com/SignalR/SignalR" target="_blank"&gt;SignalR&lt;/a&gt; groups. This feature allowed me to represent each monitored application as a group of connections. Each client is added to the corresponding application group when he/she decides to observe it (&amp;#39;play&amp;#39; button in app boxes), or is removed from the group when the user is not interested in that app anymore (&amp;#39;pause&amp;#39; button). Those settings are recorded as already explained, and both this stateful info and the tracking of user&amp;#39;s current interactions with the dashboard allowed me to leverage SignalR groups, and send errors only to clients interested in observing the source applications. This could potentially save a lot of network bandwidth if monitored applications are a lot, and users selectively turn off uninteresting ones.&lt;/p&gt;
&lt;p&gt;
	What about how I implemented this feature? Has it been difficult? Absolutely not, I just read the &lt;a href="https://github.com/SignalR/SignalR/wiki/Hubs" target="_blank"&gt;SignalR docs&lt;/a&gt; about it and applied it in the right places, it&amp;#39;s been easy and quick to do :)&lt;/p&gt;
&lt;h2&gt;
	Test Exception&lt;/h2&gt;
&lt;p&gt;
	If you go to &lt;a href="http://elmahr.apphb.com" target="_blank"&gt;the demo website&lt;/a&gt; you will see nice skulls all over the place :) Each application can be enabled to raise &lt;a href="http://code.google.com/p/elmah/" target="_blank"&gt;ELMAH&lt;/a&gt; test exception, and when it is ElmahR shows a skull in the corresponding box, pressing it will issue a GET request for &lt;em&gt;elmah.axd/test&lt;/em&gt; back to the source, which is a documented way to ask ELMAH to raise a test exception inside the monitored application, exception that should then be posted back to the dashboard. It&amp;#39;s a useful way to test if things are configured correctly, if the exception does not popup you will know that something&amp;#39;s wrong with your setup.&lt;/p&gt;
&lt;h2&gt;
	Summary&lt;/h2&gt;
&lt;p&gt;
	Many things are happening around ElmahR, the project is doing good (and slow) progress, and the community is starting contributing back with concrete pieces, like the help I received from the &lt;a href="http://nuget.org/packages/ElmahR.Elmah" target="_blank"&gt;Nuget package&lt;/a&gt;, and feedback in form of feature requests or blog posts, like &lt;a href="http://gregorsuttie.com/2012/06/04/elmahr-elmah-fused-with-signalr/" target="_blank"&gt;the one&lt;/a&gt; from &lt;a href="https://twitter.com/#!/gsuttie" target="_blank"&gt;@gsuttie&lt;/a&gt; that today made it to &lt;a href="http://www.asp.net/community" target="_blank"&gt;the official ASP.NET community home page&lt;/a&gt;! Cool! :)&lt;/p&gt;
&lt;p&gt;
	But there&amp;#39;s still a lot to do... &lt;a href="https://bitbucket.org/wasp/elmahr" target="_blank"&gt;wanna help&lt;/a&gt;? :)&lt;/p&gt;
</description><pubDate>Wed, 13 Jun 2012 21:05:29 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-0.7.5</guid></item><item><title>ElmahR has its Nuget package</title><link>http://www.robychechi.it:80/roby/elmahr-has-its-nuget-package</link><description>&lt;p&gt;
	As already mentioned, a few days ago &lt;a href="https://twitter.com/#!/gsuttie" target="_blank"&gt;@gsuttie&lt;/a&gt; offered his help in building &lt;a href="http://nuget.org/" target="_blank"&gt;Nuget&lt;/a&gt; packages for &lt;a href="https://bitbucket.org/wasp/elmahr" target="_blank"&gt;ElmahR&lt;/a&gt;. We discussed and agreed that the most meaningful place to start was a package to easily configure a source, and he did a good job coming out with a first version. But then I soon realized that it would have been much easier to have the process more integrated with ElmahR project itself, taking advantage of all the Nuget packaging features. So I took over the task and finalized it, and now &lt;a href="http://nuget.org/packages/ElmahR.Elmah" target="_blank"&gt;an &amp;#39;official&amp;#39; Nuget package&lt;/a&gt; is available!&lt;/p&gt;
&lt;p&gt;
	A few considerations:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		The package is called &lt;em&gt;&lt;strong&gt;ElmahR.Elmah&lt;/strong&gt;&lt;/em&gt;, and it helps you configuring a source, adding the necessary pieces to your web.config&lt;/li&gt;
	&lt;li&gt;
		ElmahR is still under development, and the same stands for the Nuget package, which has the same version number of the currently available binaries (0.7.2). The package might not be perfect, if you discover anything weird in it please let me know&lt;/li&gt;
	&lt;li&gt;
		The package manages the dependency on &lt;a href="http://code.google.com/p/elmah/" target="_blank"&gt;ELMAH&lt;/a&gt; through Nuget itself&lt;/li&gt;
	&lt;li&gt;
		This package does NOT help you to configure a dashboad instance, for that you&amp;#39;ll have to check the repository and start from there&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	In order to implement things easily and consistently, I went through an overall reorganization of the project:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		The ElmahR.Elmah assembly, which was already there but mainly for technical reasons, now is a first citizen in the project because it absorbed the ErrorPostModule, which before was gently hosted by the&amp;nbsp;&lt;a href="http://code.google.com/p/elmah-sandbox/" target="_blank"&gt;Elmah Sandbox&lt;/a&gt; project. This change simplified the overall project maintenance and made easier to build a consistent Nuget package&lt;/li&gt;
	&lt;li&gt;
		I changed the .NET framework version of this assembly from 2.0 to 3.5, this way it will still work fine with ASP.NET 2.0 web site, but at the same time I&amp;#39;ve been able to take advantage of Linq while moving ErrorPostModule.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	I&amp;#39;ll write more about it in the next few days, probably in the project &lt;a href="https://bitbucket.org/wasp/elmahr/wiki/Home" target="_blank"&gt;wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
	Demo &lt;a href="http://elmahr.apphb.com/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
</description><pubDate>Wed, 06 Jun 2012 22:18:39 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-has-its-nuget-package</guid></item><item><title>ElmahR persistence is evolving</title><link>http://www.robychechi.it:80/roby/elmahr-persistence-is-evolving</link><description>&lt;p&gt;
	Quick update about &lt;a href="https://bitbucket.org/wasp/elmahr/overview" target="_blank"&gt;ElmahR&lt;/a&gt;. After &lt;a href="http://www.robychechi.it/roby/tech-blog/elmahr-persistence-and-what-about-documentation" target="_blank"&gt;preparing the ground to support persistence&lt;/a&gt;, and building errors persistence on top of it, I went a step further, enabling a first draft of a simple &amp;#39;user settings&amp;#39; storage system. The functionality if really a basic one, what it does is just storing a guid in a persistent cookie, and using that guid to associate a bunch of setting to the current user and store them inside the same database used for errors persistence, provided the user activated the functionality ticking the corresponding option. The implementation itself is not really worth many words, what&amp;#39;s maybe more worth noting is the fact that this work is been the preparation for something more useful like profiling &amp;#39;real&amp;#39; users connecting to ElmahR through whatever authentication mechanism you&amp;#39;d want to use. In fact the idea here is to let user authentication as an external piece, letting implementors choose the most appropriate one or maybe even write their own ways to handle the problem, ElmahR will just leverage IIdentity interface and all the related concepts to store settings.&lt;/p&gt;
&lt;p&gt;
	At the time of this writing the system remembers for each user the status of each application feed, which can be &amp;#39;running&amp;#39; or &amp;#39;paused&amp;#39;. In the next steps it will remmeber more things, like the position of the application boxes on the left column or the status for the error types.&lt;/p&gt;
&lt;p&gt;
	There&amp;#39;s another interesting news, last week a parallel project about building a Nuget package for ElmahR source applications has been started thanks to &lt;a href="https://twitter.com/#!/gsuttie" target="_blank"&gt;@gsuttie&lt;/a&gt;, soon there will be goon news on that front too :)&lt;/p&gt;
&lt;p&gt;
	As usual, you can give ElmahR a try &lt;a href="http://elmahr.apphb.com" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
</description><pubDate>Mon, 04 Jun 2012 20:03:29 GMT</pubDate><guid isPermaLink="true">http://www.robychechi.it:80/roby/elmahr-persistence-is-evolving</guid></item></channel></rss>