<div>On Tue, May 17, 2011 at 5:25 PM, Todd <span dir="ltr"><<a href="mailto:t.greenwoodgeer@gmail.com">t.greenwoodgeer@gmail.com</a>></span> wrote:</div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The whole "reply-all" debate has stirred me to ask some festering questions...<br>
<br>
1. In general, what are the most valuable libraries to learn, both within the Erlang dist and external?<br></blockquote><meta charset="utf-8"><div class="gmail_quote"><br></div> OTP, gproc to start<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
2. Is there a consolidated/curated repository of libraries that is industry standard? I know the erlware folks have a repo...is that both a complete and accepted authoritative repo? From reading the list, it sounds like there's also a fair bit of stuff scattered about in github, too.<br>
</blockquote><div><br></div><div>OTP is the industry standard</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
3. How does one easily multithread an app? For instance, there's pmap in clojure and something similar in akka that lets you map a function across a list, and it allocates threads accordingly...<br></blockquote><div>
<br></div><div>You spawn more processes.  Erlang handles the SMP portion for you.  There is some parallelization stuff available for Erlang as well, or roll your own.</div><div><a href="http://99-bottles-of-beer.net/language-erlang-1482.html">http://99-bottles-of-beer.net/language-erlang-1482.html</a></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
4. Along that note, does anyone have any ideas as to how to tackle the Typesafe 'getting started tutorial?'<br></blockquote><div><br></div><div><a href="http://learnyousomeerlang.com/">http://learnyousomeerlang.com/</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">4b. Side note: is anyone concerned about Akka/Typesafe stealing mindshare?<br></blockquote><div><br></div>
<div>Dif'rnt stroke fer dif'rnt folks.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">5. How does one push an app such that it self instantiates it's processes across the cluster? I can see how OTP is great at managing an app on a single node, but how do you say something like: "create one of these processes on each node in the cluster, and restart 1-for-1 if they die"... or something similar. I see mention of gproc, but honestly, I don't see how to use it. Likewise, if nodes are added to the cluster, how would you ensure that the necessary processes are pushed to the new node after it joins the cluster?<br>
</blockquote><div><br></div><div>Use spawn_link/2 </div><meta charset="utf-8"><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: verdana, Arial, sans-serif; font-size: 13px; line-height: 16px; "><h3 id="spawn_link/2" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 5px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(51, 51, 51); font-weight: bold; font-size: 14px; ">
spawn_link(Node, Fun) -> pid()</h3></span><div> </div><div>If you have the Pid for your remote supervisor you can just use supervisor:start_link and give it the remote Pid, or Pid ! <msg> it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

6. How do you deploy and live code upgrade in real life? I've been looking at some of the work by the 'Dukes of Erl' ... is erlrc what folks commononly use?<br>
<br></blockquote><div><br></div><div>No idea, I haven't gotten that far yet.  :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">7. Does anyone use dynamic load balancing of demand across a cluster (e.g. spinning up erlang processes to meet the demand curve?)<br>
</blockquote><div><br></div><div>We do, to some extent.  We start with a pool and if we exceed that we go dynamic.  Might be better to just go dynamic and save the shared-state munging....</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

8. What's the best way to integrate w/ other code bases. In akka, you'd use camel as an integration bus. What are the common ways to integrate with erlang? Is that what ports and nifs are for? Forgive my ignorance, but I always considered those as simply ways to write code in a different, perhaps more comfortable language...not as integration mechanisms.<br>
</blockquote><div><br></div><div>Ports and NIFs, yes.  Whether the integration is for performance, functionality or preferences it's all the same: something external.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Also, I've continued to peck away at various newbie tutorials. Any comments/suggestions/corrections are welcome.<br></blockquote><div><br></div><div>See #4.</div><div><br></div><div>G'luck!</div><div><br></div><div>
-mox</div></div></div>