Talk: https://www.youtube.com/watch?v=-Xn9T8pTbdo
- Divide Codebase in different Parts
- 1 Bounded Context = 1 Microservice
- Pains: DNS + Monitoring + ...
// Performance of entity relations | |
https://vladmihalcea.com/2016/06/28/14-high-performance-java-persistence-tips/ | |
// Using UUIDs as primary key | |
// (This uses the default UUID version 4 (random) strategy according to IETF RFC 4122 rather than version 1 (time-based) strategy) | |
@Entity(name = "Book") | |
public class Book { | |
@Id | |
@GeneratedValue |
# Show status of current changes | |
git status | |
# Checkout pull request from GitHub | |
git fetch origin pull/<id>/head:<local-branchname-for-pr> | |
git checkout <local-branchname-for-pr> | |
# Pull latest changes from pull request from GitHub | |
git pull origin pull/<id>/head:<remote-branchname-for-pr> |
# Cache related HTTP headers should be on the server response. | |
# Cache file but ask the server on every request if there is a new version of it. | |
# Mainly used for mutable files such as a bundled app.js or a styles.css file. | |
# Set the following HTTP headers on the response: | |
Cache-Control: no-cache | |
# no-cache means: check whether there is a new version of the file on every request. | |
# If the cached version is up to date take it. If it's not, fetch the new one. | |
# To check whether there is a new version of a file |
Talk: https://www.youtube.com/watch?v=-Xn9T8pTbdo
# The pull command fetches the alpine image from the Docker registry and saves it in our system. | |
docker image pull alpine | |
# You can use the docker image command to see a list of all images on your system. | |
docker image ls | |
# Run a Docker container based on this image. To do that you are going to use the docker container run command. | |
# When you call run, the Docker client finds the image (alpine in this case), | |
# creates the container and then runs a command in that container. | |
docker container run alpine ls -l |
# --- Oracle DB --- | |
# URL - Old syntax | |
jdbc:oracle:thin:@[HOST][:PORT]:SID | |
# URL - New syntax | |
jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE | |
# driver-class-name | |
oracle.jdbc.driver.OracleDriver | |
# --- PostgreSQL --- | |
# URL |
JSON Web Token | |
Client - Sends requests to the Server | |
Server - Doesn't trust a Clients request unless it is authenticated | |
On Login with Username + Password the Server creates a JWT which is | |
returned to the Client. | |
The Client has to store the Token and send it along with any upcoming | |
request. |
OAuth (Open Authentication) | |
OAuth Client - e.g. My Server | |
OAuth Provider - e.g. Facebook Server | |
1. Register the OAuth Client on the OAuth Provider | |
2. It gets back an Client ID and a Client Secret | |
(On FB you do this manually by creating a developer account) | |
3. We want to authorize a user via the OAuth Provider | |
We send to "GET: provider.com/oauth/authorize?" with |
/* | |
JPA (Java Persistence API) | |
Transaction Management with an Entity-Mananger: | |
--- | |
entityManager.getTransaction().begin(); | |
entityManager.persist(<some-entity>); | |
entityManager.getTransaction().commit(); | |
entityManager.clear(); |
# Exclude files or directories from duplication check | |
sonar.cpd.exclusions=**/AssemblyInfo.cs,**/*.g.cs,**/Mappings/*.cs |