Jan 24

Introducing Dragonfly – another .NET HTTP server

dragonfly, internet, opensource, OWIN, programming, tech 9 Comments »

Two posts in a month! Hard to believe.

This one is to introduce Dragonfly – which is another 100% C# HTTP server. It’s designed from the ground up to be an OWIN host, of course, and is entirely non-blocking. This is similar to other open source managed web servers like Kayak and to some extent others like Manos.

Why start another C# HTTP server? Well, to some extent this started as an exercise to have another test harness to help troubleshoot and validate Gate and OWIN, rather than as a functional HTTP server of its own. It has from that grown into something that I felt had enough value to share as a standalone project.
Read the rest of this entry »

Jan 16

Gate 0.2.1 implementation of OWIN online at NuGet

Gate, internet, opensource, OWIN, programming, tech 4 Comments »

Hello everyone! First – to break the cardinal rule of posting on stale blogs – it’s been nine months!? Time flies! Okay, now that’s out of the way.

The topic of this post is OWIN – specifically the 0.2.1 refresh of the Gate reference implementation which has been released to NuGet.org.

You can test-drive these bits yourself, if you would like, from a simple C# console application. I’m assuming you have NuGet installed, right? Good! So in a new console app (HelloWorld.exe in my case) from the Package Manager Console install either Gate.Stack.Kayak.Nancy or Gate.Stack.HttpListener.Nancy. You can also right-click the project and select Manage NuGet Packages… to accomplish the same thing. The various Gate.Stack.* you will find are umbrella packages that pull in several dependencies and add a few example source files.
Read the rest of this entry »

Apr 23

Is this thing still on?

No Comments »

Hello all! Or at least all of you still tuned in after this huge gap in posting. :)

It’s spring again, Easter weekend, and we’re celebrating with Brenda’s sister Michelle and niece Azaria. They’re staying with us while they transition to Washington.

Other news on a professional front, Orchard 1.1 has been released! Time to dig in for 2.0 scope and ideas.

Ah! Also will be in Atlanta for a TechEd presentation on “Writing an ASP.NET MVC ViewEngine” so if you’re in town be sure to check that out.

Another thing going on is some community development participation work on the Gate reference implementation of the OWIN spec. It’s a lot if fun – you should check that out.

Well, that’s good for now. Lets see if this mobile blog app actually posts. :)

Posted from WordPress for Windows Phone

Nov 09

Notes on The Big View Engine Comparison

internet, opensource, programming, spark, tech 1 Comment »

There was another very interesing comparison of several view engines recently. Some of the Spark syntax isn’t exactly how I would have done things, so I thought I would respond with some of those notes. I was going to add a comment, but wanted to be able to preview code samples.

So here are some thoughts.
Read the rest of this entry »

Sep 12

Orchard moving along nicely

cms, opensource, orchard, programming 2 Comments »

There are three cornerstones to a content management platform – extensibility, storage, and display. The first milestone of Orchard revolved around the first two and the next push is taking a look at the third.

It takes a large leap of faith to retrofit the rendering system of an application. If the retrofit is based on significantly different concepts you don’t really have a choice but to enter a period of almost total loss of functionality. So here we are – jumping the canyon – looking forward to getting all of the modules back online over a new display system.

There are a lot of things we want to accomplish with what’s being designed. Trying to capture as many of the simple qualities you’d want from a direct template based approach along with the flexibility, power, and control you’ll need in a system like Orchard.
Read the rest of this entry »

Aug 10

Orchard 0.5 is out

cms, opensource, orchard, programming, tech 2 Comments »

I really need to dust off the blog. Awful how it’s sat here unused.

In my defense – I’ve been busy. There was a recent flight to GenCon 2010 of course, and a 27-hour drive to Wisconsin from Washington and back. Did it each way in a single shot, too. Much better than spending four days with a 14-hour drive around your break. Before that was a trip to Oslo to do a pair of presentations about Spark at NDC2010.

