Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Erlang

Name: Anonymous 2007-09-26 4:13 ID:cjaYSFso

Well, it seems kinda weird, but I am really salivating over the promise of N-times faster programs on an N-core cpu..

Thoughts?

Name: Anonymous 2007-09-27 1:28 ID:nmxBichO

>>39
Ah, I see.

Erlang differs from the Actor model in a number of ways, and I'm fairly sure I've read that Erlang makes no guarantees about messages sent. It's meant to be a fault-tolerant language after all.

So chances are it'd just start dropping them if the queue grew too big.

Name: Anonymous 2007-09-27 1:45 ID:7yDz3vDX

>>41 nmx Bich-O
"If you think TCP guarantees delivery, which most people probably do, then so does Erlang."

Name: Anonymous 2007-09-27 1:58 ID:7yDz3vDX

>>39
Synchronous, send->work->wait, and anything else you can think of are easily built on top of asynchronous messaging, and are done in like 3 keywords of Erlang.  The language primitives simply supply ... primitives that you can build really nice shit from, and the libs have probably already built anything you can think of related to message passing and distribution.

Name: Anonymous 2007-09-27 3:19 ID:Heaven

>>39
In practice though, I hope there's some sort of a backstop.
There never is. And enterprise fags who use languages like that usually don't even know or care. It's all supar elegant etc., until it actually has to perform.

Name: Anonymous 2007-09-27 3:22 ID:SzN/eoHc

>>43
Yes, I know. It's just that strict synchronous or send-work-wait has different space characteristics in the event where the receiver doesn't pick up soon enough; having worked with MPI I tend to think of it as superior.

Though I can very well see how in telephony applications it's vastly preferable to have the sender keep going rather than stall. I guess the same thing applies to networked and fault-tolerant applications too. Conversely, asynchronous by default messaging wouldn't be so nice as, say, a microkernel IPC primitive.

Name: Anonymous 2007-09-27 3:24 ID:Heaven

>>44
Or they'll bump into it, meet unexpected behaviour, be forcibly torn from their comfort zone and go spastic. Yeah, we've seen it before.

Name: Anonymous 2007-09-27 3:28 ID:7yDz3vDX

>>44
Yeah, like Erlang isn't used in important infrastructure like telephony at all.  Once they start rolling out those systems starting 15 years ago, all hell is going to break loose.

>>45
In agent-based design, messages are handled quickly since one thread of execution isn't handling everything including the kitchen sink as in traditional threaded/distributed IPC systems.  Plus, seeing as the send statement has timeout handling built in, the "receiver doesn't pick up soon enough" situation is right in your lap.

Name: Anonymous 2007-09-27 3:31 ID:RfOQm7Gx

I don't get this "has to perform now" attitude. What ever happened to writing elegant code first then refactoring the code for speed gains?

Name: Anonymous 2007-09-27 3:32 ID:Heaven

>>47
Yeah, like Erlang isn't used in important infrastructure like telephony at all.
You can rest assured that Erlang certainly isn't used for any parts there that actually require some skill to code.

Name: Anonymous 2007-09-27 3:34 ID:Heaven

>>48
there's nothing to refactor if you pump it all through some super high one size fits all abstraction layer anyway

Name: Anonymous 2007-09-27 3:38 ID:SzN/eoHc

>>47
Are you saying that Erlang processes are stackless and not affected by priority scheduling?

Anyway, trapping timeouts when send-work-wait is wrapped around asynchronous messaging just means that the receiver hasn't _replied_ soon enough. Isn't the message queued either at the sender or the receiver, at the mechanism level, until the receiver actually gets it? Even in the case of timeout (i.e. the sender giving up before getting a reply), the sent message will hang around in some queue or another, and so might the reply which was given up on if the receiver hasn't died.

>>48
Real-time requirements are surprisingly common outside prototype code. Well, soft real-time anyway, the kind where it's vastly preferable to have a responsive system than an efficient or even simple system.

Name: Anonymous 2007-09-27 3:54 ID:7yDz3vDX

>>51
Erlang manages its own process priorities, if you care to fiddle with those settings.  Its process switching time is incredibly short, since it doesn't have to swap CPU states, so it screams through your process list very quickly.

