File tree Expand file tree Collapse file tree 3 files changed +70
-2
lines changed Expand file tree Collapse file tree 3 files changed +70
-2
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ {% include head.html %}
5
+ < style >
6
+ body { padding-top : 0px ; }
7
+ .navbar-fixed-top { position : relative !important ; }
8
+ </ style >
9
+ < link href ="/css/sidenav.css " rel ="stylesheet ">
10
+ </ head >
11
+ < body data-spy ="scroll " data-target =".sidebar "> <!-- data-offset-top="10">-->
12
+ {% include nav.html %}
13
+ < div class ="container ">
14
+ < ul class ="breadcrumb ">
15
+ < li > < a href ="/ "> Home</ a > < span class ="divider "> /</ span > </ li >
16
+ < li > < a href ="# "> Tutorial</ a > < span class ="divider "> /</ span > </ li >
17
+ </ ul >
18
+ </ div >
19
+ < div class ="container ">
20
+ < div class ="row ">
21
+ < div class ="span3 sidebar ">
22
+ < div data-spy ="affix " data-offset-bottom ="290 ">
23
+ < ul class ="nav nav-list sidenav ">
24
+ < li > < a href ="#introduction "> < i class ="icon-chevron-right "> </ i > Introduction</ a > </ li >
25
+ </ ul >
26
+ </ div >
27
+ </ div >
28
+ < div class ="span9 ">
29
+ {{ content }}
30
+ </ div >
31
+ </ div >
32
+ </ div >
33
+ {% include footer.html %}
34
+ {% include js.html %}
35
+ </ body >
36
+ </ html >
Original file line number Diff line number Diff line change @@ -511,8 +511,8 @@ just provides callback functions which take some state and either return a
511
511
new state and a reply, or just a new state. The process is * managed* in the
512
512
sense that its mailbox is under someone else's control.
513
513
514
- A slightly more complex example of the ` ManagedProcess ` API can be seen in
515
- the [ Managed Processes tutorial] [ 22 ] . The API documentation is available
514
+ More complex examples of the ` ManagedProcess ` API can be seen in the
515
+ [ Managed Processes tutorial] [ 22 ] . API documentation for HEAD is available
516
516
[ here] [ 21 ] .
517
517
518
518
[ 1 ] : http://www.haskell.org/haskellwiki/Cloud_Haskell
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout : managedprocess
3
+ categories : tutorial
4
+ title : Managed Process Tutorial
5
+ ---
6
+
7
+ ### Introduction
8
+
9
+ In order to explore the ` ManagedProcess ` API, we will present a simple
10
+ example taken from the test suite, which exercises some of the more
11
+ interesting features.
12
+
13
+ Let's imagine we want to execute tasks on an arbitrary node, using a
14
+ mechanism much as we would with the ` call ` API from distributed-process.
15
+ As with ` call ` , we want the caller to block whilst the remote task is
16
+ executing, but we also want to put an upper bound on the number of
17
+ concurrent tasks. We will use ` ManagedProcess ` to implement a generic
18
+ task server with the following characteristics
19
+
20
+ * requests to enqueue a task are handled immediately
21
+ * callers will block until the task completes (or fails)
22
+ * an upper bound is placed on the number of concurrent running tasks
23
+
24
+ Once the upper bound is reached, tasks will be queued up for later
25
+ execution, and only when we drop below the limit will tasks be taken
26
+ from the backlog and executed.
27
+
28
+ ` ManagedProcess ` provides a basic protocol for * server-like* processes
29
+ such as this, based on the synchronous ` call ` and asynchronous ` cast `
30
+ functions. Although ` call ` is synchronous, communication with the
31
+ * server process* is out of band, both from the client and the server's
32
+ point of view.
You can’t perform that action at this time.
0 commit comments