nginx - api gateways. how are they written and is there guideline for how they interact with its clients. -


i've been doing ton of research on microservices cannot find single piece of code written api gateway. understand between clients , services have api gateway allows client make 1 requests on iot gateway , gateway can make many requests internally services build response. article on nginx

the api gateway responsible request routing, composition, , protocol translation.


use case

suppose support 2 clients. android , angular app (browser) , let's make tangible user story client online shopping store.

the shopping store have different services broken out servers , each service built on different platform/language different database. self contained can scale in cloud without having scale entire application. if there intense algorithm needs run payment. payment services can spin few more servers balance load , decrease user wait time.

but written in java have http/rest exposed api consumed. if it's written in c++/golang/node doesn't matter language, instead of exposing api via http it's different protocol mean on api gateway - how handle response?

the client goes , makes request home page have 3 things loaded

  • shopping cart
  • list view of shoppings items
  • current specials

the client make 1 request api gateway let's apigateway/apiv1/home api gateway have 3 requests services

  • serviceshopping/apiv1/shoppinglist
  • servicecart/apiv1/cart
  • servicespecial/apiv1/specials

at point 3 services written in different language , use different protocol. how 3 services requested , on response client (a single response) how concatenated? json object specific schema? confused...

sorry long post it's simple question think, needed setup can conceptualize , explain.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo