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

From Functional Languages to Functional Architectures

Juliano Alves
December 28, 2020
33

From Functional Languages to Functional Architectures

Slides of my presentation for Codemotion 2020 (https://events.codemotion.com/conferences/online/2020/codemotion-online-tech-conference/)

Software tends to be organised in a similar way in different levels: methods in classes, classes in packages, packages in projects and so on. The OO approach defined a good amount of this standards. However, there are companies building massive systems out there, handling numerous requests in a functional way. Could the functional approach have any impact on architecture? Lambda functions, immutable databases and short-life infrastructure are a few examples. In this session you will see how the functional paradigm has impacted software architecture at a much deeper level than one can imagine

Juliano Alves

December 28, 2020
Tweet

Transcript

  1. From Functional Languages
    to Functional Architectures
    Juliano Alves
    @vonjuliano
    juliano-alves.com
    October 20-21-22, 2020

    View Slide

  2. Who am I?
    ● Software Engineer,
    Searcher of perfect modularization,
    Lover of Functional Languages
    ● The cool ones
    Scala, Clojure, Elixir
    ● The "vintage" ones
    Java, C#, Python, Ruby
    @vonjuliano
    juliano-alves.com

    View Slide

  3. View Slide

  4. What is software?
    "Software is representation of
    knowledge"

    View Slide

  5. How do we organise that knowledge?
    "Software tends to be organised
    the same way, in different levels"

    View Slide

  6. COMPUTATION
    INPUT OUTPUT

    View Slide

  7. SERVICE A SERVICE B SERVICE C
    SERVICE D
    SERVICE E
    SERVICE F
    SERVICE G SERVICE H SERVICE I

    View Slide

  8. COMPUTATION
    INPUT OUTPUT

    View Slide

  9. They behave as Functions.

    View Slide

  10. f(x)
    x y

    View Slide

  11. View Slide

  12. Http Server
    http
    request
    http
    response

    View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. State

    View Slide

  17. View Slide

  18. View Slide

  19. View Slide

  20. final var album = new ArrayList();
    album.add(picture1);
    album.add(picture2);
    System.out.println(album);
    // [pic1, pic2]
    album.set(1, picture3);
    System.out.println(album);
    // [pic1, pic3]

    View Slide

  21. val album = List[Picture](picture1, picture2)
    println(album)
    // [pic1, pic2]
    album.updated(1, picture3)
    println(album)
    // [pic1, pic2]
    val newAlbum = album.updated(1, picture3)
    println(newAlbum)
    // [pic1, pic3]

    View Slide

  22. State in environment

    View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. https://www.thoughtworks.com/insights/articles/understanding-clouds-significance

    View Slide

  27. State in applications

    View Slide

  28. View Slide

  29. SpaceTimeContinuumException

    View Slide

  30. View Slide

  31. https://www.confluent.io/blog/build-streaming-etl-solutions-with-kafka-and-rail-data/

    View Slide

  32. TOPOLOGY

    View Slide

  33. Conclusion

    View Slide

  34. "The way one express themselves
    affects their worldview."
    Sapir–Whorf hypothesis:
    https://en.wikipedia.org/wiki/Linguistic_relativity

    View Slide

  35. From Functional Languages
    to Functional Architectures
    Juliano Alves
    @vonjuliano
    juliano-alves.com
    October 20-21-22, 2020
    Thank you!

    View Slide