Explore chapters and articles related to this topic
Parallel Computing Programming Basics
Published in Vivek Kale, Parallel Computing Architectures and APIs, 2019
Scala provides several abstractions that greatly facilitate the writing of parallel code. These abstractions work by imposing constraints on the way parallelism is achieved. For instance, parallel collections force the user to phrase the computation as a sequence of operations (such as map, reduce, and filter) on collections. Actor systems require the developer to think in terms of actors that encapsulate the application state and communicate by passing messages. Static typing and type inference: Scala’s static typing system is very versatile. A lot of information as to the program’s behavior can be encoded in types, allowing the compiler to guarantee a certain level of correctness. This is particularly useful for code paths that are rarely used. A dynamic language cannot catch errors until a particular branch of execution runs, so a bug can persist for a long time until the program runs into it. In a statically typed language, any bug that can be caught by the compiler will be caught at compile time, before the program has even started running.Immutability: Having immutable objects removes a common source of bugs. Knowing that some objects cannot be changed once instantiated reduces the number of places bugs can creep in. Instead of considering the lifetime of the object, we can narrow in on the constructor.
Blockchain and Internet of Things in Healthcare Systems
Published in Chinmay Chakraborty, Digital Health Transformation with Blockchain and Artificial Intelligence, 2022
Kazeem Moses Abiodun, Emmanuel Abidemi Adeniyi, Joseph Bamidele Awotunde, Chinmay Chakraborty, Dayo Reuben Aremu, Ayodele Ariyo Adebiyi, Marion Olubunmi Adebiyi
Immutable. Immutable refers to something that cannot be altered. It is a key aspect of blockchain that blocks cannot be modified. The concept of proof of work is used to achieve immutability. Mining is used to achieve proof of work, and the miner’s job is to modify the nonce. A nonce is a randomly generated value that is smaller than the intended hash value to provide a single hash address for the block. The chances of calculating evidence of work are quite slim. To provide credible proof of labour, many experiments must be conducted. When an attacker gains control of more than 51% of the nodes at the same time, there is only one way to change the block [31].
Software design for building model servers: Concurrency aspects
Published in Manuel Martínez, Raimar Scherer, eWork and eBusiness in Architecture, Engineering and Construction, 2020
Our implementation uses immutable objects whenever reasonably possible. Immutability is an effective technique to prevent concurrency problems: the state of an immutable object is fixed at creation time and cannot be altered throughout the object’s lifecycle. This completely eliminates any risk of access conflicts. References to such objects may be shared freely between concurrent threads. There is, however, a trade-off between synchronisation cost and object creation cost.
Evaluation of project completion time prediction accuracy in a disrupted blockchain-enabled project-based supply chain
Published in International Journal of Systems Science: Operations & Logistics, 2023
Blockchain is a secure, distributed, shared database for recording transactions among parties. The blockchain is consensually updated with the functionality of autonomous execution of a predefined set of rules based on a set of conditions known as smart contracts. Smart contracts can simplify processes and reduce transaction costs in supply chains (Prause, 2019). BCT has several advantages over conventional distributed databases. BCT offers enhanced data security, which is vital for companies and individuals (Y. Chang et al., 2020). Additionally, immutable data offers data integrity, simplified auditing, and increased efficiency. The immutability of records and computational logic are facilitated through blockchain's unique cryptographic data structure and consensus algorithms. BCT also eliminates the third party, such as administrators and intermediaries (Uddin, 2021). Permissioned access in private blockchain networks prevents third parties from accessing certain information.