questions Flashcards
What is scalability?
The property of a system to handle a growing amount of work by adding resources to the system
What is clustering and what’s its purpose?
A system of interconnected nodes that by working together help in executing an application - helps handle load balancing
Name the differences between object-oriented and component-based design.
Object-oriented programming focuses on the relationships between classes that are combined into one large binary executable, while component-oriented programming focuses on interchangeable code modules that work independently and don’t require you to be familiar with their inner workings to use them.
What is session replication?
Session replication is a mechanism used to replicate the data stored in a session across different instances. However, the replicated instance must be part of the same cluster. When session replication is enabled in a cluster environment, the entire session data is copied on a replicated instance
What is the best way to pass configuration variables to applications?
Imo, config file as it is committable, but command line is possible
Walk me through the process of gathering system requirements.
Write out usecases and divide them into the two types of requirements
What are the 2 types of requirements?
Functional - capabilities, usability, features, and operations as they relate to the intended purpose of the product
Non-functional - Tends to be more technical in application, performance, stability, security and technical specifications
How would you design a payment processing system?
- Front end system takes customer payment
- Create record for customer payment to handle payment status
- Front end system drops a message on the payment queue referencing newly created db record as well as any additional payment details
- If anything fails for this or previous step, notify user
- Async processor pulls from queue processing individual payment tasks. This is typically done via 3rd parties (such as Visa)
- If any of these steps fail notify user (typically via e-mail).
- If it passes, payment succeeds - continue to next step in business flow
What is a distributed system?
A distributed system in its most simplest definition is a group of computers working together as to appear as a single computer to the end-user
What does idempotent mean?
idempotence refers to the ability of a system to produce the same outcome, even if the same file, event or message is received more than once
What is crash-tolerance?
This means that the data service’s daemon processes must be relatively stateless, in that they write all updates to disk synchronously. Aka- the ability for a system to continue working if one of the components fail
What does “program to interfaces, not implementations” mean?
Coding against interface means, the client code always holds an Interface object which is supplied by a factory.
Any instance returned by the factory would be of type Interface which any factory candidate class must have implemented. This way the client program is not worried about implementation and the interface signature determines what all operations can be done.
This approach can be used to change the behavior of a program at run-time. It also helps you to write far better programs from the maintenance point of view.
What are the differences between continuous integration, continuous delivery, and continuous deployment?
Developers practicing continuous integration merge their changes back to the main branch as often as possible. By doing so, you avoid the integration hell that usually happens when people wait for release day to merge their changes into the release branch.
Continuous delivery is an extension of continuous integration to make sure that you can release new changes to your customers quickly in a sustainable way. This means that on top of having automated your testing, you also have automated your release process and you can deploy your application at any point of time by clicking on a button.
Continuous deployment goes one step further than continuous delivery. With this practice, every change that passes all stages of your production pipeline is released to your customers. There’s no human intervention, and only a failed test will prevent a new change to be deployed to production.
Q3: What does SOLID stand for? What are its principles?
S - Single-responsiblity principle. A class should have one and only one reason to change, meaning that a class should have only one job. O - Open-closed principle. Objects or entities should be open for extension, but closed for modification. L - Liskov substitution principle. Let q(x) be a property provable about objects of x of type T. Then q(y) should be provable for objects y of type S where S is a subtype of T. I - Interface segregation principle. A client should never be forced to implement an interface that it doesn't use or clients shouldn't be forced to depend on methods they do not use. D - Dependency Inversion Principle. Entities must depend on abstractions not on concretions. It states that the high level module must not depend on the low level module, but they should depend on abstractions.
What Is BASE Property Of A System?
Basically available indicates that the system is guaranteed to be available
Soft state indicates that the state of the system may change over time, even without input. This is mainly due to the eventually consistent model.
Eventual consistency indicates that the system will become consistent over time, given that the system doesn’t receive input during that time.