sadie 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -1
- data/README +3 -1
- data/lib/sadie/version.rb +1 -1
- data/lib/sadie_session.rb +9 -3
- data/test/v2/test_installation/primers/primer_wait_primary.rb +7 -0
- data/test/v2/test_installation/primers/primer_wait_secondary.rb +16 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28c3bbcce5f0538173050256b4f03df4d247826c
|
4
|
+
data.tar.gz: 358530ee9c81a76cfb79f119d9ac676aa906e506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d72cfcd93b844527dba9f122ff7ec0c1934a79f047f59bcb5c8dbb2bf620c79b0784943fd94b3d2a59f1113381fd7a5c30b6c97fd860c57965daf07e2c50582f
|
7
|
+
data.tar.gz: 7582971beaf635ef21c4642e079b92ebf1742a800b105c774450b26a96199f92075f5bc428ff6df74dad9d17f1fc562927464d4e3fe3696d4e2f8533b3ddc337
|
data/CHANGELOG
CHANGED
@@ -28,4 +28,5 @@
|
|
28
28
|
[0.1.01] ** ground-up rewrite, ignore everything before this line if you're not a historian **
|
29
29
|
[0.1.8] new version now at capability pairing with old version.
|
30
30
|
[0.1.9] added metadata for keys, abstracted expiry and refresh data structs into timestamp queues, abstracted various mutexes in session into lock manager object in preparation for distributed behavior
|
31
|
-
[0.1.10] added important lock to ensure that two threads (refresh and fetch, in this case, but will be more important in distributed case) cannot attempt to prime for the same key at the same time
|
31
|
+
[0.1.10] added important lock to ensure that two threads (refresh and fetch, in this case, but will be more important in distributed case) cannot attempt to prime for the same key at the same time
|
32
|
+
[0.1.11] threading bugfixes
|
data/README
CHANGED
@@ -86,7 +86,9 @@ So it'd be great for grabbing a list of all facebook users who've ever mentioned
|
|
86
86
|
|
87
87
|
Similarly, it'd be a wonderful tool for performing a statistical analysis on the game of baseball based on data from every baseball game ever played, but it's not well set up for you to ask it about a particular game (unless the game were of such interest that you took the time to write primers that were associated with that particular game).
|
88
88
|
|
89
|
-
Of course, it is, at it's core, a key/value hash and, as such, you could use it to do such things as well as you could any other. It is the primers that are limited, not the storage mechanism.
|
89
|
+
Of course, it is, at it's core, a key/value hash and, as such, you could use it to do such things as well as you could any other. It is the primers that are limited, not the storage mechanism, so it'd be fine to build a web application that would depend upon Sadie to keep an updated version of all your chattering facebook friends and/or statistics about all the baseball games ever played and the same web app could easily mine this data for interesting things and use Sadie to cache the results of said mining for future use. The important point here is that the primers exist to do the heavy lifting of data aggregation and transformation into usable forms and, beyond that, Sadie is a key/value store like many others.
|
90
|
+
|
91
|
+
|
90
92
|
|
91
93
|
==Contribute
|
92
94
|
Do it! The github url for Sadie is at: [https://github.com/FredAtLandMetrics/sadie]
|
data/lib/sadie/version.rb
CHANGED
data/lib/sadie_session.rb
CHANGED
@@ -267,9 +267,15 @@ class SadieSession
|
|
267
267
|
end
|
268
268
|
|
269
269
|
def _refresh( key )
|
270
|
-
|
271
|
-
|
272
|
-
|
270
|
+
@primer_lock = @lockmgr.create( :systype => :session,
|
271
|
+
:locktype => :primer,
|
272
|
+
:key => key )
|
273
|
+
p = nil
|
274
|
+
@lockmgr.critical_section_try( @primer_lock ) do
|
275
|
+
p = _get_primed_primer( key )
|
276
|
+
end
|
277
|
+
|
278
|
+
_manage_refresh( key, p.refresh_rate ) unless p.nil?
|
273
279
|
end
|
274
280
|
|
275
281
|
def _current_time
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sadie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred McDavid
|
@@ -133,6 +133,8 @@ files:
|
|
133
133
|
- test/v2/test_installation/primers/minimal.rb
|
134
134
|
- test/v2/test_installation/primers/minimal_filestormech.rb
|
135
135
|
- test/v2/test_installation/primers/onelevel/twolevel/test_subdir.rb
|
136
|
+
- test/v2/test_installation/primers/primer_wait_primary.rb
|
137
|
+
- test/v2/test_installation/primers/primer_wait_secondary.rb
|
136
138
|
- test/v2/test_installation/primers/test_after_each.rb
|
137
139
|
- test/v2/test_installation/primers/test_after_key.rb
|
138
140
|
- test/v2/test_installation/primers/test_before_each.rb
|