You can take streamline's tutorial: 
https://github.com/Sage/streamlinejs/blob/master/tutorial/tutorial.md
source: 
https://github.com/Sage/streamlinejs/blob/master/tutorial/tuto7-parallel._js

It does the following:

* HTTP server which generates a small form with a search box
* web service call: search string is passed to google
* file system calls: search is also performed recursively against local 
files
* database calls: search string is run against a collection of movies 
inside mongodb
* exception handling: exceptions occurring in any of the 3 search 
operations are trapped and reported to the user
* parallel execution: the 3 search operations are performed in parallel.

The streamline version is only 126 lines of code. So it should not be a 
major endeavor to implement it with different libraries.

Bruno

On Sunday, March 31, 2013 8:28:33 PM UTC+2, Adam Crabtree wrote:
>
> With all the back and forth and prostelatizing on why Promises are better, 
> etc... I'd like to put together an example of non-trivial implementations 
> of each to help cut through some of the noise and make it easier for people 
> to decide which they prefer.
>
> Ideally, the implementation would be something of sufficient complexity to 
> show off the strengths and weaknesses of each, but easily contained and 
> comprehended in a single file.
>
> Suggestions?
>
> Cheers,
> Adam Crabtree
>
> -- 
> Better a little with righteousness 
>        than much gain with injustice.
> Proverbs 16:8 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to