As for your 2nd paragraph, what's the problem?  The sender can only know anything if there is a response from the receiving end.  Take these scenarios:

1) Message went out on the wire, receiver didn't get it yet
2) Message is sitting in the receiver's inbox
3) Receiver pulls the message from its inbox
4) Receiver does its work and sends ACK at the appropriate stage, early on or at the end

Responding to 1-3 really isn't meaningful at all in tracking the call's progress (unless you're doing some incredibly low-level tuning) since the receiver can error out or crash afterwards without the work getting done.  The 4th is really the only useful way of acknowledging reception, and by definition requires the receiver to trigger when it's appropriate to send it.

GUIs and other systems have been doing message-queue processing since they've been invented, and the fear of message overflow has never been a huge concern.

Name: Anonymous 2007-09-28 6:34 ID:Upmjwnlz

>>38
I was a telco programmer, and 80% of my time went to problems caused by lost or corrupted inter-process messages. There are lots of things getting in the way of those messages: power outages, improper system shutdown by newb administrators, Oracle choking a cpu so bad it can't even read ethernet, abends/coredumps before a key progrma finishes procesing a message, and on and on. The more bullet-proof Erlang's message passing is the better. Extra hard drives for big queues and message logs are much cheaper than programmer time to track down some message that got lost 3 days before anybody noticed something was wrong.

Name: Anonymous 2007-09-28 6:47 ID:xm8FZmoq

If it doesn't compile to native code, it's not good enough.

Name: Anonymous 2007-09-28 6:59 ID:Po9dEigG

>>54
-Omg-optimized.

Name: Anonymous 2007-09-28 9:29 ID:/TusPWuh

>>54
I bet you'd walk a mile for a Caml.

Name: Anonymous 2007-09-28 10:18 ID:yOzr0WyY

>>53
So Erlang can pass messages over the network and still have all that robustness? I don't habeeb it.

Name: Anonymous 2007-09-28 11:14 ID:VcFBI60N

>>57
I don't know. We built our own messaging system with all imaginable hand-shaking. But it sounds like Erlang's developers had similar experiences and are building the solution into Erlang.

Name: Anonymous 2007-09-28 11:35 ID:yOzr0WyY

>>58
It sounds like something that would require a lot of extra infrastructure. Somewhat out of the scope of a programming language alone.

Name: Anonymous 2010-11-26 17:42

Name: Anonymous 2012-06-25 23:30

蘸ቱ頣癲℈ᘈ褳ࡂ整怨Ԥ䙘杰閆嘦堉䘤打鑧⎃∁⥄ܣȰ斂睱↑ᥘ匢禂塆䕥匓ጒᔶ瀣㝰՗瑣蠠蔴慩覇ᘖ搥祴蘗㕉Ը坠╙㖆唴舁䥵㐗Բ吁蔤䌳Ɨ䜃葴璈⥖革㌱剅㍄ƒ兠࠲靔碕䈑蕕㝁⌃蝰ܑ⤠衁ހ艤持杤Ā蕸桖墓Ω䊈㠲❸醗瀈䤈㜐ᅡ剖㈲蒉⊒Ф瘢↙夕鉆瑒奣ᘥ蠳墆茕鑤墇⡓䝕䦁襳喇蝰ॹ䅒❷梗͆靐ܓ椲阥㐢挒蜖饥榅扢圶ᕱ㌨敹晉⚈刘吸⤔焳䄰葢䊐呴遢蘸ᤂ昀⢔梅匂刣耇堓⑗䕷᥂到ᐡ癃ቕ玖肄䄶妀厗扑兩肔呡锖肁睉ና⊖鎅䊈莗㚇ᔧͨ遤䢔䢈ဴ卐禂霧鈵䑕р虳⚗艢ㄦ昱ㅗ鐂搣ू茓邈څᙂ煁防爣瀗啧঒ႄ梕餀顔䀣饴煆㑘舐ܔ㉅䡇▒呇蔨䁙᜗喈䝈蝉陴̘⁕Ѧ衂耥倣饄ʀ獰␠ᥘ嚈劗…㘃㌸猠椶䉑覂⍈тⅨ桸圕攆卂㈄鍔憕⎂ࡆᝀ䁳ᜈ蘂陂聗ز皓䠀炄顩酁㉇䙥昨↙噸蝁ٔ朹馉⡂ဒ灢㤓ᤢᕖ项ؐ圃

Name: Anonymous 2012-06-25 23:31

鉨眸つ瞁禂┲灐扳鄲慣鉷襅鈉Ԧ昐ᄅ啸䘨煀ᔙ馄㊙ࢉ䢅錢ℷΙ؂በ散ᡗ㠅刈葷ကՃΆ敵᜘唑⑱硷ԇ爇锅奔酢さゆ甦ᑈ蠣猦耂腡䜒ї㔲噃⦁硨ʒ㞙┇ȱ䌂∐㔆犐ဣ≀〴陹怰ፘ猶鈖镹噘ƀ蕹蠕吣䘁հ㝓爰ᦑ䊃瘷唐瑰恁䆗攵甅琠֓䀅腒㠀Ѡ眉愐斐ᡇ閆ᔦᚓ晣䈄⍄蕴⑙㢅ⅵր銒蔩⑱爉✨䌑聖琓垈͉4噩茒⁸桶荴瀘刴㒁ጓ䐲ᐈ瀶瑴P㜣䝇䀄㕒蠩ᜓ䅀愁ၙ⍧儖攷堀鑒祣ဢ㠗∡茙瀗朸↓㝕䐆瞀馓〔ቹ饳焖啇㔨所䚂ᔀ獨❀䅖吱院圄uᦈ鉢ᜥ睑䂗ና舷睡ږᎂ椓≁晆ी㎓ɵ圤萦抂酄㑴酲怢ᄂ鄀䍗榅颗㡉Ȧ̱᥵啒䡕蠉㠉蘒ႈ㍙熙䤖葦䍨片㕆唱䕇႐恘栩⥑❄♳唲☑枃䐶猑䝂琇〠艑ជ愤茰啡䝘㥣Ͱㅴ捁色周㦆晇钓瘀聐䝲‱馘㍄䘙♡鈑ᡆぅ獣㥓㦔晱᐀∐晸इ協爡䀸虣艕钓厉㠑ㅖ聴䄶➘ᘕ≷袄坰䉴ᤱ㙉蔁

Name: Anonymous 2012-06-25 23:31

╔䍰䢒䥧㝤Ħ虖㔕愗艄慕噃鈠࠘颔砵䔡酹脳昤攙ℳ̅慗٥馘畴眧煤㠷爂㉶酇畠፧ဵ杘㔶瘒酤圉═楠桹В䍗ⅧƁ䠀ㅒ杳垈ᔗԧ儖桱┕銂茇搘✓昙聂晈鉑牁✇㍰㡶घ⡷砈桃㤙耄靕艳嚗憈⁔蝡怔桓٧瘶坤偂靤⅔虸ဂ焀⢀ᐰ䐩⠀夙蝉ㄦ咁ᕰ捰⢆䖕㔢覙✴ሉ荈┘脈㜱蜓瀩ݕ@焄℣ᝁ⁶喈卒ԑ敉膃☕厗ئܴ䚐吒ፃ吠劔眣㐳玓G㆕杙㕥喓㎃㤗Ѓ镈鎉☨ᐴ祖腄瑩⁄葂⊖扩桲奖甲攕愠ȡո昰挵錆ᕀ聲≇嚂畈㑘㔔ᚕ❥蘥䤅ᡙQ共坔ᡩ瑧㌠䝠ゑ閆捃堹㥰䢘卸㍶䑶┧ᐈᙵ怔✆䠢楐∘ᕆѡ薖鎘䔰䂉䉕阩蜓㉲Ȉ䜔ग✃杅礇甒䡣周㑑昔ɕ㍣⦇Ԓᆑ䝈䢔ܰ攰敇倶遇鉇㝖蜧ᝳ Ȥ桐値㙁➓遳剤剧ᐨ⍥ሱ␆〆覙礳ᔵ塧䠑䦐䡖㈳掙㘷頙㔴鎙钂▘䐠瑠卨攰刃̖←饥卲䄴ᆑ䦃 ᜱ敱ᝡ挑㑰℄蒗镗鎖恐㊑⁙✄焩霘遹獘挧

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List