March 1st, 2010

Lesson Learned: WCF vs. NOT

For the first ~18 months of Glo’s development, it self-hosted a fairly large set of WCF services through which we pumped the data coming from SQL Compact over named pipes. Data access & entity-mapping layers sat behind five WCF endpoints used by the Presenters for data retrieval.

The reasoning behind this architecture was simple: it would be nice to leverage the same code for both the desktop and Silverlight apps, so let’s build it as a WCF service, then just point to a different URI to connect to the service based on the platform.

This worked fine until we started hitting WCF limits. Of course it’s simple to adjust MaxReceivedMessageSize, MaxItemsInObjectGraph, MaxArrayLength etc defaults, but we also saw we needed to code around perf issues when returning big data chunks. I dealt with tweaking limits for awhile, but after failing to fix WCF errors saying I had exceeded MaxNameTableCharCount, it made me start thinking about bailing on it altogether. The services appeared to be too big & had caused me one too many headaches.

I did tests to gauge potential benefit of eliminating WCF, and was sort of amazed to see the overhead they had imposed. Serialization & transport issues aside, I had attended Juval Lowy’s lecture on “Every Class a WCF Service” and came away thinking perf would not be terribly impacted.

So I spent a couple days replacing the services with a layer that loads data entities directly. This boosted backend performance by over 30%, and naturally eliminated associated headaches.

Moral of the story: even if I have to replicate Glo’s data layer as online WCF services for a web version, removing them from the desktop version was definitely worth it. LESSON LEARNED.

February 3rd, 2010

Retaining Your Glo Data and Settings When Re-formatting

Glo stores your journal data, bookmarks, notes, reading plans, user tags and personal settings in a variety of formats (XML, binary, etc), but in a single location. To retain that data through a reformat or reinstall, you just need to save that folder somewhere, like onto a memory stick, before reformatting or uninstalling. After your machine is set up again, before running Glo, put the folder back where Glo can find it.

Find the folder here on Vista or Windows 7:

C:\Users\[current user]\AppData\Local\glo\

Find it here on XP:

C:\Documents and Settings\[current user]\Local Settings\Application Data\glo\

Of course, substitute ‘[current user]‘ for your own user account name.

This ‘glo’ folder contains a few sub-folders and loose files. Save the ‘glo’ folder onto a USB stick or wherever is convenient to archive it. After reformatting and reinstalling, drop the folder back where it was, or in whichever path the new [current user] is using.

February 3rd, 2010

Team, Technologies, Tools

Here’s some background info as an introduction to the Glo Development Blog.  We’re an eight-man team, and most of us have been working on Glo since early 2008.  We develop in an Agile environment.  Since we live in a .NET developer-rich community, but cannot find any local WPF developers to join our team, we figure we must be the b[igg]est WPF team around.

Technologies Glo Uses:

  • Microsoft .NET Framework 3.5
  • C#, C++, WPF, CAB (Prism), Unity, LINQ
  • SQL Server Compact Edition 3.5
  • MapDotNet
  • Lucene.NET

Tools We Use To Develop Glo:

  • Visual Studio 2008
  • SQL Server 2008
  • Expression Blend
  • Enterprise Library 4.1
  • WCF, ASMX
  • WinForms, ASP.NET
  • ANTS Profilers
  • SQL Toolbelt
  • Sourcegear Vault

January 13th, 2010

Welcome to the Glo Developer Blog!

We’ll use this space to talk about the development of Glo. Check back for updates!