week 6 Flashcards

1
Q

AWS regions & availability zones

A
  • spans 77 Availability Zones within 24 geographic regions around the world,
  • AWS Regions: geographical location with a collection of availability zones mapped to physical data centers in that region
  • AWS Availability Zones: logical data center in a region available for use by any AWS customer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 autoscaling

A

helps you maintain application availability and allows you to automatically add or remove EC2 instances according to conditions you define

benefits:

  • Improve Fault Tolerance
  • Increase Application Availability
  • Lower Costs

groups: collections of EC2 instances with similar charcteristics
launch configuration: template used by auto scaling group to launch EC2 instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Git flow & Branching

A

branching: a reference to commit, branch itself represents the HEAD of a series of commits
- default branch name in Git is master, which commonly represents the official, working version of your project
- a strategy that allows developers to take a snapshot of the master branch and test a new feature without corrupting the project in production. If the tests are successful, that feature can be merged back to the master branch and pushed to production.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

virtual machines

A

simulate a physical server so that multiple “servers” can run on a single machine

Pros:
near total isolation
Provides virtualization, virtualizing the entire OS
Ensures an application runs reliably regardless of Host

Cons:
considered “bulky”, expensive in the context of resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

containers

A

bundle together applications with their supporting libraries and dependencies, allowing them to run isolated from one another

Pros:

  • considered “light weight”, because they don’t require spinning up a whole guest OS
  • they can enable layers of isolation or partial isolation– depending on how they are implemented
  • provide a virtualized view of certain resources.
  • Package an application in an isolated environment
  • Ensure an application runs reliably regardless of Host

Cons:

  • having layers of isolation
  • if you have need of very strict and complete isolation the ability to have layers can be a con
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

containerization

A

helps to ensure the application or set of processes can run reliably regardless of the host environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

managing containers

A
  • list containers
  • run command in running container
  • view container logs
  • list port mappings between containers ports and hosts
  • stop a container
  • pause and unpause container
  • start container
  • remove container
  • remove volume
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

docker architecture

A
  • Docker CLI (Command Line Interface) client: what Docker developers typically use for interactions with the Docker daemon, prefaced by the docker command
  • Docker Daemon: long running process on the docker host that does all the heavy lifting of managing Docker objects- containers, images, etc.
  • Rest API: underlying commands used by the CLI and other applications to interact with the Docker Daemon
  • Docker registries: provide a centralized place to store images, allowing you to easily share images between docker hosts.
  • Docker objects: are managed by the docker daemon. include images and containers. Images are the templates that outline all dependencies for a particular container and it’s primary process. Meanwhile the container is the runnable instance of a set of processes and their dependencies.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

dockerfile

A

Defines everything needed for an image. It outlines the starting point, dependencies and commands that make up all the processes needed for an image and in turn a container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

docker volumes

A

a way to persist data for a container

They facillitate:

  • sharing data between many different containers
  • decoupling of host and container
  • storing data remotely
  • moving data between hosts or backing up data between hosts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

docker best practices

A
  • lightweight containers and images
  • less in working directory means faster the process and lighterweight the image
  • least number of ultimate layers for an image possible
  • use volumes for persistent data
  • use secrets for sensitive data and config files for configurations that are not sensitive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

dockerfile commands

A

FROM image name: specifies the parent image from which the new image should be based
RUN: used to set up image
ADD : adds files from build context or url to the image
COPY : adds files from the build context to the image
EXPOSE: outlines the ports that the are being listened on by processes in the container
VOLUME [“/nameofdir”]: indicates what directory to connect a volume to when running the docker container
WORKDIR : sets the working directory in the image and eventual container of commands that follow
CMD: used to run the app, processes etc. needed inside of your container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

building an image

A

create image with build: “> docker build anyflags PATH”
create image with commit: “> docker commit flags CONTAINER imagename”
image management: “docker images”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

creating containers

A

> docker create imagename - creates a container that is in the “created” state
docker run flags imagename - pulls the image from the registry, then creates and runs the container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

docker compose

A

the tool that makes creating and managing multi-container applications easier.

file components:
version
services: image, build, ports, environment, env_file, restart
volumes
networks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

DevOps

A
  • Software Development (dev) Operations (ops)
  • set of practices and methodologies designed to combine the development, deployment and maintenance of code into a streamlined process

steps:

  • Source code Control: Producing (writing) code and pushing to a repository
  • Building and Testing Automation: Test basic functionality of code (Generally unit testing) and create a new, working build
  • Deploying to Staging: Deployment of working build to a temporary environment
  • Acceptance Testing: Undergo other more complex tests (systems, integration) within temporary environment
  • Deployment of Build: Migrate working build to Production environment accessible by end users
17
Q

Agile

A

approach to SDLC that is based on iterative development; wherein, requirements, solutions and systems evolve throughout the production of software, and collaboration between cross-functional teams. Due to its flexibility Agile is considered the standard for development.

Benefits of Agile:

  • Client Collaboration is generally regarded positively
  • Agile team cultures tend to stay more self-organized and motivated
  • Overall quality of product is usually higher due to iterative nature
  • Less risk in development process due to incremental nature of development

Risks/Considerations:
- Not as useful for smaller development projects
- Generally there are higher costs associated with an Agile workflow
- Development time can bloat if managed improperly or requirements are not clear during each step of the development
Requires more experienced members during the planning and management of projects

18
Q

continuous integration

A

process of regularly and consistently merging code into a central repository and reviewing new code to ensure that it integrates well within the previously established code base.

benefits:

  • Ensures the entire team works on the most up to date code
  • Detects broken builds quickly
  • Reduces risk in development when a large codebase has already been established.
  • test code easily