spacer

But that’s not what I’m talking about at the moment. It’s – - – Orchard!

0.5 is out, which means the infrastructure is baked enough to say it won’t entirely switch out from under you before a v1 release.

Some of the sub-systems of the platform (looking at the under-side that is) cover a feature-space including:

Integrated fundamentals – IoC, ORM, and MVC libraries out-of-the-box – because if the system didn’t do so, no module could make an assumption those services would be available.

Modularity – IoC capabilities are leaned on heavily to enable a seamless and automatically stitched together module/component development story. There was some considerable and interesting work put into producing an effect similar to dynamic compilation of modules when they’re dropped into place or altered outside of visual studio.

Content – a set of components in the Orchard.ContentManagement namespace builds a layer on top of the ORM repository pattern. Kind of like a domain model built in front of the relational model.

Commands – one of the concepts exposed from the core framework is a command handler component. There’s also an orchard.exe present in the web app bin directory which acts as a CLI bridge into a embedded instance of the orchard web environment it can host. In a nutshell you can script orchard, and modules can introduce additional commands.

Indexing – capabilities are present as a core module – with Lucene as an out-of-the-box implementation – all of this helps to ensure that a form of searchability is available, and module authors have an indexing and searching api’s in the base system they can use.

But, this is a quick post, and that’s just a small handful of things you’ll find under the hood. I’m quite happy about how many different aspects of the project have taken shape, and continue to be impressed sprint by sprint with the ingenuity and passion the folks on the team put into the effort.

May 05

Multi-Tenancy in ASP.NET MVC with IoC

aspnetmvc, internet, opensource, orchard, tech No Comments »

Speeding up StackExchange is a good example of the motive and benefits to running multiple sites out of one instance of an ASP.NET app domain.

Update: Another good description is at Multi-tenancy in ASP.NET MVC – Why do we want it?

Not a new concept of course – the app domain itself is a framework-level implementation of multi-tenancy in a process. You could also say the process itself is an example of multi-tenancy in the operating system, and virtualized guest OS is multi-tenancy in the entire computer. You can see the pattern that forms, though, where each level you drop down has better isolation, and allows greater degree of variance between tenants, but comes at a higher cost in terms of resources or efficiency.

So it goes that multi-tenancy all the way up at the web application level should be the most efficient if you’re able to work with some limitations in freedom.

The most obvious limitation – everybody is running the same palette of code – isn’t even really the biggest issue. Being able to assume all of your tenants are on the same code, and that you can stage, test, and update all of them at a shot, could actually be a really nice benefit more than a problem. The real problems are singletons – anything static and stateful is a badness. This can be singleton extensibility points, or collections in libraries, or of course anything that’s in web config.

Your most powerful tool in avoiding places where your web application scrapes against (or introduces) a static and stateful point would be any of the modern inversion of control containers. An example of their use in that way is in the most recent development iteration of Orchard which gained the ability to host multiple sites in the same app domain.

The mechanics of spinning up per-tenant container: There’s a single IOrchardHost component created during startup from a root IoC container. That component’s job boils down to creating any number child IoC containers from the root, one for each active IOrchardShell instance, and rebuilding them when needed. The root container has the fewest number of components needed – just the ones required to create and build the shell containers.

The mechanics of hitting the right tenant: When a shell is built and activated it registers routes that have an association to its IoC container. And if there is a host header defined for the shell the route will only match those requests. At the point when a request comes in and hits a Route registered by one of the shells there is an established affinity to the IoC container for the rest of the request.

The mechanics of lightweight isolation: The rest is of the concerns all fall into place naturally. The controller factory draws the controller instance from the shell’s container – so only the components and dependencies which are enabled for that tenant are resolved. All of the configuration (right down to the settings on the database connection provider and the table name prefix) are specific to the shell. Many of the components rely on a singleton pattern to hold various aspects of long-lived state. Those components do always resolve as the same instance – to the best of their knowledge at least. In reality for multi-tenant purposes the singleton component pattern means the same instance will be returned for the lifetime scope of any given shell instance.

