Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Elixir, Erlang, i visoko dostupni serverski sus...
Search
Saša Jurić
October 25, 2013
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elixir, Erlang, i visoko dostupni serverski sustavi
WebCampZg 2013
Saša Jurić
October 25, 2013
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
490
Simplifying systems with Elixir
sasajuric
2
600
Metagrokking Elixir
sasajuric
4
330
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
940
Elixir - valentine edition
sasajuric
0
150
What's the fuss about Phoenix?
sasajuric
2
1.2k
Phoenix
sasajuric
1
270
Other Decks in Programming
See All in Programming
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
800
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
310
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
220
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
150
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
310
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2.3k
どこまでゆるくて許されるのか
tk3fftk
0
470
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
350
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
110
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
Featured
See All Featured
HDC tutorial
michielstock
2
740
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
360
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Writing Fast Ruby
sferik
630
63k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Documentation Writing (for coders)
carmenintech
77
5.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Designing for Performance
lara
611
70k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Transcript
Elixir, Erlang i visoko dostupni serverski sustavi @sasajuric
Tko vrijedi, je dostupan. Tko je dostupan, vrijedi. Tko nije
dostupan, ne vrijedi.
None
EVM Erlang stdlib OTP Erlang programi Erlang/OTP
dostupnost stabilnost skalabilnost distribuiranost responzivnost live upgrade concurrency dostupnost
P P P P P P P P P P
P P P P P P P P P P P scheduler scheduler scheduler scheduler CPU CPU CPU CPU EVM
P P P P exit signal vrijeme P'
P P P P P P P P P P
P P P P P P P P P P P scheduler scheduler scheduler scheduler CPU CPU CPU CPU EVM
EVM P P P P P P P P P
P P P P P P P P P P P P scheduler scheduler scheduler scheduler CPU CPU CPU CPU EVM
scheduler scheduler scheduler scheduler listener request request job 1 job
2 request EVM
EVM Erlang stdlib OTP Erlang programi :-) :-(
EVM Erlang stdlib OTP Erlang programi Elixir Elixir programi
-module(sum_actor). -behaviour(gen_server). -export([ start/0, sum/3, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3 ]). start() -> gen_server:start(?MODULE, [], []). sum(Server, A, B) -> gen_server:call(Server, {sum, A, B}). init(_) -> {ok, undefined}. handle_call({sum, A, B}, _From, State) -> {reply, A+B, State}; handle_call(_Request, _From, State) -> {reply, error, State}. handle_cast(_Msg, State) -> {noreply, State}. handle_info(_Info, State) -> {noreply, State}. terminate(_Reason, _State) -> ok. code_change(_OldVsn, State, _Extra) -> {ok, State}.
defmodule SumActor do use GenServer.Behaviour def start do :gen_server.start(__MODULE__, [],
[]) end def sum(server, a, b) do :gen_server.call(server, {:sum, a, b}) end def handle_call({:sum, a, b}, _from, state) do {:reply, a + b, state} end end
defmodule SumActor do use ExActor defcall sum(a, b) do a
+ b end end
defcall sum(a, b) do a + b end def sum(server,
a, b) do :gen_server.call(server, {:sum, a, b}) end def handle_call({:sum, a, b}, _from, state) do {:reply, a + b, state} end
Repo.all( from w in Weather, where: w.prcp > 0 or
w.prcp == nil, select: w ) get "/hello/world" do conn.resp(200, "Hello world") end fact "addition" do 1 + 1 |> 2 end
obradi_xml(Model, Xml) -> Model1 = azuriraj(Model, Xml), Model2 = obradi_promjene(Model1),
pohrani(Model2).
obradi_xml(Model, Xml) -> Model1 = azuriraj(Model, Xml), Model2 = obradi_promjene(Model1),
pohrani(Model2).
def obradi_xml(model, xml) do model |> azuriraj(xml) |> obradi_promjene |>
pohrani end f(...) |> g(...) g(f(...), ...)
defrecord Person, [:name, :age] record = MyRecord.new(name: "Saša Jurić") record
= record.age(36) x = 5 IO.puts "#{x} * #{x} = #{x * x}" String.codepoints("Saša Jurić") sasa: ~$ mix new test * creating README.md * creating .gitignore * creating mix.exs * creating lib * creating lib/test.ex * creating test * creating test/test_helper.exs * creating test/test_test.exs Enum.each(enumerable, ...) inspect(inspectable)
elixir-lang.org elixir-lang-talk elixir-lang-core Hacking Devin Torres A Cauldron of Black
and White Stones The Erlangelist