Giter Site home page Giter Site logo

huoxudong125 / webbackgrounder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nuget/webbackgrounder

0.0 2.0 0.0 1.62 MB

Proof of concept of a web based background task manager that deals well with web farms/app shutdowns

License: Apache License 2.0

XSLT 12.40% PowerShell 0.26% C# 85.97% CSS 1.23% ASP 0.14%

webbackgrounder's Introduction

Intro

WebBackgrounder is a proof-of-concept of a web-farm friendly background task manager meant to just work with a vanilla ASP.NET web application.

Problem Statement

Code that runs within ASP.NET does not own the App Domain. IIS and ASP.NET are free to shut down the app domain at any moment.

Typically, when that happens, ASP.NET flushes the requests giving them time to finish what they're doing before tearing down the App Domain.

But if you're doing work on background thread that ASP.NET doesn't know about, it could end up tearing down the app domain in the middle of the work, leaving your data in a potentially invalid state.

There are ways to notify ASP.NET that work is in progress. WebBackgrounder demonstrates the use of such facilities.

Likewise, if you have multiple web servers in a farm, you'd like some small amount of coordination between them without them having to explicitly know about each other so they don't duplicate each other's work.

Why not use Azure Queues or a Scheduled Task?

For an enterprise solution, using an Azure Queue, a Windows Service, or a system level scheduled task are much better solutions. The goal of this project would be to allow those to easily hook in and provide this functionality.

But for a small project, or for development environments, you still want these tasks to run without requiring a bunch of setup or a connection to Azure.

What this is not

This is not a general purpose scheduling framework. There are much better ones out there such as hangfire.io, FluentScheduler and Quartz.net. The goal of this project is to handle one task only, manage a recurring task on an interval in the background for a web app.

The needs I have are very simple. I didn't need a high fidelity scheduler. Maybe later, I'll look to integrate what I've done with one of the others. But for now, this scratches an itch.

webbackgrounder's People

Contributors

haacked avatar analogrelay avatar wwahammy avatar jrusbatch avatar maartenba avatar pranavkm avatar regisbsb avatar xavierdecoster avatar

Watchers

James Cloos avatar Frank Huo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.