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

Automating API Orchestration - Vyne + Taxi

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
Avatar for Marty Pitt Marty Pitt
November 20, 2018

Automating API Orchestration - Vyne + Taxi

The one where Marty explores the Why's and How's of automating orchestration between microservices with Vyne & Taxi.

Avatar for Marty Pitt

Marty Pitt

November 20, 2018

Other Decks in Programming

Transcript

  1. Write code Micro services Nano services Serverless services More Code

    More Code services More More Code More Code
  2. Stage 1 Kinda Shit • Not machine readable • Word

    / Google Docs, Excel, Email • Not part of codebase / version control Stage 3 Typed Protobuf GraphQL Thrift • Object types • Protocol agnostic • Strict Type System Stage 4 Semantic Taxi JSON-LD RDF / OWL / Sparql • Microtypes • Composable • Extensible Rise of the Machines • Machine readable • Generators (to/from) • Source controlled WSDLs Swagger / RAML Stage 2 The Schema Maturity Slide
  3. Publish schemas Write adaptors Adaptors become brittle We need a

    standard! things don’t match New releases grrrrrr
  4. Goal: Be readable, to encourage people to stop using fucking

    Excel (as a schema tool. Please buy my Excel plugin)
  5. type Customer { id : CustomerId as String name :

    CustomerName email : CustomerEmailAddress? as String } type alias CustomerName as String
  6. type Customer { id : CustomerId as String name :

    CustomerName email : CustomerEmailAddress? as String } type alias CustomerName as String Type aliases (Microtypes)
  7. type Customer { id : CustomerId as String name :

    CustomerName email : CustomerEmailAddress? as String } type alias CustomerName as String Longer syntax, same effect Type aliases (Microtypes)
  8. type Customer { id : CustomerId as String name :

    CustomerName email : CustomerEmailAddress? } Nullable types (non-null is default)
  9. type Customer inherits Person { id : CustomerId name :

    CustomerName email : CustomerEmailAddress? } type Person { … } Inheritance (Composable)
  10. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } type alias OrderValue as Money operation checkAvailableCredit( CustomerId, OrderValue ) : CreditStatus
  11. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } type alias OrderValue as Money operation checkAvailableCredit( CustomerId, OrderValue( currency = ‘USD’ ) ) : CreditStatus
  12. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } type alias OrderValue as Money operation checkAvailableCredit( CustomerId, OrderValue( currency = ‘USD’ ) ) : CreditStatus Constraint on input
  13. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } operation convertCurrency( source : Money, targetCcy : Currency ) : Money
  14. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } operation convertCurrency( source : Money, targetCcy : Currency ) : Money( from source, currency = targetCcy ) Response contract
  15. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } operation convertCurrency( source : Money, targetCcy : Currency ) : Money( from source, currency = targetCcy ) Returns this type
  16. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } operation convertCurrency( source : Money, targetCcy : Currency ) : Money( from source, currency = targetCcy ) Based on this
  17. type Money { value : Amount as Decimal currency :

    Currency // Enum, defined elsewhere } operation convertCurrency( source : Money, targetCcy : Currency ) : Money( from source, currency = targetCcy ) But this bit Changed to that
  18. operation checkAvailableCredit( CustomerId, OrderValue( currency = ‘USD’ ) ) :

    CreditStatus operation convertCurrency( source : Money, targetCcy : Currency ) : Money( from source, currency = targetCcy ) Problem Solution
  19. type Customer { id : String name : CustomerName email

    : CustomerEmailAddress } Consumers gotta persist type Customer {
  20. id : String name : CustomerName email : CustomerEmailAddress }

    Consumers gotta persist type Customer { @Entity @Id
  21. id : String name : CustomerName as LegacySalutation email :

    CustomerEmailAddress } Consumers gotta map type Customer { @Entity @Id
  22. email : CustomerEmailAddress } Consumers gotta validate type Customer {

    id : String name : CustomerName as LegacySalutation @ValidEmailAddress @Entity @Id
  23. email : CustomerEmailAddress } Consumer context is hard type Customer

    { id : String name : CustomerName as LegacySalutation @ValidEmailAddress @Entity @Id
  24. Type extensions type Customer { id : String name :

    CustomerName } @Entity type extension Customer { @Id id name as LegacyMarketingName }
  25. Type extensions type Customer { id : String name :

    CustomerName } @Entity type extension Customer { @Id id name as LegacyMarketingName }
  26. Type extensions type Customer { id : String name :

    CustomerName } @Entity type extension Customer { @Id id name as LegacyMarketingName } Add annotations
  27. Type extensions type Customer { id : String name :

    CustomerName } @Entity type extension Customer { @Id id name as LegacyMarketingName } Add type aliases
  28. Type extensions type Customer { id : String name :

    CustomerName } @Entity type extension Customer { @Id id name as LegacyMarketingName } Cannot change type Can add aliases provided base type is the same
  29. Type extensions type Customer { id : String name :

    CustomerName } @Entity type extension Customer { @Id id name as LegacyMarketingName } +
  30. Type extensions @Entity type Customer { @Id id : String

    name : CustomerName as LegacyMarketingName }
  31. Holy Sheet In which we use Vyne from within Google

    Sheets, and you reach for your credit cards
  32. FAQ

  33. Q&A