Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flow Based Programming in Elixir

Flow Based Programming in Elixir

An application is defined

as its processes

communicating

via Information Packets

with externally defined connections.

This talk was held at the #52 Elixir User Group Berlin on October 11, 2018.

https://github.com/suitepad-gmbh/pipette
https://hexdocs.pm/pipette/Pipette.html

Google Bot Verification Example
hexdocs.pm/pipette/google_bot_verification.html

Lukas Rieder

October 11, 2018
Tweet

More Decks by Lukas Rieder

Other Decks in Programming

Transcript

  1. FBP

  2. Run a reverse DNS lookup (type PTR) Domain name ends

    in googlebot.com. or google.com. Run a forward DNS lookup (type A) Verify that response to the same IP
  3. defmodule GoogleBotVerification do @subscribe ptr_query: :IN @subscribe verify_domain: :ptr_query @subscribe

    dns_query: :verify_domain @subscribe verify: :dns_query @subscribe OUT: :verify end
  4. @gdomains ~w[google.com. googlebot.com.]
 def verify_domain(%{domain: domain} = state) do if

    String.ends_with?(domain, @gdomains) do {:ok, state} else {:error, :invalid_ptr} end end
  5. Thank you Lukas Rieder, @Overbryd I write programs. I give

    talks. FBP {:pipette, "~> 0.1.0"} https://github.com/suitepad-gmbh/pipette