Microservice architecture, a programming languages perspective

Microservice architecture, a programming languages perspective

Microservice architectures have taken over the industry, and with the rise of cluster schedulers and serverless the envelope is being pushed even further. However while tools like microservices, containers, and schedulers were designed to solve problems associated with the systems of old, they introduce many others like API migrations, service dependencies, and deployment automation. In this talk we will explore these new challenges and see how curiously, these system-level concerns can be tackled with some inspiration from the programming languages community, viewing the world of microservices through the lens of type systems and language runtimes.

Fb8e986500c5059b2a6c0b2184bb0faf?s=128

Adelbert Chang

July 15, 2019
Tweet

Transcript

  1. Microservice architecture A programming languages perspective Adelbert Chang @adelbertchang AI

    Engineer @ Target
  2. Monolithic architecture

  3. Microservice architecture

  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. val average : float -> float -> float

  14. val average : float -> float -> float average "hello"

    "curryon"
  15. val average : float -> float -> float average "hello"

    "curryon" Error: This expression has type string but an expression was expected of type float
  16. None
  17. Give me a JSON object with a "name" field.

  18. Give me a JSON object with a "name" field. {

    "name": "Adelbert" }
  19. Give me a JSON object with a "name" field. {

    "name": "Adelbert" }
  20. None
  21. { "name": "Heather" }

  22. { "name": "Heather" } "missing field `age`", line: 1, column:

    20
  23. { "name": "Heather" } "missing field `age`", line: 1, column:

    20
  24. None
  25. Deployment service

  26. Deployment service

  27. Deployment service

  28. Deployment service

  29. Deployment service

  30. Deployment service

  31. Deployment service

  32. Deployment service

  33. What we need

  34. What we need

  35. What we need Language runtime Deployment service

  36. What we need Language runtime Deployment service Creating an object

    Deploying a service
  37. What we need Language runtime Deployment service Creating an object

    Deploying a service Reference tracking Service dependencies
  38. What we need Language runtime Deployment service Creating an object

    Deploying a service Reference tracking Service dependencies Garbage collection Deprecating legacy services
  39. What we need Language runtime Deployment service Creating an object

    Deploying a service Reference tracking Service dependencies Garbage collection Deprecating legacy services Type safety Schema checking and evolution
  40. Deployment runtime

  41. Deployment runtime

  42. Deployment runtime

  43. Deployment runtime

  44. Deployment runtime

  45. Deployment runtime

  46. Deployment runtime

  47. Deployment runtime

  48. Deployment runtime

  49. Deployment runtime

  50. Deployment runtime

  51. Deployment runtime

  52. Deployment runtime

  53. Deployment runtime

  54. Deployment runtime

  55. Deployment runtime

  56. Deployment runtime

  57. Deployment runtime

  58. Deployment runtime

  59. Deployment runtime

  60. Deployment runtime

  61. Deployment runtime

  62. Deployment runtime

  63. Deployment runtime

  64. Deployment runtime

  65. Deployment runtime

  66. Deployment runtime

  67. Deployment runtime

  68. Deployment runtime

  69. Deployment runtime

  70. Deployment runtime

  71. Deployment runtime

  72. Deployment runtime

  73. Deployment runtime

  74. Deployment runtime

  75. Deployment runtime

  76. Deployment runtime

  77. Deployment runtime Load balancer

  78. Deployment runtime Load balancer

  79. Deployment runtime Load balancer

  80. Deployment runtime Load balancer

  81. https://getnelson.io/

  82. { "name": "Heather" } "missing field `age`", line: 1, column:

    20
  83. None
  84. syntax = "proto3"; message Person { string name = 1;

    uint32 age = 2; }
  85. syntax = "proto3"; message Person { string name = 1;

    uint32 age = 2; } protoc --java_out=./java --python_out=./python person.proto
  86. syntax = "proto3"; message Person { string name = 1;

    uint32 age = 2; } public static final class Person extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Person) PersonOrBuilder { protoc --java_out=./java --python_out=./python person.proto
  87. syntax = "proto3"; message Person { string name = 1;

    uint32 age = 2; } public static final class Person extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Person) PersonOrBuilder { Person = _reflection.GeneratedProtocolMessageType( 'Person', (_message.Message,), dict( DESCRIPTOR = _PERSON, __module__ = 'person_pb2' # @@protoc_insertion_point(class_scope:Person) )) _sym_db.RegisterMessage(Person) protoc --java_out=./java --python_out=./python person.proto
  88. Request schema Response schema

  89. Schema evolution Taken from https://docs.confluent.io/current/schema-registry/avro.html

  90. Schema evolution Taken from https://docs.confluent.io/current/schema-registry/avro.html

  91. Compatibility type Changes allowed Upgrade first Schema evolution Taken from

    https://docs.confluent.io/current/schema-registry/avro.html
  92. Compatibility type Changes allowed Upgrade first Backwards • Delete fields

    • Add optional fields Consumers Schema evolution Taken from https://docs.confluent.io/current/schema-registry/avro.html
  93. Compatibility type Changes allowed Upgrade first Backwards • Delete fields

    • Add optional fields Consumers Forwards • Add fields • Delete optional fields Producers Schema evolution Taken from https://docs.confluent.io/current/schema-registry/avro.html
  94. Compatibility type Changes allowed Upgrade first Backwards • Delete fields

    • Add optional fields Consumers Forwards • Add fields • Delete optional fields Producers Full • Modify optional fields Any Schema evolution Taken from https://docs.confluent.io/current/schema-registry/avro.html
  95. None
  96. None
  97. Related work • Nelson https://getnelson.io/ • Unison http://unisonweb.org/posts/ • Lasp

    https://lasp-lang.readme.io/ • Partisan http://partisan.cloud/ • Orleans https://dotnet.github.io/orleans/
  98. EOF