Skip to content

Commit

Permalink
moar JDOwens feedback. define "combinator". Say RPC. Clarify example'…
Browse files Browse the repository at this point in the history
…s cache
  • Loading branch information
lahosken committed Oct 2, 2012
1 parent a3b2221 commit 9c9bb33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/collections.textile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ val result = res1 match {

h1(#combinators). Functional Combinators

Combinators are so-called because they are meant to be combined. The output of one function is often suitable as the input for another.
Combinators are, roughly, functions that take other functions as parameters and are are meant to be combined. The output of one function is often suitable as the input for another.

The most common use is on the standard data structures.

Expand Down
8 changes: 4 additions & 4 deletions web/finagle.textile
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ def isRateLimited(u: User): Future[Boolean] = {
// Notice how you can swap this implementation out now with something that might
// implement a different, more restrictive policy.

// Check the cache to find out if user is rate-limited. We find out right
// away by checking local cache. But we return a Future anyhow in case we
// need to use a slower system later.
// Check the cache to find out if user is rate-limited. This cache
// implementation is just a Map, and can return a value right way. But we
// return a Future anyhow in case we need to use a slower implementation later.
def isLimitedByCache(u: User): Future[Boolean] = Future.value(limitCache(u))

// Update the cache
Expand Down Expand Up @@ -314,7 +314,7 @@ This hypothetical example combines sequential and concurrent composition. Also n

h2(#Service). Service

A Finagle <code>Service</code> represents a service that handles remote procedure calls, taking requests and giving back replies. It represents the service's "logic," not the network "plumbing" (but works well with other things that configure that plumbing). A Service is a function <code>Req => Future[Rep]</code> for some request and reply types.
A Finagle <code>Service</code> represents a service that handles RPCs, taking requests and giving back replies. It represents the service's "logic," not the network "plumbing" (but works well with other things that configure that plumbing). A Service is a function <code>Req => Future[Rep]</code> for some request and reply types.

<blockquote>
<code>abstract class Service[-Req, +Rep] extends (Req => Future[Rep])</code>
Expand Down

0 comments on commit 9c9bb33

Please sign in to comment.