The document discusses the behavior of posixlk locks in Glusterfs. Posixlk locks allow overlapping locks from the same client or owner to be merged into a single lock. If the ranges overlap but are from different clients, the locks are not granted. The document provides examples of how posixlk locks differ from inodelks and includes a link about critiques of posix locks.
Javascripts hidden treasures BY - https://geekyants.com/Geekyants
Closures and hoisting are hidden features in JavaScript that can cause confusion. Closures allow functions to access variables from outer scopes even after they have returned. Hoisting refers to variables and functions being declared at the top of their scope before code execution. Understanding closures and hoisting can help explain unexpected behavior, such as functions running before they are defined or variables printing undefined values.
This document discusses callback functions in JavaScript. A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action. Callback functions allow asynchronous code execution in JavaScript by performing tasks without blocking subsequent code from running. Common examples of callbacks include functions used in event handling and asynchronous operations like AJAX requests.
In these slide i have tried to explains an interesting topic of programming, which is always a topic of discussion among programmers that is "variables and objects are passed-by-value or passed-by-reference in Java?" These slides will prove that Java is completely pass-by-value thing. There is nothing like pass-by-reference in Java.
This document discusses polymorphism in object-oriented programming. It defines polymorphism as the ability for different classes to share a common interface and explains that it is commonly achieved through inheritance. The document then covers different types of polymorphism like static and dynamic, and mechanisms like function overloading, overriding, early and late binding, and pure virtual functions.
Brief explanation of javascript language for intermediates
Topics Covered
~ Why do we need javascript
~ javascript vs traditional language
~ functions and objects ( sample code )
~ prototypal inheritance ( sample code )
~ variable scope ( sample code )
~ closure (sample code )
~ callbacks
~ events
~ the confusion of 'this'
~ popular frameworks
This document provides an overview of the Erlang programming language. It discusses that Erlang is a general purpose, concurrent, functional programming language developed at Ericsson for building distributed, fault-tolerant systems. It notes some of Erlang's key uses in telecommunications, banking, messaging, and e-commerce where high-availability is required. The document also summarizes that Erlang uses processes instead of threads to enable concurrency, and that it relies on recursion rather than loops for iteration due to its functional nature.
The document discusses the behavior of posixlk locks in Glusterfs. Posixlk locks allow overlapping locks from the same client or owner to be merged into a single lock. If the ranges overlap but are from different clients, the locks are not granted. The document provides examples of how posixlk locks differ from inodelks and includes a link about critiques of posix locks.
Javascripts hidden treasures BY - https://geekyants.com/Geekyants
Closures and hoisting are hidden features in JavaScript that can cause confusion. Closures allow functions to access variables from outer scopes even after they have returned. Hoisting refers to variables and functions being declared at the top of their scope before code execution. Understanding closures and hoisting can help explain unexpected behavior, such as functions running before they are defined or variables printing undefined values.
This document discusses callback functions in JavaScript. A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action. Callback functions allow asynchronous code execution in JavaScript by performing tasks without blocking subsequent code from running. Common examples of callbacks include functions used in event handling and asynchronous operations like AJAX requests.
In these slide i have tried to explains an interesting topic of programming, which is always a topic of discussion among programmers that is "variables and objects are passed-by-value or passed-by-reference in Java?" These slides will prove that Java is completely pass-by-value thing. There is nothing like pass-by-reference in Java.
This document discusses polymorphism in object-oriented programming. It defines polymorphism as the ability for different classes to share a common interface and explains that it is commonly achieved through inheritance. The document then covers different types of polymorphism like static and dynamic, and mechanisms like function overloading, overriding, early and late binding, and pure virtual functions.
Brief explanation of javascript language for intermediates
Topics Covered
~ Why do we need javascript
~ javascript vs traditional language
~ functions and objects ( sample code )
~ prototypal inheritance ( sample code )
~ variable scope ( sample code )
~ closure (sample code )
~ callbacks
~ events
~ the confusion of 'this'
~ popular frameworks
This document provides an overview of the Erlang programming language. It discusses that Erlang is a general purpose, concurrent, functional programming language developed at Ericsson for building distributed, fault-tolerant systems. It notes some of Erlang's key uses in telecommunications, banking, messaging, and e-commerce where high-availability is required. The document also summarizes that Erlang uses processes instead of threads to enable concurrency, and that it relies on recursion rather than loops for iteration due to its functional nature.
Polymorphism allows objects of different types to be treated as objects of a general type. There are two main types: static polymorphism achieved through function overloading and operator overloading at compile time, and dynamic polymorphism achieved through virtual functions and overridden functions at runtime. Virtual functions allow late binding where the function called depends on the object type. Pure virtual functions must be defined in derived classes.
Asynchronous JavaScript Programming with Callbacks & PromisesHùng Nguyễn Huy
This presentation is about JavaScript Promise. Topics covered in this session are:
1. Asynchronous processing in JavaScript
2. Callbacks and Callback hell
3. Promises arrive in JavaScript!
4. Constructing a Promise
5. Promise states
6. Promises chaining and transformation
7. Error handling
8. Promise.all() and Promise.race()
This document defines and discusses the concept of connascence in software engineering. Connascence refers to the degree to which software components are coupled or connected to each other. There are different types of connascence, including static connascence relating to names, types, meanings, positions, and algorithms, as well as dynamic connascence relating to execution, time, values, and identity. Connascence has properties like strength, locality, and degree that describe how tightly or widely connected the components are. Understanding different types and properties of connascence can help design and maintain more loosely coupled and maintainable software systems.
An actor is an object that receives messages and takes actions to handle them. It is decoupled from the source of the message and its only responsibility is to properly recognise the type of message it has received and take action accordingly.
The document discusses various approaches to asynchronous programming including threading, callbacks, promises/futures, reactive extensions, and Kotlin coroutines. It notes challenges with threading like state mutations and limited operating system support. Callbacks are described as complex to handle errors. Promises/futures and reactive extensions introduce new paradigms. Coroutines allow the same way of thinking and code structures for both synchronous and asynchronous operations using suspendable functions.
Glusterfs session #18 intro to fuse and its trade offsPranith Karampuri
This document discusses FUSE (Filesystem in Userspace) and its implementation in the Gluster filesystem. It provides an overview of the FUSE protocol, including the message structure used between the kernel and userspace FUSE servers. It also describes the different parts of the Gluster codebase that relate to FUSE and discusses some of the tradeoffs of using the libfuse library versus implementing FUSE functionality from scratch.
Glusterfs session #16 self-heal daemon ( for replication)Pranith Karampuri
This session covers introduction to self-heal daemon for replication, and the types of crawls self-heal daemon does to make sure the volume is always replicated in cases of failures. Code walk through of the necessary functions that do both index and full crawl are covered in detail.
The document discusses optimizations to reduce network communication for update transactions in Glusterfs replication. It describes the current 5 stages of transactions and proposes optimizations like eager-locking files to delay post-operations, and skipping pre-operation stages for metadata transactions to reduce network operations from 5 to closer to 1. The document ends with an invitation for questions.
Replicate xlator graph placement
- on-disk data representation
- On-disk data manipulation with xattrop
- Common functioning of fops
- Lookup
- Open
- readdir/readdirp
- Flush
- Statfs
Locks xlator provides file locking in GlusterFS to synchronize data modifications between clients. It supports inode and entry locks with different domains for synchronization. Locks xlator works by taking and releasing locks via fops using a lock owner and domain. Internal locks are implemented as inodelk ranges on an inode with overlapping locks blocked between different clients/owners. Locks are cleared on client disconnect.
The index xlator is needed to efficiently identify files and directories that require healing without doing a full filesystem scan. It maintains indices on each brick in the .glusterfs/indices directory to track files and directories that are dirty, undergoing changes, or need healing. The main consumers are self-heal daemons that check the indices periodically to perform any needed healing. Future improvements could involve a hierarchical index structure to improve performance if the number of indexed entries grows very large.
Glusterfs Session #8 discusses memory tracking infrastructure in Gluster to identify memory leaks, using statedumps to analyze leaking structures, how io-thread bricks scale with file operations, and future improvements for io-threads. Specifically, it outlines how Gluster enumerates data structures to track memory allocations and deallocations, how statedumps can be interpreted to find leaks, why io-threads are used and how they could prioritize different operation priorities or use thread pools.
- The document discusses client, server interactions in Glusterfs, including client connection, disconnection, and reconnection.
- When a client connects, it first connects to glusterd to get the port for the brick, then connects to the brick to perform operations. On disconnection, resources are cleaned up and reconnection is attempted every 3 seconds.
- During reconnection, the client tries to recover resources like open file descriptors by reopening them, though locks are not currently restored.
- Inodes (inode_t) represent files and directories in the filesystem. They are created and linked into an inode table when files/directories are accessed. Inodes transition between active, LRU, and purge lists over time.
- File descriptors (fd_t) represent open files and directories. They are allocated from an fd table when files are opened and destroyed when files are closed. On network disconnects, open files for disconnected clients are cleaned up.
- Tools are provided to debug reference count leaks for inodes and file descriptors.
Glusterfs session #4 call frame and programming modelPranith Karampuri
Glusterfs uses an asynchronous programming model where each component (xlator) calls into the next using STACK_WIND, passing a callback. The next xlator performs its task and then callbacks the original using STACK_UNWIND. This non-blocking approach prevents any xlator from blocking on network operations. Key data structures like the call_frame track the asynchronous call and callback between xlators, maintaining a stack. Debugging information within frames helps track errors like frame loss or stuck operations.
Glusterfs modules are organized as a set of modules called xlators. Xlators implement a common interface and can be arranged in graphs to process file operations. A volfile is used to define the xlator graph and instantiate glusterfs processes. The xlator graph is constructed from the volfile and activated by initializing each xlator, notifying parents and waiting for children. Protocol xlators translate external protocols like FUSE, NFS, and GFAPI to the common glusterfs file operation interface.
Glusterfs session #2 1 layer above disk filesystemsPranith Karampuri
This presentation contains the slides used for second dev-session about gluster which talks about layer above disk filesystem i.e. posix layer in glusterfs
This document provides an overview of disk filesystems and network filesystems from the perspective of GlusterFS. It discusses the basic data structures of files and directories, including inodes, data blocks, and representation of different file types. It also outlines the main Linux system calls used to manipulate filesystem metadata and data, such as read, write, truncate, and directory operations. These calls can operate on files via paths, file descriptors, or directory file descriptors.
Polymorphism allows objects of different types to be treated as objects of a general type. There are two main types: static polymorphism achieved through function overloading and operator overloading at compile time, and dynamic polymorphism achieved through virtual functions and overridden functions at runtime. Virtual functions allow late binding where the function called depends on the object type. Pure virtual functions must be defined in derived classes.
Asynchronous JavaScript Programming with Callbacks & PromisesHùng Nguyễn Huy
This presentation is about JavaScript Promise. Topics covered in this session are:
1. Asynchronous processing in JavaScript
2. Callbacks and Callback hell
3. Promises arrive in JavaScript!
4. Constructing a Promise
5. Promise states
6. Promises chaining and transformation
7. Error handling
8. Promise.all() and Promise.race()
This document defines and discusses the concept of connascence in software engineering. Connascence refers to the degree to which software components are coupled or connected to each other. There are different types of connascence, including static connascence relating to names, types, meanings, positions, and algorithms, as well as dynamic connascence relating to execution, time, values, and identity. Connascence has properties like strength, locality, and degree that describe how tightly or widely connected the components are. Understanding different types and properties of connascence can help design and maintain more loosely coupled and maintainable software systems.
An actor is an object that receives messages and takes actions to handle them. It is decoupled from the source of the message and its only responsibility is to properly recognise the type of message it has received and take action accordingly.
The document discusses various approaches to asynchronous programming including threading, callbacks, promises/futures, reactive extensions, and Kotlin coroutines. It notes challenges with threading like state mutations and limited operating system support. Callbacks are described as complex to handle errors. Promises/futures and reactive extensions introduce new paradigms. Coroutines allow the same way of thinking and code structures for both synchronous and asynchronous operations using suspendable functions.
Glusterfs session #18 intro to fuse and its trade offsPranith Karampuri
This document discusses FUSE (Filesystem in Userspace) and its implementation in the Gluster filesystem. It provides an overview of the FUSE protocol, including the message structure used between the kernel and userspace FUSE servers. It also describes the different parts of the Gluster codebase that relate to FUSE and discusses some of the tradeoffs of using the libfuse library versus implementing FUSE functionality from scratch.
Glusterfs session #16 self-heal daemon ( for replication)Pranith Karampuri
This session covers introduction to self-heal daemon for replication, and the types of crawls self-heal daemon does to make sure the volume is always replicated in cases of failures. Code walk through of the necessary functions that do both index and full crawl are covered in detail.
The document discusses optimizations to reduce network communication for update transactions in Glusterfs replication. It describes the current 5 stages of transactions and proposes optimizations like eager-locking files to delay post-operations, and skipping pre-operation stages for metadata transactions to reduce network operations from 5 to closer to 1. The document ends with an invitation for questions.
Replicate xlator graph placement
- on-disk data representation
- On-disk data manipulation with xattrop
- Common functioning of fops
- Lookup
- Open
- readdir/readdirp
- Flush
- Statfs
Locks xlator provides file locking in GlusterFS to synchronize data modifications between clients. It supports inode and entry locks with different domains for synchronization. Locks xlator works by taking and releasing locks via fops using a lock owner and domain. Internal locks are implemented as inodelk ranges on an inode with overlapping locks blocked between different clients/owners. Locks are cleared on client disconnect.
The index xlator is needed to efficiently identify files and directories that require healing without doing a full filesystem scan. It maintains indices on each brick in the .glusterfs/indices directory to track files and directories that are dirty, undergoing changes, or need healing. The main consumers are self-heal daemons that check the indices periodically to perform any needed healing. Future improvements could involve a hierarchical index structure to improve performance if the number of indexed entries grows very large.
Glusterfs Session #8 discusses memory tracking infrastructure in Gluster to identify memory leaks, using statedumps to analyze leaking structures, how io-thread bricks scale with file operations, and future improvements for io-threads. Specifically, it outlines how Gluster enumerates data structures to track memory allocations and deallocations, how statedumps can be interpreted to find leaks, why io-threads are used and how they could prioritize different operation priorities or use thread pools.
- The document discusses client, server interactions in Glusterfs, including client connection, disconnection, and reconnection.
- When a client connects, it first connects to glusterd to get the port for the brick, then connects to the brick to perform operations. On disconnection, resources are cleaned up and reconnection is attempted every 3 seconds.
- During reconnection, the client tries to recover resources like open file descriptors by reopening them, though locks are not currently restored.
- Inodes (inode_t) represent files and directories in the filesystem. They are created and linked into an inode table when files/directories are accessed. Inodes transition between active, LRU, and purge lists over time.
- File descriptors (fd_t) represent open files and directories. They are allocated from an fd table when files are opened and destroyed when files are closed. On network disconnects, open files for disconnected clients are cleaned up.
- Tools are provided to debug reference count leaks for inodes and file descriptors.
Glusterfs session #4 call frame and programming modelPranith Karampuri
Glusterfs uses an asynchronous programming model where each component (xlator) calls into the next using STACK_WIND, passing a callback. The next xlator performs its task and then callbacks the original using STACK_UNWIND. This non-blocking approach prevents any xlator from blocking on network operations. Key data structures like the call_frame track the asynchronous call and callback between xlators, maintaining a stack. Debugging information within frames helps track errors like frame loss or stuck operations.
Glusterfs modules are organized as a set of modules called xlators. Xlators implement a common interface and can be arranged in graphs to process file operations. A volfile is used to define the xlator graph and instantiate glusterfs processes. The xlator graph is constructed from the volfile and activated by initializing each xlator, notifying parents and waiting for children. Protocol xlators translate external protocols like FUSE, NFS, and GFAPI to the common glusterfs file operation interface.
Glusterfs session #2 1 layer above disk filesystemsPranith Karampuri
This presentation contains the slides used for second dev-session about gluster which talks about layer above disk filesystem i.e. posix layer in glusterfs
This document provides an overview of disk filesystems and network filesystems from the perspective of GlusterFS. It discusses the basic data structures of files and directories, including inodes, data blocks, and representation of different file types. It also outlines the main Linux system calls used to manipulate filesystem metadata and data, such as read, write, truncate, and directory operations. These calls can operate on files via paths, file descriptors, or directory file descriptors.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
How to Manage Your Lost Opportunities in Odoo 17 CRMCeline George
Odoo 17 CRM allows us to track why we lose sales opportunities with "Lost Reasons." This helps analyze our sales process and identify areas for improvement. Here's how to configure lost reasons in Odoo 17 CRM
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
2. Scope
- What is the behavior of entrylks
- Code walk through of entrylks
- Dependency of entrylk, inodelk
- Optimization of the interaction
3. Behavior of entrylks
- To recap, entrylks are used to synchronize entry operations on directories.
- In inodelks range(offset, length) is what we synchronize on. In entrylks we
synchronize on the name.
- In entrylks NULL name represents full directory lock
4. Behavior of entrylks
If names are different they are granted irrespective of the lk-owner/client
Directory dir1
Name1 Name2
Directory: dir1
5. Behavior of entrylks
If names are conflicting they are not granted if the lk-owner/client differs
Directory dir1
Name1 Name1
Directory: dir1
6. Behavior of entrylks
If names are conflicting they are not granted if the lk-owner/client differs
Directory dir1
Name1 NULL(value)
Directory: dir1
7. Behavior of entrylks
If names are not conflicting they are granted if the lk-owner, client matches
Directory dir1
Name1 Name1
Directory: dir1
8. Behavior of entrylks
If names are same they are granted if the lk-owner, client matches
Directory dir1
Name1 NULL(value)
Directory: dir1
10. Dependency of entrylk, inodelk
- When doing parallel operations on EC, we sometimes faced this issue where
by the time inode is going to be unlocked, entry is already removed leading to
issues while doing operations on the inode
- https://github.com/gluster/glusterfs/issues/990
- There was no synchronization between entry operations and inode operations