Different programming models develop different mental models

Different programming models develop different mental models

An expansion on "How to authenticate a user without a username, password or database", I share how learning different programming models and paradigms has helped me solve problems more effectively in my main programming language – in this case, learning the unique programming model of Erlang. With a fun demo to boot.

Presentation at Abstractions II (abstractions.io) in September 2019, in Pittsburgh, USA.

A7100969143eaac527fc93233801f447?s=128

Simon van Dyk

August 21, 2019
Tweet

Transcript

  1. 5.

    “A developers main responsibility is to defend and maintain the

    conceptual integrity of the codebase.” – Aslam Khan
  2. 13.

    Claim Verify Store How would you do identity claim? a.

    Don’t be silly, just use OAuth b. Gait analysis c. Use their face d. Security is a lie
  3. 14.

    Claim Verify Store How would you do identity claim? a.

    Don’t be silly, just use OAuth b. Gait analysis c. Use their face d. Security is a lie
  4. 15.

    Claim Verify Store How would you do identity verification? a.

    Obviously a blood test b. OAuth, you will be assimilated c. Send them an OTP d. Fingerprint or retinal scan
  5. 16.

    Claim Verify Store How would you do identity verification? a.

    Obviously a blood test b. OAuth, you will be assimilated c. Send them an OTP d. Fingerprint or retinal scan
  6. 17.

    Claim Verify Store How would you do identity storage? a.

    Throw it in a file - that’s not a database is it? b. Mechanical turk: an army of humans write it out on paper c. Machine learning serverless blockchain™ d. Keep it in memory and never let the server die
  7. 18.

    Claim Verify Store How would you do identity storage? a.

    Throw it in a file - that’s not a database is it? b. Mechanical turk: an army of humans write it out on paper c. Machine learning serverless blockchain™ d. Keep it in memory and never let the server die
  8. 20.

    Claim Verify Store Facial recognition One time pin Memory storage

    Slack’s “magic links” or an OTP sent to an email address Erlang process storing face to email mapping in memory Face to email mapping used to identify a user
  9. 21.

    Nada Faces API Nada App AWS Rekognition Sign up AWS

    S3 { selfie } { face_id } { email selfie } Claim { email face_id } Store { otp } Verify
  10. 22.

    Nada Faces API Nada App AWS Rekognition Log in AWS

    S3 { selfie } { face_id } { email face_id } Store { otp } Verify { selfie } Claim
  11. 23.

    Claim Verify Store Face to email mapping used to identify

    a user Facial recognition # @ Face Face ID Email Image
  12. 24.

    Claim Verify Store One time pin Slack’s “magic links” or

    an OTP sent to an email address user@example.com Log in
  13. 25.

    Claim Verify Store One time pin Slack’s “magic links” or

    an OTP sent to an email address user@example.com mail@nada.com thisappdoesnothing.com/djtufy TO FROM
  14. 26.

    Claim Verify Store One time pin Slack’s “magic links” or

    an OTP sent to an email address SUCCESS!
  15. 27.

    Claim Verify Store Memory storage Erlang process storing face to

    email mapping in memory Erlang VM Web server process Agent process ...
  16. 28.

    Claim Verify Store Memory storage Erlang process storing face to

    email mapping in memory Erlang VM Web server process “a7j3hgdg”: “bob@gold.com” “jmd739sh”: “sam@mail.com”
  17. 29.
  18. 30.
  19. 34.

    2019 Today 1986 33 years
 ago 2011 ~8 years ago

    24 years ago 1995 12 years ago 2007
  20. 36.

    Programming Models “Everything is an object” “Everything is a function”

    “Everything is a process” Ruby JavaScript Elixir
  21. 37.
  22. 38.
  23. 43.

    Erlang data stores • Mnesia • ETS (Erlang Term Storage)

    • Process state (GenServer/Agent) • *Riak
  24. 44.

    • Are there relationships between the data you store? •

    Are you storing time-related data? • Do you need to be able to look at the database in the past? How do you intend to query the data?
  25. 45.

    • Data + relationships • Relationships between data (graph) •

    Simple store-retrieve • Mapping (Key-Value) • Data stored over time • Changes as facts stored over time (immutable database) Typical data storage options by query
  26. 46.
  27. 49.
  28. 55.