Slide 1

Slide 1 text

ENTWURF INTERN 2/14/2023 / / SOFTWARE ENGINEERING INTERFACES@VX – BLOCK 3 REBOOST DAY KNOWLEDGE SHARING T&T

Slide 2

Slide 2 text

INTERN 2 2/14/2023 • API ? • API Types • DEMO • Q/A / / AGENDA

Slide 3

Slide 3 text

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 ?

Slide 4

Slide 4 text

INTERN 4 MONTH DAY, YEAR / /

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

INTERN 7 MONTH DAY, YEAR • SOAP • REST • GraphQL • GRPC / / API – TYPES

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

INTERN 11 REST EXAMPLE

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

INTERN 13 GRAPHQL EXAMPLE

Slide 14

Slide 14 text

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.

Slide 15

Slide 15 text

INTERN 15 GRPC EXAMPLE

Slide 16

Slide 16 text

INTERN 16

Slide 17

Slide 17 text

INTERN 17 2/14/2023 / /