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

Vx Reboost Day - API

Phil
March 23, 2023

Vx Reboost Day - API

Phil

March 23, 2023
Tweet

More Decks by Phil

Other Decks in Programming

Transcript

  1. INTERN 3 MONTH DAY, YEAR • Wikipedia: «An application programming

    interface (API) is a way for two or more computer programs to communicate with each other.» • Provide functionality against "outside" to the clients and protect internal functions • APIs are indispensable nowadays, humans and machines consume more and more data / / API ?
  2. INTERN 5 MONTH DAY, YEAR • allow third parties to

    use its data, even in a limited sense • securely control and manage how users and systems access data and service functionality • monetize its APIs so that they become a line of revenue (PayPal, Twint, Twitter, etc.) Examples from Vx APIs - EPIM API (provides Article/Price Data to third parties) - Multichannel (Erply Integration) APIs (connects Erply with Comarch) - Salesforce Integration APIs (connects Salesforce with Comarch) - InRiver Integration API (connects InRiver with Comarch) / / API – ADVANTAGES
  3. INTERN 6 MONTH DAY, YEAR • API development can be

    complex and costly to integrate with the systems and data they represent. • APIs are also vulnerable to cyber attacks related to data exposure, user authentication, object-level and function-level authorization, mass assignment and injection attacks. • APIs are frequently updated, making it difficult to keep documentation up to date. • APIs must be tested to ensure they perform as needed. The best approach is to codify testing practices. / / API – CHALLENGES
  4. INTERN 7 MONTH DAY, YEAR • SOAP • REST •

    GraphQL • GRPC / / API – TYPES
  5. INTERN 8 2/14/2023 • Stateless: Server doesn’t hold / rely

    on information from earlier requests − different requests can be processed by different servers (high availability/load balancing) − scaling architectures is easy • Stateful: Server hold state information between requests − scaling architectures is difficult/complex − server design/implementation is complicated / / STATELESS VS. STATEFUL
  6. INTERN 9 MONTH DAY, YEAR • Simple Object Access Protocol

    • released as XML-RPC in 1998 is a protocol • focus exposing application logic (not data) as services • WSDL defines “contract” between client / service, is static (re-)generate useable client proxy • Stateful • widely used in Legacy Systems / / SOAP
  7. INTERN 10 MONTH DAY, YEAR • Representational state transfer •

    Everything is a resource, identified by a URI (http://articles/1234) • Is a «Software architectural pattern» • based on HTTP methods (GET, POST, etc.) • Stateless • REST is efficient (no XML limitation) and faster (less bandwidth, no overhead) • REST has better performance/scalability, supports Caching • REST is simpler to use (no WSDL needed) • widely used in Modern Environments / / REST
  8. INTERN 12 MONTH DAY, YEAR • Facebook released it in

    2015 • data query and manipulation language for APIs • Stateless • Smaller payloads • From performance, payload size, developer time, and built-in documentation • Facebook, Github, AirBnb, etc. / / GRAPHQL
  9. INTERN 14 MONTH DAY, YEAR / / GRPC • Google

    released it 2016 • using Protobuf (Protocol buffers/serialize) for data exchange (not json like GraphQL) • gRPC has a schema-like file, .proto, that describes the API • Stateless • Advantages: Lightweight messages, can be up to 30 percent smaller in size than JSON messages • High performance: gRPC is 8x times faster than REST+JSON communication • Support for data streaming with event-driven architectures: server-side streaming, client-side streaming, and bidirectional streaming • Google, Netflix, Dropbox, etc.