19
Q

continuous deployment

A

process of releasing software in which changes are tested for stability and correctness automatically

Costs/Risks of Continuous Deployment:

  • Establishing a Continuous Deployment pipeline requires a more substantial investment in the engineering, and the testing culture.
  • Documentation of processes is required to communicate to development, production and testing teams.
  • Ongoing maintenance of deployment pipeline is required to ensure work continues running smoothly, increasing production costs.
  • Feature flags (communication of completed features and progress) are required for coordination between departments.

Benefits of Continuous Deployment:

  • Even faster development process, without the need to pause for deployment.
  • New releases are less risky, as small changes can be easily recognized and fixed, allowing for better and quicker feedback.
  • Increased communication and regular streams of improvements are generally regarded highly by customers.
20
Q

continuous delivery

A

paradigm in which the building, management and testing of produced software is automated such that deployments can be performed at the push of a button.

Benefits of Continuous Delivery:

  • Reduced Risk in Deployment
  • Predictable Progress
  • Frequent Feedback

Costs/Considerations of Continuous Delivery:

  • Requires a strong foundation with Continuous Integration culture, and test suite coverage
  • The Final deployment must still be automated which is an additional cost, Though the trigger to begin the process is manual this can still cause slowdown for the development.
  • Communication of incomplete features and backlog must be maintained rigorously to communicate expectations to client and development team
21
Q

Jenkins

A
  • self-contained, open source automation server, which can be used to automate the building, testing and deployment of software
Disadvantages of Jenkins:
- Requires custom jenkinsfile syntax for pipeline configuration
Advantages of Jenkins:
- Completely Open Source
- Free
- Supports all Operating systems
- Supports all source code repositories
22
Q

Jenkins projects/jobs and builds

A

Each job is a repeatable set of steps that automate a task, such as building, testing, and deploying your software. When a job is triggered, Jenkins creates a build of the project.

23
Q

Maven review

A
  • dependency manager and build automation tool for java projects.

default maven lifecycle is:
Validate => project is correct and all necessary information is available
Compile => compiles project source code
Test => tests all compiled code
Package => packages all compiled code to WAR/JAR file
Integration => performs all integration tests on WAR/JAR
Verify => runs checks on the results of integration tests
Install => installs WAR/JAR to local repository
Deploy => copies final WAR/JAR to the remote repositor

24
Q

Sonar

A
  • Sonar Cloud: A cloud based code review solution which can be configured to review code within a cloud repositoy, such as Github.
  • Sonar Qube: Code review tool built to work on a centralized server or integrated into a development pipeline. minimum req jdk 11
  • Sonar Lint: integrated with IDE
25
Q

Object Relational Mapping (ORM)

A

uses objects to connect the Object-Oriented programming language and the database systems, which facilitates the SQL to work along with the object-oriented programming concepts.

26
Q

Hibernate and JPA

A

JPA: standard API for accessing, persisting and managing data between Java objects/classes and a relational database.

Hibernate:  map Java classes to database tables
advantages:
-  transparent persistence
-  database independent
- abstraction 
- dual-level Caching
27
Q

Hibernate architecture

A

To persist data in the database, the application communicates with the Hibernate layer that contains the following core classes and interfaces of the Hibernate API:

Configuration Class
SessionFactory Interface
Session Interface
Transaction Interface
Query Interfaces
28
Q

Hibernate core interfaces

A

store and retrieve persistent objects and control transactions.

  • configuration
  • session factory
  • session
  • transaction
  • query
  • criteria
29
Q

Hibernate configuration

A

contains the database mapping information that tells Hibernate how it should communicate with the database, and where the mapping for individual classes/tables can be found

  • hibernate.cfg.xml file
  • hibernate.properties file
30
Q

Hibernate annotations

A

used to provide metadata configuration inside the POJO class, so we can understand the table structure and POJO class simultaneously.

31
Q

object states in Hibernate

A

Transient State: object is created using the new operator and not yet associated with a Hibernate Session
Persistent State: object state is associated with the hibernate session
Detached State: a persistent object has its session closed

32
Q

HQL

A
  • Hibernate Query Language is the object-oriented query language of the Hibernate Framework
  • query against persistent objects instead of tables and columns.

Advantages of HQL:

  • It supports OOP concepts like polymorphism, inheritance, and abstraction.
  • It is database-independent and easy to learn.
33
Q

Hibernate NativeSQL

A

execute native SQL queries through the use of the SQLQuery object. The Session.createNativeQuery(String query) method is used to create the NativeQuery object and execute it.

getResultList()
addScalar()
addEntity()
addJoin()

34
Q

Criteria API

A

use explicit methods and return types to fetch data from relational database

create criteria object: createCriteria(Class)

35
Q

Caching in Hibernate

A

to optimize the performance of an application

L1 cache: the first place that Hibernate checks for cached data
L2 cache: responsible for caching objects and sharing data across sessions

cache concurrency strategies are:
READ_ONLY - Use this strategy only for entities where we never change any data and use data as a reference.
NONSTRICT_READ_WRITE - Doesn’t guarantee the consistency between the cache and the database. Use this strategy only for entities where we change data rarely.
READ_WRITE - Use this strategy only for entities where we read and update data.
TRANSACTIONAL - Use this strategy to cache the full transactions made on the entity.

36
Q

XML

A
  • eXtensible Markup Language
  • designed to transport and store data in a way that is both human and machine readable
  • faster parsing
  • more compatible w/ JavaScript
  • less verbose
  • more universal (tags won’t change with different developers)