7
Best Practices – API Integrations Rohan Rasane 1

Best practices - API Integrations

Embed Size (px)

Citation preview

Page 1: Best practices - API Integrations

Best  Practices  – API  Integrations

Rohan  Rasane 1

Page 2: Best practices - API Integrations

Best  Practices  -­‐ API  Integrations

Analysis Design Develop Test  &  Performance Manage Checkups

Important  Phases  in  API  Integration

Rohan  Rasane 2

Page 3: Best practices - API Integrations

• Analysiso Understand  the  roadmap  of  the  integrating  appo Identify  Primary  and  secondary  needs

• Designo Reusable• Patterns

§ FTP§ Schedulers§ PUB-­‐SUB§ Errors

Analysis

Design

Best  Practices

Rohan  Rasane 3

Page 4: Best practices - API Integrations

o Performance• Throughput• Latency

o Secureo Reliableo Flexibleo Error  handlingo Entity  and  relationshipo Data  exchange  patterns

• Sync  vs  asynco Size

• Paginateo JSON  Only  XML  if  required

Design

Best  Practices

Rohan  Rasane 4

Page 5: Best practices - API Integrations

• Developo Mock  serviceso Create  unit  tests  o Usable

• Document usage on  the  consoleo Use  the  HTTP  method  names  to  mean  something:

• POST  -­‐ create  a  record  or  resource  • PUT  – update  a  record  or  resource  • GET  -­‐ read  a  record  or  resource(single  or  multiple).• DELETE  -­‐ remove  a  record  or  resource(single  or  multiple).

o Coding  conventions• Java  for  internal  code• Restful  APIs

§ Naming  conventions

Develop

Best  Practices

Rohan  Rasane 5

Page 6: Best practices - API Integrations

o Redesign  if  necessaryo Ensure  loose  coupling  for reusabilityo Handle  all  known  caseso Code  Reviews

• Test  &  PerformanceoAutomateo Load  test  with  Jmeter,  Nodejs Simulators

• Manageo Identify  Risks  – Impacting  SystemsoHandle  changes  with  versioning

• Regular checkups  and  adjustoNode Capacityo Frequency

Develop

Test

Performance

Manage

Checkups

Best  Practices

Rohan  Rasane 6

Page 7: Best practices - API Integrations

Links  &  Resources  • Rest

o https://en.wikipedia.org/wiki/Representational_state_transfer• Rest  APIs

o http://www.restapitutorial.com/index.html• Http  Methods

o http://www.restapitutorial.com/lessons/httpmethods.html• Https  Status  Codes

o http://www.restapitutorial.com/httpstatuscodes.html• JSON

o http://www.json.org/• Micro  services

o http://microservices.io/patterns/microservices.html• API  Led  connectivity

o https://www.mulesoft.com/sites/default/files/resource-­‐assets/API-­‐led-­‐connectivity-­‐new-­‐soa-­‐updated.pdf

Rohan  Rasane 7