File tree 3 files changed +10
-12
lines changed
3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1
1
; ;; Flow computation demo
2
2
(define (demo )
3
- (define 2d-vectors (create-data-set))
4
- (define 3d-vectors (create-data-set))
5
- (define magnitudes (create-data-set))
6
- (define in-out-flow (create-data-set))
3
+ (define 2d-vectors (mrs: create-data-set))
4
+ (define 3d-vectors (mrs: create-data-set))
5
+ (define magnitudes (mrs: create-data-set))
6
+ (define in-out-flow (mrs: create-output -data-set))
7
7
(mrs:map
8
8
(lambda (key 2d-vec )
9
9
(let ((x (car 2d-vec)) (y (cadr 2d-vec)))
25
25
(in (3 3 ))
26
26
(out (5 0 ))))
27
27
(mrs:feed-key-value-list 3d-vectors ' ((in (1 1 1 ))
28
- (out (5 0 0 ))))
29
- (mrs:print-streaming in-out-flow 'flows ))
28
+ (out (5 0 0 )))))
30
29
(mrs:run-computation demo)
Original file line number Diff line number Diff line change 1
1
(define (word-count )
2
- (define documents (create-data-set))
3
- (define words (create-data-set))
4
- (define word-counts (create-data-set))
2
+ (define documents (mrs: create-data-set))
3
+ (define words (mrs: create-data-set))
4
+ (define word-counts (mrs: create-output -data-set))
5
5
(mrs:map
6
6
(lambda (key document )
7
7
(for-each (lambda (word ) (mrs:emit word 1 )) document))
12
12
words word-counts)
13
13
(mrs:feed-value-list documents ' ((hello world this is a document)))
14
14
(mrs:feed-value-list documents ' ((another document) (and another)))
15
- (mrs:feed-value-list documents ' ((this document is somewhat long) (a short document)))
16
- (mrs:print-streaming word-counts 'count ))
15
+ (mrs:feed-value-list documents ' ((this document is somewhat long) (a short document))))
17
16
(mrs:run-computation word-count)
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ \subsubsection{Pipes}
198
198
199
199
For the inter-process communication, we pass data between our
200
200
distributors and workers via simple queued pipes. However, our data
201
- abstraction of `` send message to worker'' and `` Get message from
201
+ abstraction of `` send message to worker'' and `` get message from
202
202
worker'' could easily be reimplemented to use network / TCP
203
203
communications to communicate with an actual distributed system of computers.
204
204
You can’t perform that action at this time.
0 commit comments