.NET Tips and Tricks

Blog archive

More Local Database Scenarios

As I mentioned in my last blog entry, we picked out two databases to review for our "local database storage" review for the July issue timeframe: VistaDB and db4o. This blog (and the last) answer the question, "What do I mean by a local database?" I discussed one of the scenarios (performance enhancement) for local storage in my last blog.

A second scenario where local storage is needed is to support processing when the network connection to the application's remote database isn't available: continuity of service. By downloading and caching key data on the local computer, the application can continue to work even if the most recent data (back on the remote server) isn't available.

Obviously, this is only going to be possible if the data is relatively non-volatile. If the application can't refresh the local data from the server the local data goes stale and, if the data is volatile (changes frequently), bad things happen to good programs. A variant on this scenario is using local storage to store the user's changes until the connection is made when the user's data can be uploaded to the central database.

As I mentioned in my last blog, I have an interest in these tools (as I do in most of the tools we review, quite frankly). My application is a Windows service that uploads data from sensors at the client to a central Web service. To handle continuity of service each client has two threads: one that writes data to a flat file and another that reads from the file to send the data to the Web service. When we lose the connection to the 'net (and we have) the file just grows until the connection is re-made. I don't object to using flat files but a local database would make this part of the service considerably easier to maintain.

We're also considering creating a server-side version of this application where working with flat files isn't an attractive option. For the server-side version we'd rather keep all of our data (including the data currently going into the flat files) in a database. Rather than have two codebases (one using a client-side flat file and one using a server-side database) we'd rather have a single code base that uses the same storage throughout.

Which leads to the criteria for the products under review. That'll be my next blog post, though.

In the meantime -- do these scenarios sound sane to you? What else (if anything) should a local database support?

Posted by Peter Vogel on 06/10/2010 at 1:16 PM


comments powered by Disqus

Featured

  • Death of the Dev Machine?

    Here's a takeaway from this week's Ignite 2020 event: An advanced Azure cloud portends the death of the traditional, high-powered dev machine packed with computing, memory and storage components.

  • COVID-19 Is Ignite 2020's Elephant in the Room: 'Frankly, It Sucks'

    As in all things of our new reality, there was no escaping the drastic changes in routine caused by the COVID-19 pandemic during Microsoft's big Ignite 2020 developer/IT pro conference, this week shifted to an online-only event after drawing tens of thousands of in-person attendees in years past.

  • Visual Studio 2019 v16.8 Preview Update Adds Codespaces

    To coincide with the Microsoft Ignite 2020 IT pro/developer event, the Visual Studio dev team shipped a new update, Visual Studio 2019 v16.8 Preview 3.1, with the main attraction being support for cloud-hosted Codespaces, now in a limited beta.

  • Speed Lines Graphic

    New for Blazor: Azure Static Web Apps Support

    With Blazor taking the .NET web development world by storm, one of the first announcements during Microsoft's Ignite 2020 developer/IT event was its new support in Azure Static Web Apps.

  • Entity Framework Core 5 RC1 Is Feature Complete, Ready for Production

    The first release candidate for Entity Framework 5 -- Microsoft's object-database mapper for .NET -- has shipped with a go live license, ready for production.

Upcoming Events