Code Monkey home page Code Monkey logo

shareablespreadsheet's Introduction

ShareableSpreadSheet

In this project, we asked to make shareable spreadsheet (shareable: can be accessed by multiplying users).
For make it possible,
we had to set locks on resources,
in a way that will prevent a deadlock or another reader-writer common problems (dirty write, dirty read, phantom, and so).

The approach we have adopted is to separate the Spread Sheet object methods into sections,
and each section will get a unique locking mechanism using the Spread Sheet object data members.
The methods were separated into 4 groups: Reading, Writing, Structure changing, Searching.
Each group have a unique locking mechanism responsibility.
The lockers groups are: ReadLock, WriteLock, StructureChangeLock, SearchLock.
(Every lock option has the mirroring operation.

For example:
ReadLock method that locking the related resources in Reading operations,
have the opposite ReadLockRelease methos which releasing the locks).
Each method has the same method structure inside of it.
Every critical section of every function is wrapped by locking and releasing,
the lock type depending on method purposes (methods groups).

For example,
the method “Search string” which searching for a cell contains a given string value:
image
As can be seen, the method’s critical section is wrapped by Read Lock and Search Lock.

The Spread Sheet object data members that used in order to be able to manage the locking system: (following comments explains each data members purpose).
image
A diagram represents the locking flow of an example method “Add row”:
image \

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.