- Spring Cloud Connectors - Connectors to PAAS services to scale new nodes
- Heroku
- Cloud Foundry
- Spring Cloud Bus - Event Bus (message queue)
- Spring Cloud Netflix (= Spring Cloud Netflix Stack) - The central part of the application consists of multiple components (Provided by Netflix)
- Archaius - Centalized configuration (like Spring Cloud Config but with Netflix technology)
- Zuul - Proxy server with virtual paths each pointing to a specifc service which can be executed in multiple instances: Central Path Configuration so that the user doesn't recognize changes
- Hystrix - Resilience Framework (Used with Ribbon + Feign where Hystrix is the core): A Switch that points to another instance (or throws an error when no other instance is available) when the requested instance throws an error and pauses requests to the requested instance for an amount of time (prevents deadlocks or unlimited
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Set a Sequence to a specific value | |
| select setval('address_seq', 1, true); | |
| -- Show last used sequence value | |
| SELECT last_value FROM my_sequence_name; | |
| -- Show text from a TEXT datatype column: http://www.solewing.org/blog/2015/08/hibernate-postgresql-and-lob-string/ | |
| SELECT | |
| convert_from(loread( | |
| lo_open(my_large_text::int, x'40000'::int), x'40000'::int), 'UTF-8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Show a preview of the selected method/class: "Quick Definition Lookup" | |
| Ctrl + Shift + I | |
| # Switch to another open tab | |
| Ctrl + Tab | |
| # Close a specific tab within this Switcher (Ctrl + Tab) | |
| Choose tab in Switcher > Backspace or Delete | |
| # Evaluate Expression (in a dialog) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Current Date as Timestamp | |
| CURRENT_TIMESTAMP | |
| -- Current Date as Date | |
| SYSDATE | |
| -- Insert multiple rows | |
| insert into countries select rownum, 'Name'||rownum from dual connect by rownum <= 1000000; | |
| -- Delete all rows from a table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Exclude files or directories from duplication check | |
| sonar.cpd.exclusions=**/AssemblyInfo.cs,**/*.g.cs,**/Mappings/*.cs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| JPA (Java Persistence API) | |
| Transaction Management with an Entity-Mananger: | |
| --- | |
| entityManager.getTransaction().begin(); | |
| entityManager.persist(<some-entity>); | |
| entityManager.getTransaction().commit(); | |
| entityManager.clear(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Java Messaging - JMS 2.0 | |
| JMS - Interface to send messages | |
| Message - Usually text or bytes | |
| Producer - Creates messages | |
| Consumer - Receives messages | |
| Destination - Sits between the Producer an the Consumer | |
| There are two types of Destinations: | |
| 1. Queue - Message can be received by only one Consumer (First come first serve) | |
| 2. Topic - Message can be received by any Consumers listening |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Producer - Publishes data on a specific topic into the Kafka Cluster | |
| Consumer - Consumes data from a specific topic | |
| Broker - One Node in the Kafka Cluster which is responsible for specific topics | |
| Kafka Cluster - Multiple machines running Kafka | |
| Topic - Subject where Producers + Consumers can communicate on | |
| Commit Log - Messages stored in a broker identified by an ID | |
| Retention Policy - What to do in case of lacking storage: | |
| 1. Remove some old ones | |
| 2. Remove the old versions of messages and only leave the latest versions of the messages |