• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
[Node] Multiprocessing and runs continuously
 

[Node] Multiprocessing and runs continuously

on

  • 1,479 views

 

Statistics

Views

Total Views
1,479
Views on SlideShare
1,467
Embed Views
12

Actions

Likes
0
Downloads
5
Comments
0

1 Embed 12

http://a0.twimg.com 12

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    [Node] Multiprocessing and runs continuously [Node] Multiprocessing and runs continuously Presentation Transcript

    • Multiprocessing and runs continuously 2011-11-19 kumatch / Yosuke Kumakura11 11 19
    • • Yosuke Kumakura • @kumatch • Feedtailor inc.11 11 19
    • Agenda • Multiprocessing • Continue to run a script11 11 19
    • Today’s modules • Cluster (for Node 0.6) • forever11 11 19
    • Cluster • Includes version 0.5.10 • committed on Oct. 12, 2011 • adds CLI option first. • Shift to module (Oct. 27, 2011) • removed CLI option. • Bump v 0.6.0 (Nov. 4, 2011)11 11 19
    • Worker process Network ports Worker process Master process11 11 19
    • Cluster APIs • fork() • isMaster • isWorker • “death” event for worker die11 11 19
    • Cluster usage • cluster.isMaster • cluster.fork() • cluster.isWorker • ex. http.Server()11 11 19
    • Cluster usage • Cluster worker is Child Process • using child_process.fork() • Built-in messaging channel11 11 19
    • Cluster for Node 0.4 • http://learnboost.github.com/cluster/11 11 19
    • forever • https://github.com/nodejitsu/forever • Run a script as a daemon • CLI tool (and module instance)11 11 19
    • $ [sudo] npm install -g forever $ forever start app.js11 11 19
    • forever daemon actions • start • stop • restart • list • and more...11 11 19
    • Node 0.6 + forever 0.7.2 = unstoppable !!! • start is available • list, stop and etc. don’t work11 11 19