adhd 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +18 -0
- data/Rakefile +58 -0
- data/VERSION +1 -0
- data/adhd.gemspec +66 -0
- data/doc/adhd.xmi +351 -0
- data/lib/adhd.rb +42 -0
- data/lib/adhd/models.rb +19 -0
- data/models.rb +19 -0
- data/test/helper.rb +46 -0
- data/test/test_adhd.rb +84 -0
- metadata +108 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 dave@netbook
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
= adhd
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but
|
13
|
+
bump version in a commit by itself I can ignore when I pull)
|
14
|
+
* Send me a pull request. Bonus points for topic branches.
|
15
|
+
|
16
|
+
== Copyright
|
17
|
+
|
18
|
+
Copyright (c) 2009 dave@netbook. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "adhd"
|
8
|
+
gem.summary = %Q{An experiment in distributed file replication using CouchDB }
|
9
|
+
gem.description = %Q{More to say when something works! Do not bother installing this! }
|
10
|
+
gem.email = "dave.hrycyszyn@headlondon.com"
|
11
|
+
gem.homepage = "http://github.com/futurechimp/adhd"
|
12
|
+
gem.authors = ["dave.hrycyszyn@headlondon.com"]
|
13
|
+
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
14
|
+
gem.add_development_dependency "ruby-debug", ">= 0.10.3"
|
15
|
+
gem.add_dependency "sinatra", ">= 0.9.4"
|
16
|
+
gem.add_dependency "couchrest", ">= 0.33"
|
17
|
+
|
18
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
19
|
+
end
|
20
|
+
Jeweler::GemcutterTasks.new
|
21
|
+
rescue LoadError
|
22
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
23
|
+
end
|
24
|
+
|
25
|
+
require 'rake/testtask'
|
26
|
+
Rake::TestTask.new(:test) do |test|
|
27
|
+
test.libs << 'lib' << 'test'
|
28
|
+
test.pattern = 'test/**/test_*.rb'
|
29
|
+
test.verbose = true
|
30
|
+
end
|
31
|
+
|
32
|
+
begin
|
33
|
+
require 'rcov/rcovtask'
|
34
|
+
Rcov::RcovTask.new do |test|
|
35
|
+
test.libs << 'test'
|
36
|
+
test.pattern = 'test/**/test_*.rb'
|
37
|
+
test.verbose = true
|
38
|
+
end
|
39
|
+
rescue LoadError
|
40
|
+
task :rcov do
|
41
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
task :test => :check_dependencies
|
46
|
+
|
47
|
+
task :default => :test
|
48
|
+
|
49
|
+
require 'rake/rdoctask'
|
50
|
+
Rake::RDocTask.new do |rdoc|
|
51
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
52
|
+
|
53
|
+
rdoc.rdoc_dir = 'rdoc'
|
54
|
+
rdoc.title = "adhd #{version}"
|
55
|
+
rdoc.rdoc_files.include('README*')
|
56
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
+
end
|
58
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
data/adhd.gemspec
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{adhd}
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["dave.hrycyszyn@headlondon.com"]
|
12
|
+
s.date = %q{2009-12-18}
|
13
|
+
s.description = %q{More to say when something works! Do not bother installing this! }
|
14
|
+
s.email = %q{dave.hrycyszyn@headlondon.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"adhd.gemspec",
|
27
|
+
"doc/adhd.xmi",
|
28
|
+
"lib/adhd.rb",
|
29
|
+
"lib/adhd/models.rb",
|
30
|
+
"models.rb",
|
31
|
+
"test/helper.rb",
|
32
|
+
"test/test_adhd.rb"
|
33
|
+
]
|
34
|
+
s.homepage = %q{http://github.com/futurechimp/adhd}
|
35
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = %q{1.3.5}
|
38
|
+
s.summary = %q{An experiment in distributed file replication using CouchDB}
|
39
|
+
s.test_files = [
|
40
|
+
"test/helper.rb",
|
41
|
+
"test/test_adhd.rb"
|
42
|
+
]
|
43
|
+
|
44
|
+
if s.respond_to? :specification_version then
|
45
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
46
|
+
s.specification_version = 3
|
47
|
+
|
48
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
50
|
+
s.add_development_dependency(%q<ruby-debug>, [">= 0.10.3"])
|
51
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 0.9.4"])
|
52
|
+
s.add_runtime_dependency(%q<couchrest>, [">= 0.33"])
|
53
|
+
else
|
54
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
55
|
+
s.add_dependency(%q<ruby-debug>, [">= 0.10.3"])
|
56
|
+
s.add_dependency(%q<sinatra>, [">= 0.9.4"])
|
57
|
+
s.add_dependency(%q<couchrest>, [">= 0.33"])
|
58
|
+
end
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
61
|
+
s.add_dependency(%q<ruby-debug>, [">= 0.10.3"])
|
62
|
+
s.add_dependency(%q<sinatra>, [">= 0.9.4"])
|
63
|
+
s.add_dependency(%q<couchrest>, [">= 0.33"])
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
data/doc/adhd.xmi
ADDED
@@ -0,0 +1,351 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<XMI verified="false" xmi.version="1.2" timestamp="2009-12-17T18:32:35" xmlns:UML="http://schema.omg.org/spec/UML/1.3" >
|
3
|
+
<XMI.header>
|
4
|
+
<XMI.documentation>
|
5
|
+
<XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
|
6
|
+
<XMI.exporterVersion>1.5.8</XMI.exporterVersion>
|
7
|
+
<XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
|
8
|
+
</XMI.documentation>
|
9
|
+
<XMI.metamodel xmi.version="1.3" href="UML.xml" xmi.name="UML" />
|
10
|
+
</XMI.header>
|
11
|
+
<XMI.content>
|
12
|
+
<UML:Model isSpecification="false" isAbstract="false" isLeaf="false" xmi.id="m1" isRoot="false" name="UML Model" >
|
13
|
+
<UML:Namespace.ownedElement>
|
14
|
+
<UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="folder" name="folder" />
|
15
|
+
<UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="datatype" name="datatype" />
|
16
|
+
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Logical View" name="Logical View" >
|
17
|
+
<UML:Namespace.ownedElement>
|
18
|
+
<UML:Package stereotype="folder" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Datatypes" name="Datatypes" >
|
19
|
+
<UML:Namespace.ownedElement>
|
20
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="p440jFYpDuDr" name="int" />
|
21
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MBI4oXbVSOLu" name="char" />
|
22
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="9AeTBYH0cMyL" name="bool" />
|
23
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bXBmRMelVwpH" name="float" />
|
24
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ROntm8nvISPT" name="double" />
|
25
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0gRb0Qwcx5OM" name="short" />
|
26
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="S26vxtDOG0I2" name="long" />
|
27
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="83wPTJqSxI3y" name="unsigned int" />
|
28
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ixYd3wxTz3Ou" name="unsigned short" />
|
29
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="xbIBbYBic753" name="unsigned long" />
|
30
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OvTKBWGtUoUV" name="string" />
|
31
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="BEe14W8xQPMr" name="Array<Integer>" />
|
32
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="9Kfku32YWre6" name="Array<Node>" />
|
33
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="6peehoLcAUMt" name="Array<InternalIdToNode>" />
|
34
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="diFCqqKRwblR" name="Array<File>" />
|
35
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="TLhcthFdFJO5" name="Array<Document>" />
|
36
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="74BnNEGZB5GJ" name="Array<InternalIdRange>" />
|
37
|
+
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="DWaXF9SBtfOG" isRoot="false" xmi.id="5kgPMGH9z1ka" name="Array<Mapping>" />
|
38
|
+
</UML:Namespace.ownedElement>
|
39
|
+
</UML:Package>
|
40
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZOusZTQl90qE" name="Node" >
|
41
|
+
<UML:Classifier.feature>
|
42
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="SXfxF5tvXBUv" type="5KTXlEgj2vjD" name="name" />
|
43
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="MFTXh0BcGGT9" type="5KTXlEgj2vjD" name="url" />
|
44
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="nedhiyADhMtO" type="Mm8apLIAakhF" name="is_store" />
|
45
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="ksry7I7sujZc" type="Mm8apLIAakhF" name="is_management" />
|
46
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="fhnK1hiOToyH" type="Mm8apLIAakhF" name="is_directory" />
|
47
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="7BMPB17ZSwVj" type="5KTXlEgj2vjD" name="status" />
|
48
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="gHfNEP0ISjCO" type="Mm8apLIAakhF" name="bandwidth_available" />
|
49
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="gvGqFf1GlYif" type="Mm8apLIAakhF" name="bandwidth_used" />
|
50
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="1SiiaROr7j3U" type="Mm8apLIAakhF" name="storage_available" />
|
51
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="aaW6t9F51DWa" type="Mm8apLIAakhF" name="storage_used" />
|
52
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="7vuIPSTbI6A7" type="BEe14W8xQPMr" name="range_masks" />
|
53
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="d6Ek64USA7zU" type="Mm8apLIAakhF" name="uptime" />
|
54
|
+
</UML:Classifier.feature>
|
55
|
+
</UML:Class>
|
56
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="5KTXlEgj2vjD" name="String" />
|
57
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Mm8apLIAakhF" name="Integer" />
|
58
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DWaXF9SBtfOG" name="Array" />
|
59
|
+
<UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="Mm8apLIAakhF" xmi.id="5H9argpy70rk" client="ZOusZTQl90qE" name="" />
|
60
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EKGuNBYX1Fwy" name="NodeDb" >
|
61
|
+
<UML:Classifier.feature>
|
62
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="mCh052AbZBqT" type="9Kfku32YWre6" name="nodes" />
|
63
|
+
</UML:Classifier.feature>
|
64
|
+
</UML:Class>
|
65
|
+
<UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="ZOusZTQl90qE" xmi.id="hDwHBK3Mz2R1" client="EKGuNBYX1Fwy" name="" />
|
66
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="Q0QSYlIaDQEQ" name="" >
|
67
|
+
<UML:Association.connection>
|
68
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="Sud26hENR8r8" type="EKGuNBYX1Fwy" name="" aggregation="composite" />
|
69
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="HU7RU5eu52Le" type="ZOusZTQl90qE" name="" aggregation="none" />
|
70
|
+
</UML:Association.connection>
|
71
|
+
</UML:Association>
|
72
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="F64MWYR8QXAj" name="ShardRange" >
|
73
|
+
<UML:Classifier.feature>
|
74
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="LymfSI7aiciQ" type="5KTXlEgj2vjD" name="range_start" />
|
75
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="4lmtm4EA2GI6" type="5KTXlEgj2vjD" name="range_end" />
|
76
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="S3m7V4C5lom9" type="9Kfku32YWre6" name="node_list" />
|
77
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="XPsZuwJgn3j1" type="ZOusZTQl90qE" name="master_node" />
|
78
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="ejOeu7tLyElE" type="wUO4Nz4auhzE" name="shard" />
|
79
|
+
</UML:Classifier.feature>
|
80
|
+
</UML:Class>
|
81
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="CCMK7lJyR0cA" name="" >
|
82
|
+
<UML:Association.connection>
|
83
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="MG2T8NPM9dx5" type="EKGuNBYX1Fwy" name="" aggregation="composite" />
|
84
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="CUELxJn9V7Rc" type="F64MWYR8QXAj" name="" aggregation="none" />
|
85
|
+
</UML:Association.connection>
|
86
|
+
</UML:Association>
|
87
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EeuiBhd3b9sY" name="ShardFinder" >
|
88
|
+
<UML:Classifier.feature>
|
89
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="X8v0Kas2jXfm" type="74BnNEGZB5GJ" name="shard_ranges" />
|
90
|
+
<UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="w6uusFVwtzxH" name="find_shard" >
|
91
|
+
<UML:BehavioralFeature.parameter>
|
92
|
+
<UML:Parameter kind="return" xmi.id="VJIkoCbo9sG9" type="F64MWYR8QXAj" />
|
93
|
+
<UML:Parameter visibility="private" isSpecification="false" xmi.id="zWTvqShGAc6S" type="5KTXlEgj2vjD" value="" name="internal_id" />
|
94
|
+
</UML:BehavioralFeature.parameter>
|
95
|
+
</UML:Operation>
|
96
|
+
</UML:Classifier.feature>
|
97
|
+
</UML:Class>
|
98
|
+
<UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="F64MWYR8QXAj" xmi.id="DXKt5Qo3kMtn" client="EeuiBhd3b9sY" name="" />
|
99
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="Glwfcnw3hYf8" name="" >
|
100
|
+
<UML:Association.connection>
|
101
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="VAdpSAu6bkqN" type="F64MWYR8QXAj" name="" aggregation="composite" />
|
102
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="1OeXO0yemsKM" type="EeuiBhd3b9sY" name="" aggregation="none" />
|
103
|
+
</UML:Association.connection>
|
104
|
+
</UML:Association>
|
105
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="GxipgWChsqCG" name="" >
|
106
|
+
<UML:Association.connection>
|
107
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="rAvb0DxfRLzD" type="EeuiBhd3b9sY" name="" aggregation="composite" />
|
108
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="NRRZXUBlPrY5" type="F64MWYR8QXAj" name="" aggregation="none" />
|
109
|
+
</UML:Association.connection>
|
110
|
+
</UML:Association>
|
111
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="wUO4Nz4auhzE" name="Shard" >
|
112
|
+
<UML:Classifier.feature>
|
113
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="zT7sAzXvkfbr" type="TLhcthFdFJO5" name="documents" />
|
114
|
+
</UML:Classifier.feature>
|
115
|
+
</UML:Class>
|
116
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sTW11oYXAewC" name="Document" >
|
117
|
+
<UML:Classifier.feature>
|
118
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="ToJKHpLIbtoj" type="5KTXlEgj2vjD" name="internal_id" />
|
119
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="CKp73Wr5fVhY" type="Mm8apLIAakhF" name="size" />
|
120
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="UyvgGimIFbNu" type="5KTXlEgj2vjD" name="mime_type" />
|
121
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="WO4KYjSyzRAz" type="v6saNbKdqtyk" name="blob" />
|
122
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="Ba2fkY4nqcUG" type="5KTXlEgj2vjD" name="filename" />
|
123
|
+
</UML:Classifier.feature>
|
124
|
+
</UML:Class>
|
125
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="v6saNbKdqtyk" name="Attachment" />
|
126
|
+
<UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="sTW11oYXAewC" xmi.id="tKPN15mas5jx" client="wUO4Nz4auhzE" name="" />
|
127
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="u7XWQ5RjgAc9" name="" >
|
128
|
+
<UML:Association.connection>
|
129
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="xEXhze6J5dTX" type="sTW11oYXAewC" name="" aggregation="composite" />
|
130
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="rKg2WnROsztH" type="wUO4Nz4auhzE" name="" aggregation="none" />
|
131
|
+
</UML:Association.connection>
|
132
|
+
</UML:Association>
|
133
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="O5m0C53pXZgr" name="" >
|
134
|
+
<UML:Association.connection>
|
135
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="FgL07kt6dA8x" type="wUO4Nz4auhzE" name="" aggregation="composite" />
|
136
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="8qQifoU4uG24" type="sTW11oYXAewC" name="" aggregation="none" />
|
137
|
+
</UML:Association.connection>
|
138
|
+
</UML:Association>
|
139
|
+
<UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="F64MWYR8QXAj" xmi.id="lwfpq2uB3Eto" client="EeuiBhd3b9sY" name="" />
|
140
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ec1tLkOIMcat" name="Directory" >
|
141
|
+
<UML:Classifier.feature>
|
142
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="ya6FrUMV5NOO" type="5kgPMGH9z1ka" name="mappings" />
|
143
|
+
</UML:Classifier.feature>
|
144
|
+
</UML:Class>
|
145
|
+
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="hILOH0lmr6on" name="Mapping" >
|
146
|
+
<UML:Classifier.feature>
|
147
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="qom9C28voz1c" type="5KTXlEgj2vjD" name="external_id" />
|
148
|
+
<UML:Attribute visibility="public" isSpecification="false" xmi.id="ERd1IA9cAzjx" type="sTW11oYXAewC" comment="The Mapping serves as a mapping between the external_id and the internal_id of a Document object. The Mapping knows both of these IDs." name="document" />
|
149
|
+
</UML:Classifier.feature>
|
150
|
+
</UML:Class>
|
151
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="6qlcP6ixgxct" name="" >
|
152
|
+
<UML:Association.connection>
|
153
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="LHnhhZUltSY1" type="hILOH0lmr6on" name="" aggregation="composite" />
|
154
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="hFounHkr8VSV" type="ec1tLkOIMcat" name="" aggregation="none" />
|
155
|
+
</UML:Association.connection>
|
156
|
+
</UML:Association>
|
157
|
+
<UML:Association visibility="public" isSpecification="false" namespace="Logical View" xmi.id="39RIw8xTcgK5" name="" >
|
158
|
+
<UML:Association.connection>
|
159
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="FLkU7eFOO5Ur" type="ec1tLkOIMcat" name="" aggregation="composite" />
|
160
|
+
<UML:AssociationEnd changeability="changeable" visibility="public" isNavigable="true" isSpecification="false" xmi.id="XyRhPhmQoBhi" type="hILOH0lmr6on" name="" aggregation="none" />
|
161
|
+
</UML:Association.connection>
|
162
|
+
</UML:Association>
|
163
|
+
</UML:Namespace.ownedElement>
|
164
|
+
<XMI.extension xmi.extender="umbrello" >
|
165
|
+
<diagrams>
|
166
|
+
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" showpubliconly="1" showpackage="1" showstereotype="1" name="class diagram" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" canvasheight="1207" canvaswidth="1511" localid="" snapcsgrid="0" showgrid="0" showops="1" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="GBfDa8xOOgRz" documentation="" showscope="1" snapgrid="0" showatts="1" type="1" >
|
167
|
+
<widgets>
|
168
|
+
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="427" showattsigs="601" showstereotype="1" y="49" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="211" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="ZOusZTQl90qE" showscope="1" height="202" showopsigs="601" />
|
169
|
+
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="358" showattsigs="601" showstereotype="1" y="316" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="172" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="F64MWYR8QXAj" showscope="1" height="97" showopsigs="601" />
|
170
|
+
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="627" showattsigs="601" showstereotype="1" y="639" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="219" isinstance="0" usefillcolor="1" fillcolor="#ffc0ff" xmi.id="wUO4Nz4auhzE" showscope="1" height="37" showopsigs="601" />
|
171
|
+
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="698" showattsigs="601" showstereotype="1" y="759" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="140" isinstance="0" usefillcolor="1" fillcolor="#ffc0ff" xmi.id="sTW11oYXAewC" showscope="1" height="97" showopsigs="601" />
|
172
|
+
<boxwidget width="744" showstereotype="1" x="276" y="584" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="315" linecolor="#000000" xmi.id="OFA6aXy1qwJZ" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" />
|
173
|
+
<boxwidget width="814" showstereotype="1" x="85" y="33" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="433" linecolor="#000000" xmi.id="nESEEtzKAb1x" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" />
|
174
|
+
<notewidget width="244" showstereotype="1" x="289" noteType="0" y="593" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="104" linecolor="none" xmi.id="vZuKv7S2fyye" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" text="STORAGE SERVER

Stores some nice big files for us. The documents inside each server are sharded by internal_id." />
|
175
|
+
<notewidget width="259" showstereotype="1" x="104" noteType="0" y="53" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="182" linecolor="none" xmi.id="ovwNVBPINpWc" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" text="GLOBAL STATE

All nodes in the system, no matter whether they are only storage servers or whether they are management or directory servers, have all of this information all the time (or at least, as quickly as it can be replicated to any particular node)." />
|
176
|
+
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="1075" showattsigs="601" showstereotype="1" y="247" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="161" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="hILOH0lmr6on" showscope="1" height="52" showopsigs="601" />
|
177
|
+
<boxwidget width="353" showstereotype="1" x="970" y="33" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="310" linecolor="#000000" xmi.id="DQReyV7fne9s" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" />
|
178
|
+
<notewidget width="324" showstereotype="1" x="977" noteType="0" y="43" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="159" linecolor="none" xmi.id="lr4y3tzEesX4" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" text="DIRECTORY SERVER

Takes external requests, asking the ShardFinder which Shard a given Document exists in (based on the internal_id of the Document). Any server can be a directory server, but in practice, not every server will be a directory server at all times (we may need only 1/10 of servers to be a directory server)." />
|
179
|
+
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="575" showattsigs="601" showstereotype="1" y="325" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="296" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="EeuiBhd3b9sY" showscope="1" height="45" showopsigs="601" />
|
180
|
+
<boxwidget width="1290" showstereotype="1" x="60" y="13" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="466" linecolor="#000000" xmi.id="9qGy57wvLTod" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" />
|
181
|
+
</widgets>
|
182
|
+
<messages/>
|
183
|
+
<associations>
|
184
|
+
<assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="F64MWYR8QXAj" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="XPsZuwJgn3j1" changeabilityB="900" widgetbid="ZOusZTQl90qE" totalcountb="2" type="510" linewidth="none" >
|
185
|
+
<linepath>
|
186
|
+
<startpoint startx="490" starty="316" />
|
187
|
+
<endpoint endx="490" endy="251" />
|
188
|
+
</linepath>
|
189
|
+
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="392" showstereotype="1" y="253" text="master_node" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="+" role="710" width="96" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="FZxyMj5r8xR0" height="19" />
|
190
|
+
</assocwidget>
|
191
|
+
<assocwidget indexa="1" indexb="1" widgetaid="wUO4Nz4auhzE" linecolor="none" totalcounta="2" xmi.id="O5m0C53pXZgr" widgetbid="sTW11oYXAewC" totalcountb="2" type="510" linewidth="none" >
|
192
|
+
<linepath>
|
193
|
+
<startpoint startx="774" starty="676" />
|
194
|
+
<endpoint endx="774" endy="759" />
|
195
|
+
</linepath>
|
196
|
+
</assocwidget>
|
197
|
+
<assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="F64MWYR8QXAj" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="ejOeu7tLyElE" changeabilityB="900" widgetbid="wUO4Nz4auhzE" totalcountb="2" type="510" linewidth="none" >
|
198
|
+
<linepath>
|
199
|
+
<startpoint startx="530" starty="413" />
|
200
|
+
<endpoint endx="627" endy="639" />
|
201
|
+
</linepath>
|
202
|
+
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="598" showstereotype="1" y="515" text="shard" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="+" role="710" width="52" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="VPSN3IMB04zB" height="19" />
|
203
|
+
</assocwidget>
|
204
|
+
<assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="hILOH0lmr6on" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="ERd1IA9cAzjx" changeabilityB="900" widgetbid="sTW11oYXAewC" totalcountb="2" type="510" linewidth="none" >
|
205
|
+
<linepath>
|
206
|
+
<startpoint startx="1162" starty="299" />
|
207
|
+
<endpoint endx="838" endy="832" />
|
208
|
+
<point x="1162" y="832" />
|
209
|
+
</linepath>
|
210
|
+
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="1203" showstereotype="1" y="302" text="1" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="" role="701" width="16" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="RzicpiZYhtvu" height="19" />
|
211
|
+
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="841" showstereotype="1" y="810" text="1" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="" role="702" width="16" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="CyQ9qYlGYTsL" height="19" />
|
212
|
+
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="840" showstereotype="1" y="834" text="document" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="+" role="710" width="80" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="mn4M0p8EhpFX" height="19" />
|
213
|
+
</assocwidget>
|
214
|
+
<assocwidget indexa="1" indexb="1" widgetaid="EeuiBhd3b9sY" linecolor="none" totalcounta="2" xmi.id="GxipgWChsqCG" widgetbid="F64MWYR8QXAj" totalcountb="2" type="510" linewidth="none" >
|
215
|
+
<linepath>
|
216
|
+
<startpoint startx="575" starty="352" />
|
217
|
+
<endpoint endx="530" endy="352" />
|
218
|
+
</linepath>
|
219
|
+
</assocwidget>
|
220
|
+
</associations>
|
221
|
+
</diagram>
|
222
|
+
</diagrams>
|
223
|
+
</XMI.extension>
|
224
|
+
</UML:Model>
|
225
|
+
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Use Case View" name="Use Case View" >
|
226
|
+
<UML:Namespace.ownedElement/>
|
227
|
+
</UML:Model>
|
228
|
+
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Component View" name="Component View" >
|
229
|
+
<UML:Namespace.ownedElement/>
|
230
|
+
</UML:Model>
|
231
|
+
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Deployment View" name="Deployment View" >
|
232
|
+
<UML:Namespace.ownedElement>
|
233
|
+
<UML:Node visibility="public" isSpecification="false" namespace="Deployment View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Nuj9xaygETYj" name="Storage Server" />
|
234
|
+
<UML:Node visibility="public" isSpecification="false" namespace="Deployment View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="j1zm1UuTqxq4" name="Directory Server" />
|
235
|
+
</UML:Namespace.ownedElement>
|
236
|
+
<XMI.extension xmi.extender="umbrello" >
|
237
|
+
<diagrams>
|
238
|
+
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" showpubliconly="1" showpackage="1" showstereotype="1" name="System Overview" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" canvasheight="1038" canvaswidth="1528" localid="" snapcsgrid="0" showgrid="0" showops="1" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="052X7SM5OGmL" documentation="" showscope="1" snapgrid="0" showatts="1" type="8" >
|
239
|
+
<widgets>
|
240
|
+
<nodewidget width="133" showstereotype="1" x="726" y="215" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="Nuj9xaygETYj" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
241
|
+
<nodewidget width="142" showstereotype="1" x="254" y="172" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="j1zm1UuTqxq4" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
242
|
+
<nodewidget width="133" showstereotype="1" x="291" y="358" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="Nuj9xaygETYj" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
243
|
+
<nodewidget width="133" showstereotype="1" x="511" y="270" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="Nuj9xaygETYj" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
244
|
+
<nodewidget width="142" showstereotype="1" x="502" y="75" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="j1zm1UuTqxq4" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
245
|
+
<nodewidget width="142" showstereotype="1" x="72" y="105" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="j1zm1UuTqxq4" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
246
|
+
<nodewidget width="133" showstereotype="1" x="464" y="415" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="Nuj9xaygETYj" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
247
|
+
<nodewidget width="133" showstereotype="1" x="763" y="356" usesdiagramusefillcolor="1" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="60" linecolor="none" xmi.id="Nuj9xaygETYj" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" />
|
248
|
+
</widgets>
|
249
|
+
<messages/>
|
250
|
+
<associations/>
|
251
|
+
</diagram>
|
252
|
+
</diagrams>
|
253
|
+
</XMI.extension>
|
254
|
+
</UML:Model>
|
255
|
+
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Entity Relationship Model" name="Entity Relationship Model" >
|
256
|
+
<UML:Namespace.ownedElement/>
|
257
|
+
</UML:Model>
|
258
|
+
</UML:Namespace.ownedElement>
|
259
|
+
</UML:Model>
|
260
|
+
</XMI.content>
|
261
|
+
<XMI.extensions xmi.extender="umbrello" >
|
262
|
+
<docsettings viewid="GBfDa8xOOgRz" uniqueid="AOJRD8qDLjwn" documentation="" />
|
263
|
+
<listview>
|
264
|
+
<listitem open="1" type="800" label="Views" >
|
265
|
+
<listitem open="1" type="801" id="Logical View" >
|
266
|
+
<listitem open="0" type="807" id="GBfDa8xOOgRz" label="class diagram" />
|
267
|
+
<listitem open="1" type="813" id="DWaXF9SBtfOG" />
|
268
|
+
<listitem open="1" type="813" id="v6saNbKdqtyk" />
|
269
|
+
<listitem open="0" type="813" id="ec1tLkOIMcat" >
|
270
|
+
<listitem open="0" type="814" id="ya6FrUMV5NOO" />
|
271
|
+
</listitem>
|
272
|
+
<listitem open="0" type="813" id="sTW11oYXAewC" >
|
273
|
+
<listitem open="0" type="814" id="ToJKHpLIbtoj" />
|
274
|
+
<listitem open="0" type="814" id="CKp73Wr5fVhY" />
|
275
|
+
<listitem open="0" type="814" id="UyvgGimIFbNu" />
|
276
|
+
<listitem open="0" type="814" id="WO4KYjSyzRAz" />
|
277
|
+
<listitem open="0" type="814" id="Ba2fkY4nqcUG" />
|
278
|
+
</listitem>
|
279
|
+
<listitem open="1" type="813" id="Mm8apLIAakhF" />
|
280
|
+
<listitem open="0" type="813" id="EeuiBhd3b9sY" >
|
281
|
+
<listitem open="0" type="814" id="X8v0Kas2jXfm" />
|
282
|
+
<listitem open="0" type="815" id="w6uusFVwtzxH" />
|
283
|
+
</listitem>
|
284
|
+
<listitem open="0" type="813" id="hILOH0lmr6on" >
|
285
|
+
<listitem open="0" type="814" id="qom9C28voz1c" />
|
286
|
+
<listitem open="0" type="814" id="ERd1IA9cAzjx" />
|
287
|
+
</listitem>
|
288
|
+
<listitem open="0" type="813" id="ZOusZTQl90qE" >
|
289
|
+
<listitem open="0" type="814" id="SXfxF5tvXBUv" />
|
290
|
+
<listitem open="0" type="814" id="MFTXh0BcGGT9" />
|
291
|
+
<listitem open="0" type="814" id="nedhiyADhMtO" />
|
292
|
+
<listitem open="0" type="814" id="ksry7I7sujZc" />
|
293
|
+
<listitem open="0" type="814" id="fhnK1hiOToyH" />
|
294
|
+
<listitem open="0" type="814" id="7BMPB17ZSwVj" />
|
295
|
+
<listitem open="0" type="814" id="gHfNEP0ISjCO" />
|
296
|
+
<listitem open="0" type="814" id="gvGqFf1GlYif" />
|
297
|
+
<listitem open="0" type="814" id="1SiiaROr7j3U" />
|
298
|
+
<listitem open="0" type="814" id="aaW6t9F51DWa" />
|
299
|
+
<listitem open="0" type="814" id="7vuIPSTbI6A7" />
|
300
|
+
<listitem open="0" type="814" id="d6Ek64USA7zU" />
|
301
|
+
</listitem>
|
302
|
+
<listitem open="0" type="813" id="EKGuNBYX1Fwy" >
|
303
|
+
<listitem open="0" type="814" id="mCh052AbZBqT" />
|
304
|
+
</listitem>
|
305
|
+
<listitem open="0" type="813" id="wUO4Nz4auhzE" >
|
306
|
+
<listitem open="0" type="814" id="zT7sAzXvkfbr" />
|
307
|
+
</listitem>
|
308
|
+
<listitem open="0" type="813" id="F64MWYR8QXAj" >
|
309
|
+
<listitem open="0" type="814" id="LymfSI7aiciQ" />
|
310
|
+
<listitem open="0" type="814" id="4lmtm4EA2GI6" />
|
311
|
+
<listitem open="0" type="814" id="S3m7V4C5lom9" />
|
312
|
+
<listitem open="0" type="814" id="XPsZuwJgn3j1" />
|
313
|
+
<listitem open="0" type="814" id="ejOeu7tLyElE" />
|
314
|
+
</listitem>
|
315
|
+
<listitem open="1" type="813" id="5KTXlEgj2vjD" />
|
316
|
+
<listitem open="0" type="830" id="Datatypes" >
|
317
|
+
<listitem open="1" type="829" id="TLhcthFdFJO5" />
|
318
|
+
<listitem open="1" type="829" id="diFCqqKRwblR" />
|
319
|
+
<listitem open="1" type="829" id="BEe14W8xQPMr" />
|
320
|
+
<listitem open="1" type="829" id="74BnNEGZB5GJ" />
|
321
|
+
<listitem open="1" type="829" id="6peehoLcAUMt" />
|
322
|
+
<listitem open="1" type="829" id="5kgPMGH9z1ka" />
|
323
|
+
<listitem open="1" type="829" id="9Kfku32YWre6" />
|
324
|
+
<listitem open="1" type="829" id="9AeTBYH0cMyL" />
|
325
|
+
<listitem open="1" type="829" id="MBI4oXbVSOLu" />
|
326
|
+
<listitem open="1" type="829" id="ROntm8nvISPT" />
|
327
|
+
<listitem open="1" type="829" id="bXBmRMelVwpH" />
|
328
|
+
<listitem open="1" type="829" id="p440jFYpDuDr" />
|
329
|
+
<listitem open="1" type="829" id="S26vxtDOG0I2" />
|
330
|
+
<listitem open="1" type="829" id="0gRb0Qwcx5OM" />
|
331
|
+
<listitem open="1" type="829" id="OvTKBWGtUoUV" />
|
332
|
+
<listitem open="1" type="829" id="83wPTJqSxI3y" />
|
333
|
+
<listitem open="1" type="829" id="xbIBbYBic753" />
|
334
|
+
<listitem open="1" type="829" id="ixYd3wxTz3Ou" />
|
335
|
+
</listitem>
|
336
|
+
</listitem>
|
337
|
+
<listitem open="1" type="802" id="Use Case View" />
|
338
|
+
<listitem open="1" type="821" id="Component View" />
|
339
|
+
<listitem open="1" type="827" id="Deployment View" >
|
340
|
+
<listitem open="0" type="825" id="052X7SM5OGmL" label="System Overview" />
|
341
|
+
<listitem open="1" type="828" id="j1zm1UuTqxq4" />
|
342
|
+
<listitem open="1" type="828" id="Nuj9xaygETYj" />
|
343
|
+
</listitem>
|
344
|
+
<listitem open="1" type="836" id="Entity Relationship Model" />
|
345
|
+
</listitem>
|
346
|
+
</listview>
|
347
|
+
<codegeneration>
|
348
|
+
<codegenerator language="C++" />
|
349
|
+
</codegeneration>
|
350
|
+
</XMI.extensions>
|
351
|
+
</XMI>
|
data/lib/adhd.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'sinatra'
|
3
|
+
require 'couchrest'
|
4
|
+
require 'erb'
|
5
|
+
require 'ruby-debug'
|
6
|
+
require File.dirname(__FILE__) + '/adhd/models'
|
7
|
+
|
8
|
+
node_name = ARGV[0]
|
9
|
+
node_url = ARGV[1]
|
10
|
+
buddy_server_url = ARGV[2]
|
11
|
+
buddy_db = ARGV[3]
|
12
|
+
|
13
|
+
NODESERVER = CouchRest.new("#{node_url}")
|
14
|
+
NODESERVER.default_database = "#{node_name}_node_db"
|
15
|
+
node_db = CouchRest::Database.new(NODESERVER, "#{node_name}_node_db")
|
16
|
+
|
17
|
+
# sync the db with our buddy
|
18
|
+
if buddy_server_url && buddy_db
|
19
|
+
buddy_server = CouchRest.new("#{buddy_server_url}")
|
20
|
+
buddy_db = CouchRest::Database.new(buddy_server, buddy_db)
|
21
|
+
node_db.replicate_from(buddy_db)
|
22
|
+
end
|
23
|
+
|
24
|
+
node = Node.by_name(:key => node_name).first
|
25
|
+
node = Node.new if node.nil?
|
26
|
+
|
27
|
+
node.name = node_name
|
28
|
+
node.url = node_url
|
29
|
+
node.save
|
30
|
+
|
31
|
+
# We check if we are the first node. If we are the first node, we set ourself up
|
32
|
+
# as the management node. If not, we find out where the management node is and
|
33
|
+
# we replicate to the administrative node.
|
34
|
+
if management_node = Node.by_is_management.last
|
35
|
+
management_node_server = CouchRest.new(management_node.url)
|
36
|
+
management_node_db = CouchRest::Database.new(management_node_server, management_node.name + "_node_db")
|
37
|
+
node_db.replicate_to(management_node_db)
|
38
|
+
else
|
39
|
+
node.is_management = 3
|
40
|
+
node.save
|
41
|
+
end
|
42
|
+
|
data/lib/adhd/models.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
class Node < CouchRest::ExtendedDocument
|
2
|
+
NODESERVER = CouchRest.new("#{ARGV[1]}")
|
3
|
+
NODESERVER.default_database = "#{ARGV[0]}_node_db"
|
4
|
+
|
5
|
+
use_database NODESERVER.default_database
|
6
|
+
|
7
|
+
property :name
|
8
|
+
property :url
|
9
|
+
property :is_store
|
10
|
+
property :is_management
|
11
|
+
property :is_directory
|
12
|
+
property :status
|
13
|
+
|
14
|
+
timestamps!
|
15
|
+
|
16
|
+
view_by :name
|
17
|
+
view_by :is_management
|
18
|
+
end
|
19
|
+
|
data/models.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
class Node < CouchRest::ExtendedDocument
|
2
|
+
NODESERVER = CouchRest.new("#{ARGV[1]}")
|
3
|
+
NODESERVER.default_database = "#{ARGV[0]}_node_db"
|
4
|
+
|
5
|
+
use_database NODESERVER.default_database
|
6
|
+
|
7
|
+
property :name
|
8
|
+
property :url
|
9
|
+
property :is_store
|
10
|
+
property :is_management
|
11
|
+
property :is_directory
|
12
|
+
property :status
|
13
|
+
|
14
|
+
timestamps!
|
15
|
+
|
16
|
+
view_by :name
|
17
|
+
view_by :is_management
|
18
|
+
end
|
19
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'shoulda'
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
+
require 'adhd'
|
8
|
+
|
9
|
+
class Test::Unit::TestCase
|
10
|
+
end
|
11
|
+
require 'sinatra'
|
12
|
+
require 'rack/test'
|
13
|
+
require 'base64'
|
14
|
+
set :environment, :test
|
15
|
+
set :run, false
|
16
|
+
set :raise_errors, true
|
17
|
+
set :logging, false
|
18
|
+
require File.dirname(__FILE__) + '/../adhd'
|
19
|
+
|
20
|
+
|
21
|
+
module TestHelper
|
22
|
+
|
23
|
+
def app
|
24
|
+
# change to your app class if using the 'classy' style
|
25
|
+
Sinatra::Application.new
|
26
|
+
end
|
27
|
+
|
28
|
+
def body
|
29
|
+
last_response.body
|
30
|
+
end
|
31
|
+
|
32
|
+
def status
|
33
|
+
last_response.status
|
34
|
+
end
|
35
|
+
|
36
|
+
include Rack::Test::Methods
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
require 'test/unit'
|
42
|
+
require 'shoulda'
|
43
|
+
|
44
|
+
|
45
|
+
Test::Unit::TestCase.send(:include, TestHelper)
|
46
|
+
|
data/test/test_adhd.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
<<<<<<< HEAD:test/test_adhd.rb
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestAdhd < Test::Unit::TestCase
|
5
|
+
should "probably rename this file and start testing for real" do
|
6
|
+
flunk "hey buddy, you should probably rename this file and start testing for real"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
=======
|
10
|
+
require 'rubygems'
|
11
|
+
require 'test/unit'
|
12
|
+
require 'shoulda'
|
13
|
+
require 'adhd'
|
14
|
+
require File.dirname(__FILE__) + '/../models'
|
15
|
+
|
16
|
+
class TestAdhd < Test::Unit::TestCase
|
17
|
+
|
18
|
+
context "An adhd node" do
|
19
|
+
context "at startup" do
|
20
|
+
|
21
|
+
setup do
|
22
|
+
assert_nothing_raised do
|
23
|
+
NODESERVER = CouchRest.new("http://192.168.1.104:5984")
|
24
|
+
NODESERVER.default_database = "node_db"
|
25
|
+
@node_db = CouchRest::Database.new(NODESERVER, "node_db")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
should_eventually "create a view for name" do
|
30
|
+
# @node_db.get("_design/node")
|
31
|
+
end
|
32
|
+
|
33
|
+
context "if given another node url" do
|
34
|
+
should_eventually "replicate the remote node database" do
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
should_eventually "have a node descriptor in its database for itself" do
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
context "The Node model" do
|
45
|
+
setup do
|
46
|
+
@node = Node.new
|
47
|
+
end
|
48
|
+
|
49
|
+
should "have a name property" do
|
50
|
+
assert @node.respond_to? "name"
|
51
|
+
end
|
52
|
+
|
53
|
+
should "have a url property" do
|
54
|
+
assert @node.respond_to? "url"
|
55
|
+
end
|
56
|
+
|
57
|
+
should "have have an is_store property" do
|
58
|
+
assert @node.respond_to? "is_store"
|
59
|
+
end
|
60
|
+
|
61
|
+
should "have an is_management property" do
|
62
|
+
assert @node.respond_to? "is_management"
|
63
|
+
end
|
64
|
+
|
65
|
+
should "have an is_directory property" do
|
66
|
+
assert @node.respond_to? "is_directory"
|
67
|
+
end
|
68
|
+
|
69
|
+
should "have a status property" do
|
70
|
+
assert @node.respond_to? "status"
|
71
|
+
end
|
72
|
+
|
73
|
+
should "have timestamp properties" do
|
74
|
+
assert @node.respond_to? "created_at"
|
75
|
+
assert @node.respond_to? "updated_at"
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
>>>>>>> 15388c36a078b8eee9bc17c79501985e54be519b:test/test_adhd.rb
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: adhd
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- dave.hrycyszyn@headlondon.com
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-12-18 00:00:00 +00:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: thoughtbot-shoulda
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: ruby-debug
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.3
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: sinatra
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.9.4
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: couchrest
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0.33"
|
54
|
+
version:
|
55
|
+
description: "More to say when something works! Do not bother installing this! "
|
56
|
+
email: dave.hrycyszyn@headlondon.com
|
57
|
+
executables: []
|
58
|
+
|
59
|
+
extensions: []
|
60
|
+
|
61
|
+
extra_rdoc_files:
|
62
|
+
- LICENSE
|
63
|
+
- README.rdoc
|
64
|
+
files:
|
65
|
+
- .document
|
66
|
+
- .gitignore
|
67
|
+
- LICENSE
|
68
|
+
- README.rdoc
|
69
|
+
- Rakefile
|
70
|
+
- VERSION
|
71
|
+
- adhd.gemspec
|
72
|
+
- doc/adhd.xmi
|
73
|
+
- lib/adhd.rb
|
74
|
+
- lib/adhd/models.rb
|
75
|
+
- models.rb
|
76
|
+
- test/helper.rb
|
77
|
+
- test/test_adhd.rb
|
78
|
+
has_rdoc: true
|
79
|
+
homepage: http://github.com/futurechimp/adhd
|
80
|
+
licenses: []
|
81
|
+
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options:
|
84
|
+
- --charset=UTF-8
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
92
|
+
version:
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: "0"
|
98
|
+
version:
|
99
|
+
requirements: []
|
100
|
+
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 1.3.5
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: An experiment in distributed file replication using CouchDB
|
106
|
+
test_files:
|
107
|
+
- test/helper.rb
|
108
|
+
- test/test_adhd.rb
|