GithubHelp home page GithubHelp logo

dyslexicanaboko / protected-resource Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 55 KB

Experimental concept for protecting a hotly contested resource with focus on a SQL table at the moment. Main idea is to take an onslaught of updates to a row and squash them into a single representative.

License: MIT License

C# 99.05% TSQL 0.95%

protected-resource's Issues

Handle transaction failures

Main issues

  • What to do when a transaction fails?
  • What happens if the transaction keeps failing though?

Idea 1

  1. Retry database update depending on the error? If it was a deadlock, cannot retry for example.

Idea 2

  1. Updated cached copy.
  2. Put squashed message back on the queue but as next to process (first in line).
  3. New squash with new chunk
  4. New table update

Implement feedback mechanism

When a requestor submits a message there needs to be a message sent back giving them a clue as to what happened to their request.

  • Was it squashed?
  • What does it look like after the squash?
  • In general it will give them confirmation their change went through somehow.

service health monitor

Each table manager needs to be monitored for health.

  1. If the table manager crashes, the resulting exception should not take down the whole service
  2. The exception needs to be logged
  3. The table manager should try to restart a fixed number of times before staying down
  4. Additionally, if there is a dead lock exception or other type of exception when a transaction is being committed; it needs to be determined how many times this can happen before a partition is considered critical.
  5. Should there be a global metric that handles the over all health of the table manager based on the health of the individual partitions?

caching update combinations

  • Each time a partition is updated, an update statement is created.
  • It would be beneficial to just store all combinations that are created the first time to not have to generate them again since this is technically an expensive operation.
  • Benefits are, not using reflection for each commit.

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.