Changeset 4943
- Timestamp:
- Sep 1, 2005, 6:20:29 PM (21 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
Nebulous-Server/docs/design.txt (modified) (2 diffs)
-
Nebulous-Server/docs/setup.txt (modified) (2 diffs)
-
Nebulous/docs/design.txt (modified) (2 diffs)
-
Nebulous/docs/setup.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/docs/design.txt
r2785 r4943 1 # Cop ryight (C) 2004Joshua Hoblitt1 # Copyright (C) 2004-2005 Joshua Hoblitt 2 2 # 3 # $Id: design.txt,v 1.1.1.1 2004-12-22 02:16:23 jhoblitt Exp $ 4 5 Terminology 6 -- 7 - Storage Object 8 There is one Storage Object per resource (a file) that is being managed by the 9 IPP Pixel Data Server. A Storage Object maps an External Identifier (eg. 10 file name) to a Storage ID that is internal to the IPP Pixel Data Server. In 11 addition, creation time and comments may be stored in a Storage Object. 12 Storage Objects /do not/ contain the storage location of a resource as we need 13 to allow for N copies of a resource to be stored. The actual storage location 14 of a resource is held in a Storage Object Instance, which maps to a Storage ID 15 in a many-to-one relationship. 16 17 - [Storage Object] Instance 3 # $Id: design.txt,v 1.2 2005-09-02 04:20:29 jhoblitt Exp $ 4 5 Overview 6 -- 7 8 Nebulous is a user-space distributed object (file) storage system. The system 9 is distributed in the sense of it's data storage model where objects are stored 10 across a number of storage volumes and may have redundant copies. While IPC 11 is done in the traditional client/server model with a single[1] centralized 12 server containing all storage object meta-data. This system was designed, 13 unlike most distributed filesystems, specifically so that Nebulous clients 14 could also host one or more storage volumes. Although, there is no requirement 15 that clients also provide storage space. If you so choose, clients and the 16 storage volumes can reside on independent hardware. 17 18 There are 4 principle components required for a working Nebulous system; 19 server, client, data transport, and data storage. The Nebulous system only 20 provides the server and the client software. Data transport[2] and Data 21 storage are left to 3rd party software packages. As this function is typically 22 included with most operation system it is unlikely that those specific 23 technologies can be improved upon. 24 25 [1] Multiple Nebulous servers should be possible via database replication. 26 [2] A future version of Nebulous may include it's own data transport layer 27 based on the WEB DAV protocol. 28 29 Client <-> Server IPC 30 -- 31 32 The Nebulous Server and clients communicate via the SOAP protocol. Since SOAP 33 is platform independent this allows native Nebulous client to be written in a 34 variety of languages. With in the Nebulous Server itself the IPC mechanism is 35 abstracted to allow ether multi-protocol support or complete replacement of 36 SOAP by another protocol. 37 38 XXX SOAP namespace 39 40 Data model 41 -- 42 43 In Nebulous terminology a file is refereed to as a a resource. Each resource 44 is represented inside the Nebulous Server as a "Storage Object". There is one 45 Storage Object per resource (a file) that is being managed by the Nebulous 46 Server. A Storage Object maps an External Identifier (eg. filename) to a 47 Storage ID. In addition, creation time and comments may be stored in a 48 Storage Object. Storage Objects /do not/ contain the storage location of a 49 resource as we need to allow for N copies of a resource to be stored. The 50 actual storage location of a resource is held in a Storage Object Instance, 51 which maps to a Storage ID in a many-to-one relationship. 52 18 53 A Storage Object Instance, or just Instance, represents a single copy of a 19 resource being managed by the IPP Pixel Data Server. An Instance contains an 20 Instance ID, the location of the resource as a URI, a checksum of the 21 resource, a Storage ID, a read lock semaphore (unsigned integer), a write lock 22 mutex (enum( 'write', 'wait', 'free' ) - is this better then using an int and 23 constants?), and a UTC timestamp of the last modification date & time. 24 25 - Lock Record 26 A Lock Record is used to double check the indicated lock state of an Instance 27 and can be used to identify system failures. It must contain the Instance ID 28 of of the locked instance and the type of lock, eg, enum( 'read', 'write'). 54 resource being managed by the Nebulous Server. An Instance contains an 55 Instance ID, the parent Storage ID, the location of the resource as a URI, and 56 other assorted meta-data. 57 58 Storage IDs are a signed 64-bit integer. Negative values are considered 59 reserved for future use. Allocation should be incremental and, as we are 60 unlikely to exceed 2^63 Storage Objects in the life time of the project, never 61 reused. Instance IDs follow the same scheme as Storage IDs but exists in a 62 unique namespace. 63 64 Database record relationships 65 -- 66 * All Storage Objects must have at least once associated Instance. 67 68 * All Instances must be associated with a Storage Object. 69 70 * All Instances must be associated with a valid URI (file exists). 71 72 * All Storage Objects with locks set must have the correct number of 73 corresponding Lock Records. 74 75 * All Lock Records must be associated with a Storage Object. 76 77 Data transport 78 -- 79 XXX 80 81 Data Storage 82 -- 83 XXX 84 85 Storage volume state tracking. 86 87 Nebulous itself does not attempt to determine the state of storage volumes. 88 Instead, it relies on some 3rd party to determine both the state 89 (available/not) and capacity (total size + % utilized). This information is 90 then feed into Nebulous via either the administrative API or CLI management 91 tools. 92 93 XXX Storage Location determination 94 29 95 30 96 Locking semantics 31 97 -- 32 A lock is required to either read from or write to a Storage Object Instance 33 being managed by the IPP Pixel Data Server. Stated another way, locking 34 granularity is managed on the level of Storage Object Instances instead of on 35 the more abstract Storage Objects. Although, from the client perspective, 36 operations are carried out on a Storage Object. The locking state of a 37 Storage Object Instance is maintained by in the Storage Object Instance and a 38 Lock Record. 39 40 Two types of locks are used on an Instance, a semaphore is used to track read 41 locks and an exclusive mutex is for write locking. 98 Nebulous uses 'advisory locking' where clients are excepted to check for the 99 existence of locks but this policy is not enforced. Locks are set on a 100 Storage Object and apply to all Instances of that object. 101 102 Two types of locks can be set; 'read' locks and 'write' locks. Read locks are 103 implemented as a semaphore while write locks use an exclusive mutex. 42 104 43 105 - Read lock 44 In order to read from a Storage Object Instance the Read Lock semaphore must 45 first be incremented by one and a Lock Record created. After the read is 46 completed the Lock Record must be deleted and the Read Lock semaphore 47 decremented by one. The incrementation of the Read Lock and Lock Record 48 creation or the decrementation of the Read Lock and the Lock Record deletion 49 must happen atomically. A Read lock can not be aquired unless the Write mutex 50 is in the state of 'free'. If a Read lock can not be aquired, a client must 51 not "spin lock" on the Instanace ID as it may be in the process of being 52 removed. Instead, the "spin lock" should be re-resolving the external 53 identifier to a Storage ID, and the Storage ID to Storage Instances. 106 In order to obtain a Read Lock on a Storage Object the Write Lock mutex must 107 be in the state of 'free'. When a Read Lock is acquire the Read semaphore is 108 incremented by one. When a Read Lock is released the Read semaphore is 109 decremented by one. This must happen atomically with the 110 creation/destruction of a Lock Record. 54 111 55 112 - Write lock 56 In order to obtain a Write lock on a Storage Object Instance the Write Lock 57 mutex must be in the state of 'free' and the Read lock semaphore must have a 58 value of zero. A client should either "spin lock" or fail if all the Lock 59 mutex is set or the Read Semaphore has a non-zero value. A Lock Record must 60 be created atomically with the setting of the Write mutex. The setting of the 61 Write mutex and Lock Record insertion or the clearing of the Write mutex and 62 the Lock Record deletion must happen atomically. If the Write lock has a 63 state of 'free' and the Read lock has a non-zero value, the Write lock may be 64 set to the 'wait' state to prevent new Read locks from being aquired. 65 66 Storage Object Operations 67 -- 68 - Add 69 The resource must already be on disk (having been named through some sort of 70 mechanism to generate new filenames). A new Storage Object must be created with a new/unqiue Storage ID and has 71 an associated with an External Identifier. At least one Instance must be 72 created atomicaly at the same time. Each new Instance must be initially created with a Write lock. 73 The resource may then be written to it's storage location. When the writing 74 of the resource is completed the Write lock must be cleared as early as is 75 feasible. The association of an External Identifier must wait until Instance 76 creation is completed 77 78 - Delete 79 In order to remove a Storage Object, a Write lock must be obtained on 80 /all/ associated Instances. Then the resources are removed. As each resource 81 is deleted the corresponding Instance must be deleted. After all Instances are 82 removed the Storage Object must then be deleted. 83 84 - Update 85 Storage Object Instances are not truly written to. Instead, a new set of 86 Storage Object Instances and a new Storage Object are created in parallel. 87 88 Write locks must be aquired on all the orignal Intances of a Storage Object. 89 Then an Add operation is performed to create a new Storage Object and 90 associated Instances. Then the External Identifier must be atomically moved 91 from the original Storage Object to the new Storage Object. After the 92 External Identifier migration, the original Storage Object and it's Instances 93 should be removed with a special case of the Delete operation (one that will 94 operate on already held locks). If the old Storage Object is merely 95 abandoned, ie. it still exists but doesn't have an External Identifier, it and 96 the associated Instances will be removed during the next Consistency Sweep. 97 If a Delete is not peformed, the Write locks on the orignal Instances must be 98 released. [use a dead Storage Object table or flag, similar to mark and sweep 99 garbage collection?] 100 101 - Move 102 This is the same operation as an Update except the new Instances are identical 103 to the old. 104 105 - Open 106 Sets a Read lock on an Instances of a Storage Object and determines it's 107 storage location. A Read lock must only be placed on one Instance of a 108 Storage Object. All Instances of a Storage Object should be iterated through 109 in a "spin lock" until a Read lock is aquired. 110 111 - Close 112 Releases a Read lock aquired with open. 113 114 The lock must be released as soon as is feasible. 115 116 Lock sweeping 117 -- 113 In order to obtain a Write lock on a Storage Object the Write Lock mutex must 114 be in the state of 'free' and the Read lock semaphore must have a value of 115 zero. When a Write Lock is acquired the Write mutex is set to 'write'. When a 116 Write Lock is released the Write mutex is set to to 'free'. This must happen 117 atomically with the creation/destruction of a Lock Record. As an extension, a 118 sate of 'wait' may be implemented such that clients waiting on Read Locks to 119 be released may prevent any additional Read Locks from being acquired. 120 121 XXX Lock Records are currently unimplemented 122 - Lock Records A Lock Record is used to double check the indicated lock 123 state of a Storage Object and can be used to identify logical system 124 errors. A Lock Record contains the Storage ID of the object and the type of 125 lock set. eg, enum( 'read', 'write'). 126 127 - Client best practices 128 When attempting to acquire a lock a client should either "spin lock" with a 129 reasonable pause between lock attempts or fail completely. Aggressive "spin 130 locking" is considered antisocial and may eventually require the Nebulous 131 Server to identify and ignore such clients. 132 133 134 House keeping 135 -- 136 - Lock sweeping 118 137 In the event that a Storage Object operation fails to complete successfully 119 138 stale locks will have to be identified and removed from the IPP Pixel Data … … 129 148 Record entries themselves must be removed from the lock table. 130 149 131 Consistency sweeping 132 -- 150 - Consistency sweeping 133 151 Periodically the IPP Pixel Data Server meta-data and Storage Object will need 134 152 to be checked for sanity. This would be similar to running fsck on a modern 135 153 filesystem. Consistency sweeping should include Lock sweeping and should be 136 considered a superset. 137 138 All Storage Objects must have at least once associated Instance. 139 140 All Storage Object Instances must be associated with a Storage Object. 141 142 All Storage Object Instances with a lock set must have the correct number of 143 corresponding Lock Records. 144 145 All Lock Records must be plausible, ie. the Instance pointed at must be in a 146 corresponding state. 147 148 Storage ID Allocation 149 -- 150 Storage IDs are a signed 64-bit integer. Negative values are considered 151 reserved for future use. Allocation should be incremental and, as we are 152 unlikely to exceed 2^63 Storage Objects in the life time of the project, never 153 reused. 154 155 Allocated via [SQL auto-increment/stored procedure/app server?] 156 157 Instance ID Allocation 158 -- 159 Indentical to a Storage ID but exists in a unique namespace. 160 161 Storage Location determination 162 -- 163 ??? 154 considered a super-set. 155 156 157 Server Operations 158 -- 159 - setup 160 - create_object 161 - rename_object 162 XXX unimplemented 163 - replicate object 164 - lock_object 165 - unlock_object 166 - find_instances 167 - delete_instance 168 - split_instance 169 XXX unimplemented 170 - stat_object 171 - stat_instance 172 XXX unimplemented 173 174 Client Operations 175 -- 176 - create 177 Creates and opens new Storage Object 178 179 - replicate 180 Adds an Instance to a Storage Object 181 182 - cull 183 Removes an Instance from a Storage Object 184 185 This operation can not remove the last Instance of a Storage Object. 186 187 - lock 188 Trys to acquire a lock on a storage object 189 190 This operation times out after a default interval of 10s. 191 192 - unlock 193 Trys to release a lock on a storage object 194 195 - find_instances 196 Find all instances of a storage object 197 198 Only Instances on active storage volumes are found. 199 200 - find 201 Find any instance of a storage object 202 203 Only Instances on active storage volumes are found. 204 205 - open 206 Open a storage object for read or write 207 208 Opening a storage object as 'write' will remove all but one Instance to 209 prevent Instances from becoming inconsistent. 210 211 - delete 212 Delete a storage object and all of it's instances 213 214 Removes a storage object and all of it's instances by sequentially deleting each 215 Instance. When a Storage Object has no more associated instances it is 216 automatically removed by the Nebulous server. 217 218 - copy 219 Copy a storage object 220 221 The new storage object will be created with only one Instance. Most properties 222 of the source Storage Object will be preserved. 223 224 - move 225 Rename a storage object 226 227 Currently this operation will remove all but one instance of the storage 228 object and may change it's storage location. 229 230 - delete_instance 231 232 Remove a storage object instance 233 234 Removing the last Instance of a Storage Object will destroy the Storage 235 Object. 236 237 - stat 238 View the properties of a storage object 239 240 241 - import 242 XXX unimplemented 243 Import a file into Nebulous 244 245 Creates a new Storage Object with the specified External Identifier. The 246 source file will then be "copied" into the Nebulous system leaving the original 247 file unmodified. 248 249 - fission 250 XXX unimplemented 251 Create a new Storage Object from an existing one by either splitting off an 252 Instance and re-parenting it or by cloning an existing Instance and associating 253 it with the new Storage Object. -
trunk/Nebulous-Server/docs/setup.txt
r4921 r4943 25 25 mkdir /po03/nebulous 26 26 mkdir /po04/nebulous 27 chown nobody:nebulous /po0?/nebulous 28 chmod 0770 /po0?/nebulous 27 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; mkdir "/$i/nebulous" }' 28 chown nobody:nebulous /po??/nebulous 29 chmod 0770 /po??/nebulous 30 ls -lad /po??/nebulous 29 31 30 32 =head2 Build and install the Nebulous Perl modules (see: README) … … 174 176 neb-addvol --name po03 --uri file:/po03/nebulous 175 177 neb-addvol --name po04 --uri file:/po04/nebulous 178 179 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }' 176 180 . 177 181 . -
trunk/Nebulous/docs/design.txt
r2785 r4943 1 # Cop ryight (C) 2004Joshua Hoblitt1 # Copyright (C) 2004-2005 Joshua Hoblitt 2 2 # 3 # $Id: design.txt,v 1.1.1.1 2004-12-22 02:16:23 jhoblitt Exp $ 4 5 Terminology 6 -- 7 - Storage Object 8 There is one Storage Object per resource (a file) that is being managed by the 9 IPP Pixel Data Server. A Storage Object maps an External Identifier (eg. 10 file name) to a Storage ID that is internal to the IPP Pixel Data Server. In 11 addition, creation time and comments may be stored in a Storage Object. 12 Storage Objects /do not/ contain the storage location of a resource as we need 13 to allow for N copies of a resource to be stored. The actual storage location 14 of a resource is held in a Storage Object Instance, which maps to a Storage ID 15 in a many-to-one relationship. 16 17 - [Storage Object] Instance 3 # $Id: design.txt,v 1.2 2005-09-02 04:20:29 jhoblitt Exp $ 4 5 Overview 6 -- 7 8 Nebulous is a user-space distributed object (file) storage system. The system 9 is distributed in the sense of it's data storage model where objects are stored 10 across a number of storage volumes and may have redundant copies. While IPC 11 is done in the traditional client/server model with a single[1] centralized 12 server containing all storage object meta-data. This system was designed, 13 unlike most distributed filesystems, specifically so that Nebulous clients 14 could also host one or more storage volumes. Although, there is no requirement 15 that clients also provide storage space. If you so choose, clients and the 16 storage volumes can reside on independent hardware. 17 18 There are 4 principle components required for a working Nebulous system; 19 server, client, data transport, and data storage. The Nebulous system only 20 provides the server and the client software. Data transport[2] and Data 21 storage are left to 3rd party software packages. As this function is typically 22 included with most operation system it is unlikely that those specific 23 technologies can be improved upon. 24 25 [1] Multiple Nebulous servers should be possible via database replication. 26 [2] A future version of Nebulous may include it's own data transport layer 27 based on the WEB DAV protocol. 28 29 Client <-> Server IPC 30 -- 31 32 The Nebulous Server and clients communicate via the SOAP protocol. Since SOAP 33 is platform independent this allows native Nebulous client to be written in a 34 variety of languages. With in the Nebulous Server itself the IPC mechanism is 35 abstracted to allow ether multi-protocol support or complete replacement of 36 SOAP by another protocol. 37 38 XXX SOAP namespace 39 40 Data model 41 -- 42 43 In Nebulous terminology a file is refereed to as a a resource. Each resource 44 is represented inside the Nebulous Server as a "Storage Object". There is one 45 Storage Object per resource (a file) that is being managed by the Nebulous 46 Server. A Storage Object maps an External Identifier (eg. filename) to a 47 Storage ID. In addition, creation time and comments may be stored in a 48 Storage Object. Storage Objects /do not/ contain the storage location of a 49 resource as we need to allow for N copies of a resource to be stored. The 50 actual storage location of a resource is held in a Storage Object Instance, 51 which maps to a Storage ID in a many-to-one relationship. 52 18 53 A Storage Object Instance, or just Instance, represents a single copy of a 19 resource being managed by the IPP Pixel Data Server. An Instance contains an 20 Instance ID, the location of the resource as a URI, a checksum of the 21 resource, a Storage ID, a read lock semaphore (unsigned integer), a write lock 22 mutex (enum( 'write', 'wait', 'free' ) - is this better then using an int and 23 constants?), and a UTC timestamp of the last modification date & time. 24 25 - Lock Record 26 A Lock Record is used to double check the indicated lock state of an Instance 27 and can be used to identify system failures. It must contain the Instance ID 28 of of the locked instance and the type of lock, eg, enum( 'read', 'write'). 54 resource being managed by the Nebulous Server. An Instance contains an 55 Instance ID, the parent Storage ID, the location of the resource as a URI, and 56 other assorted meta-data. 57 58 Storage IDs are a signed 64-bit integer. Negative values are considered 59 reserved for future use. Allocation should be incremental and, as we are 60 unlikely to exceed 2^63 Storage Objects in the life time of the project, never 61 reused. Instance IDs follow the same scheme as Storage IDs but exists in a 62 unique namespace. 63 64 Database record relationships 65 -- 66 * All Storage Objects must have at least once associated Instance. 67 68 * All Instances must be associated with a Storage Object. 69 70 * All Instances must be associated with a valid URI (file exists). 71 72 * All Storage Objects with locks set must have the correct number of 73 corresponding Lock Records. 74 75 * All Lock Records must be associated with a Storage Object. 76 77 Data transport 78 -- 79 XXX 80 81 Data Storage 82 -- 83 XXX 84 85 Storage volume state tracking. 86 87 Nebulous itself does not attempt to determine the state of storage volumes. 88 Instead, it relies on some 3rd party to determine both the state 89 (available/not) and capacity (total size + % utilized). This information is 90 then feed into Nebulous via either the administrative API or CLI management 91 tools. 92 93 XXX Storage Location determination 94 29 95 30 96 Locking semantics 31 97 -- 32 A lock is required to either read from or write to a Storage Object Instance 33 being managed by the IPP Pixel Data Server. Stated another way, locking 34 granularity is managed on the level of Storage Object Instances instead of on 35 the more abstract Storage Objects. Although, from the client perspective, 36 operations are carried out on a Storage Object. The locking state of a 37 Storage Object Instance is maintained by in the Storage Object Instance and a 38 Lock Record. 39 40 Two types of locks are used on an Instance, a semaphore is used to track read 41 locks and an exclusive mutex is for write locking. 98 Nebulous uses 'advisory locking' where clients are excepted to check for the 99 existence of locks but this policy is not enforced. Locks are set on a 100 Storage Object and apply to all Instances of that object. 101 102 Two types of locks can be set; 'read' locks and 'write' locks. Read locks are 103 implemented as a semaphore while write locks use an exclusive mutex. 42 104 43 105 - Read lock 44 In order to read from a Storage Object Instance the Read Lock semaphore must 45 first be incremented by one and a Lock Record created. After the read is 46 completed the Lock Record must be deleted and the Read Lock semaphore 47 decremented by one. The incrementation of the Read Lock and Lock Record 48 creation or the decrementation of the Read Lock and the Lock Record deletion 49 must happen atomically. A Read lock can not be aquired unless the Write mutex 50 is in the state of 'free'. If a Read lock can not be aquired, a client must 51 not "spin lock" on the Instanace ID as it may be in the process of being 52 removed. Instead, the "spin lock" should be re-resolving the external 53 identifier to a Storage ID, and the Storage ID to Storage Instances. 106 In order to obtain a Read Lock on a Storage Object the Write Lock mutex must 107 be in the state of 'free'. When a Read Lock is acquire the Read semaphore is 108 incremented by one. When a Read Lock is released the Read semaphore is 109 decremented by one. This must happen atomically with the 110 creation/destruction of a Lock Record. 54 111 55 112 - Write lock 56 In order to obtain a Write lock on a Storage Object Instance the Write Lock 57 mutex must be in the state of 'free' and the Read lock semaphore must have a 58 value of zero. A client should either "spin lock" or fail if all the Lock 59 mutex is set or the Read Semaphore has a non-zero value. A Lock Record must 60 be created atomically with the setting of the Write mutex. The setting of the 61 Write mutex and Lock Record insertion or the clearing of the Write mutex and 62 the Lock Record deletion must happen atomically. If the Write lock has a 63 state of 'free' and the Read lock has a non-zero value, the Write lock may be 64 set to the 'wait' state to prevent new Read locks from being aquired. 65 66 Storage Object Operations 67 -- 68 - Add 69 The resource must already be on disk (having been named through some sort of 70 mechanism to generate new filenames). A new Storage Object must be created with a new/unqiue Storage ID and has 71 an associated with an External Identifier. At least one Instance must be 72 created atomicaly at the same time. Each new Instance must be initially created with a Write lock. 73 The resource may then be written to it's storage location. When the writing 74 of the resource is completed the Write lock must be cleared as early as is 75 feasible. The association of an External Identifier must wait until Instance 76 creation is completed 77 78 - Delete 79 In order to remove a Storage Object, a Write lock must be obtained on 80 /all/ associated Instances. Then the resources are removed. As each resource 81 is deleted the corresponding Instance must be deleted. After all Instances are 82 removed the Storage Object must then be deleted. 83 84 - Update 85 Storage Object Instances are not truly written to. Instead, a new set of 86 Storage Object Instances and a new Storage Object are created in parallel. 87 88 Write locks must be aquired on all the orignal Intances of a Storage Object. 89 Then an Add operation is performed to create a new Storage Object and 90 associated Instances. Then the External Identifier must be atomically moved 91 from the original Storage Object to the new Storage Object. After the 92 External Identifier migration, the original Storage Object and it's Instances 93 should be removed with a special case of the Delete operation (one that will 94 operate on already held locks). If the old Storage Object is merely 95 abandoned, ie. it still exists but doesn't have an External Identifier, it and 96 the associated Instances will be removed during the next Consistency Sweep. 97 If a Delete is not peformed, the Write locks on the orignal Instances must be 98 released. [use a dead Storage Object table or flag, similar to mark and sweep 99 garbage collection?] 100 101 - Move 102 This is the same operation as an Update except the new Instances are identical 103 to the old. 104 105 - Open 106 Sets a Read lock on an Instances of a Storage Object and determines it's 107 storage location. A Read lock must only be placed on one Instance of a 108 Storage Object. All Instances of a Storage Object should be iterated through 109 in a "spin lock" until a Read lock is aquired. 110 111 - Close 112 Releases a Read lock aquired with open. 113 114 The lock must be released as soon as is feasible. 115 116 Lock sweeping 117 -- 113 In order to obtain a Write lock on a Storage Object the Write Lock mutex must 114 be in the state of 'free' and the Read lock semaphore must have a value of 115 zero. When a Write Lock is acquired the Write mutex is set to 'write'. When a 116 Write Lock is released the Write mutex is set to to 'free'. This must happen 117 atomically with the creation/destruction of a Lock Record. As an extension, a 118 sate of 'wait' may be implemented such that clients waiting on Read Locks to 119 be released may prevent any additional Read Locks from being acquired. 120 121 XXX Lock Records are currently unimplemented 122 - Lock Records A Lock Record is used to double check the indicated lock 123 state of a Storage Object and can be used to identify logical system 124 errors. A Lock Record contains the Storage ID of the object and the type of 125 lock set. eg, enum( 'read', 'write'). 126 127 - Client best practices 128 When attempting to acquire a lock a client should either "spin lock" with a 129 reasonable pause between lock attempts or fail completely. Aggressive "spin 130 locking" is considered antisocial and may eventually require the Nebulous 131 Server to identify and ignore such clients. 132 133 134 House keeping 135 -- 136 - Lock sweeping 118 137 In the event that a Storage Object operation fails to complete successfully 119 138 stale locks will have to be identified and removed from the IPP Pixel Data … … 129 148 Record entries themselves must be removed from the lock table. 130 149 131 Consistency sweeping 132 -- 150 - Consistency sweeping 133 151 Periodically the IPP Pixel Data Server meta-data and Storage Object will need 134 152 to be checked for sanity. This would be similar to running fsck on a modern 135 153 filesystem. Consistency sweeping should include Lock sweeping and should be 136 considered a superset. 137 138 All Storage Objects must have at least once associated Instance. 139 140 All Storage Object Instances must be associated with a Storage Object. 141 142 All Storage Object Instances with a lock set must have the correct number of 143 corresponding Lock Records. 144 145 All Lock Records must be plausible, ie. the Instance pointed at must be in a 146 corresponding state. 147 148 Storage ID Allocation 149 -- 150 Storage IDs are a signed 64-bit integer. Negative values are considered 151 reserved for future use. Allocation should be incremental and, as we are 152 unlikely to exceed 2^63 Storage Objects in the life time of the project, never 153 reused. 154 155 Allocated via [SQL auto-increment/stored procedure/app server?] 156 157 Instance ID Allocation 158 -- 159 Indentical to a Storage ID but exists in a unique namespace. 160 161 Storage Location determination 162 -- 163 ??? 154 considered a super-set. 155 156 157 Server Operations 158 -- 159 - setup 160 - create_object 161 - rename_object 162 XXX unimplemented 163 - replicate object 164 - lock_object 165 - unlock_object 166 - find_instances 167 - delete_instance 168 - split_instance 169 XXX unimplemented 170 - stat_object 171 - stat_instance 172 XXX unimplemented 173 174 Client Operations 175 -- 176 - create 177 Creates and opens new Storage Object 178 179 - replicate 180 Adds an Instance to a Storage Object 181 182 - cull 183 Removes an Instance from a Storage Object 184 185 This operation can not remove the last Instance of a Storage Object. 186 187 - lock 188 Trys to acquire a lock on a storage object 189 190 This operation times out after a default interval of 10s. 191 192 - unlock 193 Trys to release a lock on a storage object 194 195 - find_instances 196 Find all instances of a storage object 197 198 Only Instances on active storage volumes are found. 199 200 - find 201 Find any instance of a storage object 202 203 Only Instances on active storage volumes are found. 204 205 - open 206 Open a storage object for read or write 207 208 Opening a storage object as 'write' will remove all but one Instance to 209 prevent Instances from becoming inconsistent. 210 211 - delete 212 Delete a storage object and all of it's instances 213 214 Removes a storage object and all of it's instances by sequentially deleting each 215 Instance. When a Storage Object has no more associated instances it is 216 automatically removed by the Nebulous server. 217 218 - copy 219 Copy a storage object 220 221 The new storage object will be created with only one Instance. Most properties 222 of the source Storage Object will be preserved. 223 224 - move 225 Rename a storage object 226 227 Currently this operation will remove all but one instance of the storage 228 object and may change it's storage location. 229 230 - delete_instance 231 232 Remove a storage object instance 233 234 Removing the last Instance of a Storage Object will destroy the Storage 235 Object. 236 237 - stat 238 View the properties of a storage object 239 240 241 - import 242 XXX unimplemented 243 Import a file into Nebulous 244 245 Creates a new Storage Object with the specified External Identifier. The 246 source file will then be "copied" into the Nebulous system leaving the original 247 file unmodified. 248 249 - fission 250 XXX unimplemented 251 Create a new Storage Object from an existing one by either splitting off an 252 Instance and re-parenting it or by cloning an existing Instance and associating 253 it with the new Storage Object. -
trunk/Nebulous/docs/setup.txt
r4921 r4943 25 25 mkdir /po03/nebulous 26 26 mkdir /po04/nebulous 27 chown nobody:nebulous /po0?/nebulous 28 chmod 0770 /po0?/nebulous 27 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; mkdir "/$i/nebulous" }' 28 chown nobody:nebulous /po??/nebulous 29 chmod 0770 /po??/nebulous 30 ls -lad /po??/nebulous 29 31 30 32 =head2 Build and install the Nebulous Perl modules (see: README) … … 174 176 neb-addvol --name po03 --uri file:/po03/nebulous 175 177 neb-addvol --name po04 --uri file:/po04/nebulous 178 179 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }' 176 180 . 177 181 .
Note:
See TracChangeset
for help on using the changeset viewer.
