Permalink
Browse files

Merge branch 'master' of github.com:bloom-lang/bud-sandbox

  • Loading branch information...
2 parents 6d72ae8 + 05010bb commit ae42609a4623c068b2f9fa8fb167665331f19693 @jhellerstein jhellerstein committed Oct 3, 2011
@@ -5,14 +5,14 @@ module MIProtocol
scratch :dc_template, [:@cache_id, :directory_id, :line_id]
# channels shared by agents
- channel :cdq_REX, cd_template.schema
+ channel :cdq_REX, cd_template.cols
# really, want to make :payload functionally dependent on the other 3 cols.
- channel :cdq_WBD, cd_template.schema.clone.push(:payload)
- channel :dcp_REXD, dc_template.schema.clone.push(:payload)
- channel :dcp_WBAK, dc_template.schema
- channel :dcp_NAK, dc_template.schema
- channel :dcq_INV, dc_template.schema
- channel :cdp_INVD, cd_template.schema.clone.push(:payload)
+ channel :cdq_WBD, cd_template.cols.clone.push(:payload)
+ channel :dcp_REXD, dc_template.cols.clone.push(:payload)
+ channel :dcp_WBAK, dc_template.cols
+ channel :dcp_NAK, dc_template.cols
+ channel :dcq_INV, dc_template.cols
+ channel :cdp_INVD, cd_template.cols.clone.push(:payload)
# EDB/a priori truth
# necessary for bootstrapping states of lines, caches.
View
@@ -43,9 +43,9 @@ def at_finger(key, index)
module ChordSuccPred
state do
channel :sp_req, [:@to, :from, :hops]
- channel :sp_resp, [:@to, :from, :hops] + me.schema
+ channel :sp_resp, [:@to, :from, :hops] + me.cols
interface :input, :succ_pred_req, [:to, :from, :hops]
- interface :output, :succ_pred_resp, sp_resp.schema[1..-1]
+ interface :output, :succ_pred_resp, sp_resp.cols[1..-1]
interface :output, :succ_pred_timeout, sp_req.schema
table :pending, [:to, :from, :hops, :save]
periodic :sp_timeout, 5
@@ -29,8 +29,7 @@ module DastardlyDelivery
end
bloom :control do
- max_delay <- (max_delay * set_max_delay).pairs { |o, n| o }
- max_delay <+ set_max_delay
+ max_delay <+- set_max_delay
end
bloom :queue do
@@ -25,8 +25,8 @@ module DemonicDelivery
end
bloom :control do
- drop_pct <- (drop_pct * set_drop_pct).pairs { |o, n| o }
- drop_pct <+ set_drop_pct
+ drop_pct <+- set_drop_pct
+# drop_pct <+ set_drop_pct
end
bloom :snd do
View
@@ -22,7 +22,7 @@ module BasicKVS
end
bloom :mutate do
- kvstate <+ kvput {|s| [s.key, s.value]}
+ kvstate <+ kvput {|s| [s.key, s.value]}
kvstate <- (kvstate * kvput).lefts(:key => :key)
end
@@ -38,13 +38,13 @@ module BasicKVS
end
end
+# XXX: broken
module PersistentKVS
include KVSProtocol
- #import BasicKVS => :kvs
include BasicKVS
state do
- sync :kvstate_backing, :bud, kvstate.schema
+ sync :kvstate_backing, :dbm, kvstate.schema
end
bootstrap do
@@ -53,7 +53,6 @@ module PersistentKVS
end
bloom do
- #stdio <~ kvstate_backing.inspected
kvstate <+ kvstate_backing do |b|
if kvstate.empty?
puts "EMPTY"
@@ -67,7 +66,6 @@ module PersistentKVS
end
end
-
module ReplicatedKVS
include KVSProtocol
include MulticastProtocol
View
@@ -4,7 +4,6 @@
require 'test/cart_workloads'
require 'cart/disorderly_cart'
require 'cart/destructive_cart'
-require 'tracing_extras'
module Remember
@@ -100,9 +100,7 @@ def test_dd_delivery_send_once
end
# Wait for message to be delivered to rcv
- tuples.length.times do
- q.pop
- end
+ tuples.length.times { q.pop }
rcv.sync_do {
assert_equal(tuples[0],
@@ -64,7 +64,7 @@ def test_dd_delivery_reliable
snd.stop_bg
rcv.stop_bg
end
-
+
def test_dd_delivery_demonic
srand(0)
snd = DemonD.new
@@ -93,16 +93,15 @@ def test_dd_delivery_demonic
# Under this seed, expect only messages 3-5
# Wait for messages to be delivered to rcv
- (3.times { q.pop })
+ (3.times { q.pop })
- rcv.sync_do
+ rcv.sync_do
rcv.sync_do {
- assert_equal(tuples.sort.slice(2, tuples.length),
- rcv.pipe_chan_perm.to_a.sort)
+ assert_equal(tuples.sort.slice(2, tuples.length),
+ rcv.pipe_chan_perm.to_a.sort)
}
snd.stop_bg
rcv.stop_bg
end
-
end
View
@@ -30,8 +30,8 @@ module VotingMaster
state do
table :vote_status, [:ident, :content, :response, :resp_content]
- #table :votes_rcvd, [:ident, :response, :peer, :content]
- table :votes_rcvd, vote.schema
+ # XXX: should this be vote.schema?
+ table :votes_rcvd, vote.cols
scratch :member_cnt, [:cnt]
scratch :vote_cnt, [:ident, :response, :cnt, :content]
end

0 comments on commit ae42609

Please sign in to comment.