Concurrency problems with cloud services: Dropbox

Abstract

Dropbox creates a conflicted copy when two or more users work on the same file. Dropbox is an example of cloud storage that does not allow the same transaction to be carried out at the same time. Concurrency enables execution of multiple threads at the same time while parallelism allows a program to do many things at the same time. Finite state machines are structured to work well for only linear control; therefore, it is hard for them to support multiple users. A mutex is designed to help finite state machines to make them able to handle threads in numerous programs. Erlang, on the other hand, can solve the problem of concurrency more straightforwardly through mutual exclusion, therefore reducing the effects of concurrency such as deadlock and starvation.

 

Introduction

Dropbox is simple to use though when two people or more work on the same file Dropbox makes two copies.  This is known as a conflicted copy; such a copy is created when two or more people work on the same file in Dropbox concurrently.  Conflicted copy can be created when two or more people edit a file in Dropbox at same time also it can happen when a user edits the file while he/she is offline while another user is working on the same file and if a file is left running on a different user’s computer the Dropbox will save that file as different file.  Database work through concurrency, by use of concurrency changes, can be made by two or more users on a; therefore, it can allow more than one transactions at the same time. Concurrency makes database unique as compared to other data storage such as a spreadsheet.  The principle used in concurrency is that edited data which has not been saved is contained in a temporary file. Other users are not able to see the changes made in the current data if the changes are not saved unless the changes are saved.

Background

Concurrency helps increase the performance of programs. In concurrent programs, it entails of execution of multiple threads at the same time. Parallelism though is a subset of concurrency it has a different meaning from concurrency since it means that program can do many things at a given time. Concurrency entails swapping threads; therefore, concurrency is possible in a processor that contains a single core. Parallelism only takes place in multiple core processors which can execute one thread at a time.  An advantage of concurrency is that it reduces the time used to work on a thread and it has to be done carefully to avoid errors in the execution of threads. Writing concurrent programs requires an external library such as OpenMPM. Concurrent programs building blocks are also an outstanding example of these blocks are Mutex, semaphores, and locks.  Concurrency in programming helps to minimize false results which are suitable to help as in the case of Dropbox.  Ability to work with mutual helps to minimize starvation or deadlocks scenarios (Peter M.Kielar, OliverHandel, Daniel H.Biedermann AndréBorrmann, 2014).

The main aim in concurrency is to ensure that transaction in the database that is used by one or more uses is sequential concurrency can solve problems such as inconsistency in multi-user database and also preserve the integrity of such data.  However, finite state machines struggle with concurrency.  Finite State Machine is structured to work well for only linear control; therefore, it is hard for them to support multiple users. Finite State Machine can decide what to execute through resource allocation (Xiaolong Liu, Ruey‐Kai Sheu, Win‐Tsung Lo, Shyan‐Ming Yuan, 2019).

Finite machines are used in event-driven software, sequential circuits among other applications. The mutex is used in finite state machines to make them able to handle threads in multiple programs. Mutex makes it possible for users in Dropbox to be able to share resources and work at a file at the same time. When a program is run, Mutex is created and given a distinguishing name. Therefore when a thread tries to work on the resource must first lock the Mutex to use the resource, after the user is through with the resources he/she unlocks the Mutex. Dropbox will, therefore, be able to support multi-users who run the same resource concurrently.

Erlang is simple to use in dealing with coherent problems. Example of this is seen in the current operating system where it can swap tasks almost behaving as if the tasks are running simultaneously. In a real sense the CPU only handles one task at a time but it can swap tasks.  Erlang was built to support concurrency which from the definition is programming language which has a general purpose (Guozhi Song, Jigang Wu, John Schormans, Laurie Cuthbert, 2014).

Erlang can attach variables to values by use of pattern matching; it is used by companies such as WhatsApp, Amazon and other companies. Although most of the programming languages can deal with the problem of concurrency bur, Erlang is best in dealing with concurrency since it deals with it in a rather more straightforward manner. In other languages such as Java multi-user programme need to be written keenly if not it leads to effects of concurrency such as deadlocks, ‘starvations’ and race conditions. What makes Erlang unique in solving concurrency problem is that it uses a process which is inbuilt and does not use threads like the other programming languages (Aris A Syntetos, Mohamed Zied Babai, Shuxin Luo, 2017).

Discussion

Erlang has the advantage to communicate through asynchronous message over the other programming languages such as Java since they are intercommunicated and self-contained. Since Erlang can communicate through asynchronous messages can reduce the effects of concurrency such as deadlock through Mutual exclusion. Erlang was developed in 1980 and that it has been able to undergo through a renaissance and it has acore processor which is multi-purpose. Erlang ability in supporting concurrent, long-running and reliable distributed systems has made it possible to solve many problems, hence a reliable feature in Dropbox.

A finite state machine is essential since they are the purest form of computing solves many problems in computing. The mutex is created to enable more than one program to take turns in sharing the same resources. A mutex is easy to implement since threads obtain them and release them after they are implemented. They can guarantee synchronicity by ensuring that the data remains consistent. However, if the thread gets the lock then it cannot execute the other commands if one command is not done also the lock can only be unlocked or locked by the person who created it.

 

Conclusion

Dropbox is cloud storage that allows sharing of files and collaborations. Dropbox is simple to use; however, they cannot support concurrency. When two people work on the same file, a conflicted paper is created. Conflicted copies can be solved by moving the file the file that you are working on out of the sync. The file appears as if it has been deleted and thus no changes can be made on that paper. Concurrency is a problem in computer science that happens when multi processes are executed and can lead to clashing. Effects of concurrency are starvation and deadlock. Erlang is a programming language that solves the problem of concurrency. Finite State Machine cannot handle more than two users, and hence Mutex is incorporated in them to solve this problem. Mutex solves the problem of Dropbox and enables users to carry out a task in the same file at the same time. Java can also be used to solve the problem of concurrency but not as good as Erlang.

 

Works Cited

Aris A Syntetos, Mohamed Zied Babai, Shuxin Luo. (2017). Forecasting of compound Erlang demand. Journal of the Operational Research Society, 2061-2074.

Guozhi Song, Jigang Wu, John Schormans, Laurie Cuthbert. (2014). Erlang’s Fixed-Point Approximation for Performance Analysis of HetNets. Journal of Applied Mathematics, 1-12.

Peter M.Kielar,OliverHandel, Daniel H.Biedermann AndréBorrmann. (2014). Concurrent Hierarchical Finite State Machines for Modeling Pedestrian Behavioral Tendencies. Transportation Research Procedia , 576-584.

Xiaolong Liu, Ruey‐Kai Sheu, Win‐Tsung Lo, Shyan‐Ming Yuan. (2019). Automatic cloud service testing and bottleneck detection system with scaling recommendation. Concurrency and Computation: Practice and Experience, 1-16.

 

Do you need high quality Custom Essay Writing Services?

Custom Essay writing Service