[erlang-questions] What can I only do in Erlang?

Garry Hodgson <>
Wed Nov 5 18:25:07 CET 2014


fwiw, i've got a system that's been running in production
for years now that works pretty much like this. an "overseer"
distributed application runs on one node of a cluster of machines,
owning the virtual ip and delegating requests to other nodes.

we don't do hot code upgrades, since some of the code is not
erlang, but by upgrading nodes individually we install new code
releases on 6 week release cycles without bringing the service down.

it's pretty damn cool.


On 11/05/2014 12:13 PM, Garry Hodgson wrote:
> on the theme of "much easier in erlang", here's what i'd do:
>
> write a little python or shell program that loops forever,
> sleeping for 10 seconds and writing a message including its pid.
>
> next write a gen_server that spawns one of those as
> a port process, reads those messages and logs
> them. include startup and "it died" log entries.
>
> now write an erlang/otp app that uses supervision tree to
> spawn a few of those. fire it up, tail the logs, show it all
> works, with erlang managing apps in other languages.
> now kill one of the external process and watch it magically
> restart, with shiny new pid as proof.
>
> for extra credit, run this on two nodes, using distributed
> application feature. change log message to include hostname
> as well as pid. show it running, then kill erlang on one
> of the nodes. show it still runnning. start it up again,
> then kill the other. repeat as needed to get the point across.
>
> i'm guessing this would all be a few dozen lines of code.
> you could do it in other languages, but i really doubt it would
> be as easy, or as robust.
>
>
>
> On 11/04/2014 07:18 PM, Curtis J Schofield (ram9) wrote:
>> I am working on getting Erlang/Elixir adopted into our company. I've
>> been asked to provide a simple example of something that your can only
>> do in erlang.
>>
>> My reason for pushing to adopt this in our tech stack is that much of
>> the system code I've written I feel I could write easier in Erlang and
>> do it faster. I feel like one of the unique offerings of erlang
>> relates to distributed computing or OTP reliable systems.
>>
>>
>> Does anyone have thoughts on this question ? "What can I do in Erlang
>> that I can't do in another language?"
>>
>> Ideally it would be something small that I could use as a demonstration.
>>
>> Thank you for any thoughts.
>>
>> Curtis
>>
>>
>>
>>
>> ---
>> Modern Yoga vs Traditional Yoga
>> http://swamij.com/traditional-yoga.htm#swamirama
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
Garry Hodgson
AT&T Chief Security Office (CSO)

"This e-mail and any files transmitted with it are AT&T property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited."



More information about the erlang-questions mailing list