Posts

Showing posts with the label architecture

API Gateway Design

Image
Clash Royale CLAN TAG #URR8PPP API Gateway Design Api gateway http://microservices.io/patterns/apigateway.html seems to be a good pattern to be adopted in Micro Service architecture(Not internal communication between services). But I have below queries I am unable to understand how API Gateways should be designed itself. We can't have just one api gateway for all services. For example for Uber we have Trip, Cabs, Driver, User, Pricing Micro Services, so how many API Gateways should we design. In https://medium.com/netflix-techblog/optimizing-the-netflix-api-5c9ac715cf19 what does Dynamic Endpoints means. I was thinking like in Uber case,to display user first page we will need cabs and pricing. So we will expose an API in api-gateway some /home and from here asynchronously we will call Pricing and Cabs api will merge and return the response. Is there any batter way to do this? By clicking "Post Your Answer...

Ensure that API calls are efficient

Image
Clash Royale CLAN TAG #URR8PPP Ensure that API calls are efficient I'm integrating with the Sport Radar API. This is a pretty great API but I'm noticing it doesn't have a particular Endpoint that I was hoping to leverage. Sport Radar I noticed that the API does not have a Players index call. In order to get all the players in the league you have to go through this process (Confirmed by the API team) Players get 1) Call an endpoint that lists the ids of each team in the league. 2) For each Team id call an endpoint that gets each team and lists each player for each team. All in all that is over 30 API requests for each time I need to run a fairly common function. 30 Store the Players in the database. So instead of reaching out through the API every time I need to list the players. I can just make a DB query for the players. This solution seems heavy handed though, I'd like for my application to not have to keep track of the players. What are some ways of solving this ...

Electron and angularJS app architecture - SPA clone in two windows

Image
Clash Royale CLAN TAG #URR8PPP Electron and angularJS app architecture - SPA clone in two windows In mainWindow of my application I have angularJS SPA. Everything is fine untill I create new window. In every window I need to loadURL which is path to HTML document like in mainWindow : mainWindow = new BrowserWindow({ width: 790, height: 580 }); mainWindow.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), // load - index.html angularjs dashboard slashes: true })); Problem is that since I have SPA in my mainWindow after I open new window I should load entire SPA to new window as well as in mainWindow and just redirect to correct (hidden) url so I would have some other content in this new one. I would need to load this entire SPA in order to have access to my SPA services, factories and directives which I need to use in new window. let createQuestionWindow = () => { questionWindow = new BrowserWindow({ width: 380, heigh...