Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Web, Concurrency, FP
Search
Oleksii Kachaiev
May 31, 2013
Programming
940
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web, Concurrency, FP
Hotcode, 2013
Oleksii Kachaiev
May 31, 2013
More Decks by Oleksii Kachaiev
See All by Oleksii Kachaiev
Counting HTTP with QUIC & HTTP/3
kachayev
2
340
Talking SQL to Strangers
kachayev
3
650
Counting HTTP: 0.9...3
kachayev
1
150
Managing Data Chaos in The World of Microservices
kachayev
3
740
Deep HTTP Dive Through Aleph & Netty
kachayev
6
4.1k
Keep Your Data Safe With Refined Types
kachayev
4
1.6k
Clojure at Attendify (2nd ed)
kachayev
5
1.7k
Clojure at Attendify
kachayev
4
410
Finagle & Clojure
kachayev
6
1.4k
Other Decks in Programming
See All in Programming
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
320
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
140
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
12
11k
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
310
気持ちぃ〜角丸 Squircle
ryu1013
0
370
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
110
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
140
ChromeでローカルLLM
ryu1013
0
180
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
180
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
170
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
200
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
130
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
52k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
370
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
59k
Making Projects Easy
brettharned
120
6.8k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
720
We Have a Design System, Now What?
morganepeng
55
8.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.6k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
470
Scaling GitHub
holman
464
140k
Transcript
Web, Concurrency, FP the problems that we can’t ignore ...
any more (c) Alexey Kachayev, 2013
About me Alexey Kachayev •CTO at Attendify •Open source activist
(Fn.py) •Functional programming advocate •Erlang, Python, Scala, Clojure, Haskell, Go hacker
Contacts •kachayev <$> twitter •kachayev <$> gmail •kachayev <$> github
Disclaimer #1 It’s hard to tell “is this language functional?”
We will talk about: Erlang, Scala, Clojure, Haskell
Disclaimer #2 Web is only one way to communicate. We
will talk “mostly” about web. I assume that you know what “Web” is. Note, that it changes really fast.
Modern web challenges •real-time notifications •chats and other RT messaging
systems •real-time activity stream •collaborative documents editing •task board for team •multi-player Bomberman (* or your favorite game)
Concurrency... Concurrency is the composition of independently executing computations. Concurrency
is a way to structure software, ... (c) Rob Pike “Concurrency is not parallelism”
Concurrency is hard when independent computations depend on each other
WTF??? how independent computations can depend on each other?
Why should I care? I’m just coding Python/Ruby/PHP/ Node.js...
Classical web dev •Many OS processes •Database to store data
•.... •You are welcome in the world of concurrency!
So what? •Race condition on your data •Real-time is hard
(databases are not designed for this) •Leaking abstractions •Independency is expensive •No tests •No control
Java & .NET web dev •Threads instead of processes (VM
as OS???) •You can use memory for data collaboration •Necessity to control access to shared data leads you to locks/ mutex/semaphores
So what? •Independency is still too expensive •Still hard to
test •Still hard to control •Locks are not so good abstraction
Event- driven web dev •Single-thread environment •Event-based context switching loop
•Not so “independent” as we want •Errors are hard to manage •It’s hard to keep code simple to read
Do you need more problems? •request-reply doesn’t work (almost at
all) •concurrency is hard •fault-tolerance is hard •vertical scaling is hard (as well as horizontal) •everything should have been done yesterday
How to deal with concurrency?
Story about developers and tasks board •Locks: what is locks
and why it’s not a good idea? •Message passing: how to communicate and what are the benefits? •STM: how to collaborate efficiently and not lose control?
From theory to practice
Concurrency •Erlang •Scala •others •Clojure •Haskell •others Communication Collaboration And
why do FP “features” matter?
Erlang •message-passing concurrency •multi-core support •distributed systems •“super” stable VM
(VM as OS!) •“hard to break” something •interactive development
Scala • JVM based, high performance • (mostly) functional paradigm
• expressive type system (ADT & TI) • “less code with more results” • message-passing concurrency (prev. Akka) • ... XML is native Scala type
Reactivity or “super- thin” client •Liftweb (Scala) •Nitrogen (Erlang) •N2O
(Erlang)
Clojure •FP, lisp-family •STM concurrency model •modern language •interactive development
•macros •JavaScript compiler •huge web stack
Haskell •FP, “ML-family” •green threads and STM •expressive type system
•high level of code modularity and composability •compact declarative syntax •compile-time program verification
IWBYP http://iwbyp.chris-granger.com/
How to start? •do not wait! •do not hesitate! •do
not panic!!! •do something simple •do something interesting •find problem (pain?) and solve it
Links • https://github.com/extend/cowboy • http://nitrogenproject.com/ • http://liftweb.net/ • https://github.com/twitter/finagle •
http://www.scalatra.org/ • https://github.com/ring-clojure/ring • https://github.com/weavejester/ compojure • http://pedestal.io/ • http://himera.herokuapp.com/ synonym.html • http://snapframework.com/
Questions? * other talks: https://kachayev.github.com/talks ** me: http://twitter.com/kachayev P.S. We
are hiring