There are a few places you need to shim, like tenant-specific controller factory, or view engine concerns, or aspnet membership providers become lightweight classes that reach up into the request context to resolve and invoke the tenant-specific implementation of the capability in question. But other than that – the net effect – it all kind of works.

Mar 25

Virtual method/property patching with C# dynamic and Castle DynamicProxy

castle, dynamicproxy, programming, tech 2 Comments »

One of the things I’ve been doing a lot recently is trying to get some pretty dynamic behaviors out of a fairly strongly typed compile time language. That’s .NET 3.5 of course, and the Castle.DynamicProxy has been an invaluable ingredient.

The other day I saw some neat things like these and more David Ebbo was doing with dynamic in VS2010. Reading up on the new C# dynamic keyword and some interesting bits about IDynamicMetaObjectProvider, DynamicObject, and ExpandoObject to get up to speed – I started to wonder something about ways Castle DynamicProxy and C# dynamic could work together.
Read the rest of this entry »

Mar 02

Spark bits for MVC 2 RC2

mvc, programming, spark, tech 7 Comments »

Title kind of says it all. Spark v1.1 RC1 for MVC 2 RC2.

Thanks to folks who helped getting issues like this sorted out and Ben Scheirman, @subdigital, who sent a pull request on this issue. A while ago Erik Polerecky, @detroitpro, also provided a blog post with some bits you could download that contained those changes.

I asked him afterward if he would be interested in helping update the releases on Codeplex and he kindly agreed, in fact the new bits on codeplex and release notes were put together by Erik, so be sure to thank him for that. Hopefully this is just the first step in getting that larger support base I’ve been angling for. :)

As always – this is a lead up to sticking a fork in some 1.1 bits. If you find anything flaky please email the group or report an issue.

So… Main changes for MVC 2:

  • Updated the MVC binaries
  • Changed use of view context and updated output-capturing
  • Fixed implicit support for areas to be MVC 2 compatible (“area” is in data tokens, not route values)
  • Avoids autoencoding html helper and macro values

The last bit is interesting. In theory you should be able to turn on autoencoding and use ${expr} for all of your output instead of switching to !{expr} for things you know return html. It should “just work” in terms of html encoding data but not markup from things like ${Html.ActionLink(“hello”)}.

Feb 21

Waking the dragon

No Comments »

Earlier today I started this thread in the Spark google group:

spacer

There was a session at altnetseattle I kicked off “How to organize an OSS project for participation and longevity”

It was a thinly veiled attempt to solicit assistance, like the earlier thread, and recent tweet about “Re: Spark Project growth & futures. Know talented community developers you believe should be interested?”

The take-away from the session was very productive but didn’t provide simple answers. It provided obvious answers that require non-trivial effort, which passes the sanity check of the engineer in me.

Grow the base of read-only adoption, encourage promotion to the second tier of casual contributor, and it’s from that tier the active managing participants emerge. So it appears if I don’t want to be singly responsible for the code base it will take a lot more work to make it a top-shelf project in terms of participation.

The message underlying all of this is that this software belongs to everyone. Whether you’ve downloaded an eval zip, are using the tools in your project, have blogged or screencast about spark, or have submitted several patches you can see in the scc history today. You are all stakeholders in the cultural value of the project, and I believe it’s this sense of ownership that makes the vibrant, explosive open source cultures on other platforms.

That said, I think some artifacts and activities are missing, and for that I apologize. At the moment there’s not a good roadmap and the issue/task tracking seems suboptimal. There are also some bits on the ci server that could be posted as ctp on codeplex which have the mvc 2 fix and the recent pull requests integrated. I’ll reply here if there’s any news on those counts.

The current focus at the moment, of course, is all about mvc 2 readiness and with a look at vs2010 secondarily.

Read the rest of this entry »

Previous Entries
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.