All Flashcards
What is a Tier
A tier is a physical separation of components in an application or a service. Usually the physical separation matches 1-1 with the logical separation (or layer)
Examples of components (5)
Database, Backend Application Server, User Interface, Messaging, Caching.
What is a Single-Tier Application?
- Can you give examples.
- What are the advantages and disatvantages
A single-tier application is an application where the user interface, backend business logic, and the database all reside in the same machine.
- MS Office, PC Games or an image editing software like Gimp.
- The main upside of single-tier applications is that they have no network latency because every component is located on the same machine.
- Performance of the application highly depends on the configuration of the machine. Once the software is shipped, no code or feature changes can be done. The code in single-tier applications is also vulnerable to being tweaked and reversed engineered.
What is a Two-Tier application
A two-tier application involves a client and a server. The client contains the user interface and the business logic in one machine. Meanwhile, the backend server includes the database running on a different machine.
It’s useful when we need to reduce the network latency. Also when we need to control the data.
What is Three-Tier Applications
In a three-tier application, the user interface, application logic, and the database all lie on different machines and, thus, have different tiers. They are physically separated.
What are N-Tier Applications
An n-tier application is an application that has more than three components involved. E.g.
- Cache
- Message queues for asynchronous behavior
- Load balancers
- Search servers
- Web services
What is Single Responsibility Principle?
Single responsibility principle simply means giving only one responsibility to a component and letting it execute it perfectly, be it saving data, running the application logic or ensuring the delivery of the messages throughout the system.
This approach gives us a lot of flexibility and makes management easier, like when upgrading a database server.
We can also have dedicated teams and code repositories for every component, which keeps things cleaner.
What is Separation of Concerns
Separation of concerns kind of means the same thing, be concerned about your work only and stop worrying about the rest of the stuff.
What is the difference between Tier and Layer
The difference between layers and tiers is that layers represent the conceptual organization of the code and its components, whereas, tiers represent the physical separation of components.
What is Client-Server Architecture? What is Client? What technologies are used in Client? Thin Client vs Thick Client. What is a Web Server?
The architecture works on a request-response model. The client sends the request to the server for information and the server responds with it.
- A client is the window to our application
- Based on client type but web based client usually are written in ReactJS, AngularJS, VueJS, jQuery etc All these libraries use JavaScript.
- Thin client holds UI only. No business logic. Thick client holds all or some part of the business logic.
What is a Web Server?
Name other kind of servers (5).
Name web servers used to host JAVA application.
- The primary task of a web server is to receive the requests from the client and provide the response after executing the business logic based on the request parameters received from the client.
- Servers running web applications are commonly known as the application servers.
- Proxy Server, Mail Server, File Server, Virtual Server.
- Apache HTTP Server (static serving), Apache Tomcat (dynamic serving) or Jetty
What is a Request-response model?
The client sends the request and the server responds with the data :)
What HTTP
HTTP protocol is a request-response protocol that defines how information is transmitted across the web.
It’s a stateless protocol, and every process over HTTP is executed independently and has no knowledge of previous processes.
What is REST?
REST endpoint
REST stands for Representational State Transfer. It’s a software architectural style for implementing web services. Web services implemented using the REST architectural style are known as the RESTful Web services.
A REST API is an API implementation that adheres to the REST architectural constraints.
Describe HTTP PULL vs PUSH?
What technologies are used for PULL (2)?
What technologies are used for PUSH (5)?
HTTP Pull = Client pulls data. Normal behavior.
Technologies: HTTP Method, AJAX Call
HTTP Push = The client sends the request for particular information to the server just once. After the first request, the server keeps pushing the new updates to the client whenever they are available.
Also known as Callback.
Technologies: Ajax Long polling, Web Sockets, HTML5 Event Source, Message Queues, Streaming over HTTP