Erlang OTP: Distributed & Fault-Tolerant Systems Programming · Ders

Bırak-Çöksün Felsefesi

Erlang'ın bırak-çöksün anlayışını ve hataları yalıtmanın, temiz biçimde yeniden başlatmanın ve savunmacı kodlamadan kaçınmanın nasıl daha güvenilir sistemler ürettiğini anlayın.

4. ders / 413 adım

Bırak-Çöksün Felsefesi, CoddyKit'te ücretsiz bir Erlang OTP: Distributed & Fault-Tolerant Systems Programming dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Erlang OTP: Distributed & Fault-Tolerant Systems Programming öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Erlang OTP: Distributed & Fault-Tolerant Systems Programming kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

A Different Mindset

Most languages encourage catching every possible error. Erlang takes the opposite view: let it crash. A process that hits an unexpected state should die and be restarted into a known-good state.

Why Crashing Is Good

A crash is a clean, well-defined failure. Trying to limp along in a corrupted state often causes worse, harder-to-debug problems later.

Process Isolation

Erlang processes share nothing. One crashing process cannot corrupt another's memory, so a failure stays contained.

Happy-Path Code

Because supervisors handle failures, you write only the success case. No tangle of defensive checks.

handle(Request) ->
    {ok, Data} = fetch(Request),  % crashes if not ok
    process(Data).

Assertive Matching

The match {ok, Data} = fetch(...) doubles as an assertion: if fetch returns anything else, the process crashes immediately rather than continuing with bad data.

Supervisors Do the Recovery

A supervisor (covered earlier) watches workers and restarts them per its strategy. Let-it-crash works because supervision provides recovery.

Separating Logic from Errors

Keep risky operations in worker processes that may crash, while a stable supervisor process holds the recovery policy. This separation keeps both simple.

When NOT to Crash

Expected, recoverable conditions (a user typing a bad value) are not exceptional. Handle those normally; crash only on truly unexpected states.

case validate(Input) of
  ok -> save(Input);
  {error, Reason} -> {error, Reason}
end.

Errors vs Exits

A runtime error (like a failed match) crashes the process with reason {badmatch, ...}. You can also crash deliberately with exit/1 to signal an unrecoverable problem.

exit(disk_full).

Crash Reports & Logging

When a process dies, OTP logs a crash report with the reason and stack. SASL and logger capture these so failures are observable even though you did not catch them.

The Payoff

Let-it-crash plus supervision yields systems that self-heal from transient faults and stay running for years. Code is smaller, clearer, and focused on the real work.

Quick Check

Test your understanding of the philosophy.

Recap

You learned the let-it-crash philosophy.

  • Crash on unexpected state instead of coding defensively
  • Process isolation contains failures
  • Supervisors provide recovery
  • Still handle expected, recoverable cases normally
Başlamak ücretsiz

Yapay zeka eğitmeniyle Erlang öğren — ücretsiz

Tarayıcında gerçek kod yaz ve çalıştır, 7/24 yapay zeka eğitmeninden anında yardım al; web'de ya da uygulamada kaldığın yerden devam et.

Kurslar
12
Dersler
48

Sıkça Sorulan Sorular

“Bırak-Çöksün Felsefesi” dersi ücretsiz mi?

Evet — “Bırak-Çöksün Felsefesi” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Erlang OTP: Distributed & Fault-Tolerant Systems Programming kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Erlang OTP: Distributed & Fault-Tolerant Systems Programming kursu toplamda 4 dersten oluşur.

“Bırak-Çöksün Felsefesi” dersinde ne öğreneceğim?

Erlang'ın bırak-çöksün anlayışını ve hataları yalıtmanın, temiz biçimde yeniden başlatmanın ve savunmacı kodlamadan kaçınmanın nasıl daha güvenilir sistemler ürettiğini anlayın. Erlang OTP: Distributed & Fault-Tolerant Systems Programming ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

Erlang OTP: Distributed & Fault-Tolerant Systems Programming öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te Erlang OTP: Distributed & Fault-Tolerant Systems Programming, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“Bırak-Çöksün Felsefesi” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu Erlang OTP: Distributed & Fault-Tolerant Systems Programming dersinde kod yazıp çalıştırabilir miyim?

Evet. Her Erlang OTP: Distributed & Fault-Tolerant Systems Programming dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Bağlantılar ve İzleyiciler Açıklaması
  2. Sağlam Hata İşleme
  3. Önce Çöken Tasarım Yaklaşımı
  4. Bırak-Çöksün Felsefesi
← Erlang OTP: Distributed & Fault-Tolerant Systems Programming Sayfasına Dön