How to cache Web API response?

What are good ways to decide the best architecture for a web application?

  • How do I brainstorm for web application architecture and choose the best among all ? I want to take all the parameters into consideration like scalability, extensibility, availability, legacy systems, feasibility, performance, complexity, cost ? How can I generalize the steps to get to the solutions for all types of web applications ? My idea to solve the problem is : -Define a web application flow client to server (only two steps like if the client requests "this" then the client gets "that" response) Then break the problem down on server side. -We can have several layers on server side (presentation, business logic, database, cache). -Those layers can communicate to each other in several ways (that can be internal or external for that application server). -Same goes for web server (it may communicate with other applications or web server internally or externally). Now We can break down the problem on each above step. How can we do that to reach the best optimal solution for all use cases. How should we break down further ? I think those steps should be common and necessary for all web applications.

  • Answer:

    First, I need to caution your from over-engineering your product, which is something that definitely comes across in your question. There is going to be a tradeoff between scalability, extensibility, availability on the one hand, and feasibility, complexity, and cost. You should pick feasibility, complexity, cost, and rapid development first, because the last thing you want is to perfectly architect an application that no one ever uses. To achieve that, the quickest way is to simply use a framework/library and follow its conventions (Rails, Django, Sinatra, Flask, Express, etc.).That will get you up to speed really quickly with very moderate tradeoffs in raw application speed and extensibility.

Brian Chu at Quora Visit the source

Was this solution helpful to you?

Other answers

One way is the following : 1) Logical Architecture - Create a list of things that you want and structure it along say :    a) Storage : What type of data you want to store - master, transactional, documents, historical etc    b) Integration - Which third party services or data that you need to integrate and how - web services, file based etc    c) Services - What services are required e.g logging, search, caching, auditing etc    d) Functional Components : Product Catalog, Payments etc    e) User Interface : Web, Mobile, App etc 2) Technical Architecture - Map technologies and frameworks to achieve logical components. Start from the high priority components - For e,g if you its an ecommerce application, first focus should be on the functional components because if you choose say a ecommerce engine, it will drive other decisions as well. 3) Deployment Architecture - This will be a diagram that will depict how the deployment will look - this is where most of the scalability, availability considerations should come - Key things you can look at here - Load balancing, no of servers at each layer and scale up/scale down strategy, database - scaling etc. You can skip or add more details based on complexity and scale of what you are trying to achieve. Note : This is pretty generic but just thought to put it across if it is any helpful.

Parikshit Borkotoky

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.