This file contains 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
package com.realkinetic.gcp.spring.oidc; | |
import com.auth0.jwt.JWT; | |
import com.auth0.jwt.algorithms.Algorithm; | |
import com.auth0.jwt.interfaces.DecodedJWT; | |
import com.google.api.client.http.*; | |
import com.google.api.client.http.javanet.NetHttpTransport; | |
import com.google.api.client.json.JsonObjectParser; | |
import com.google.api.client.json.jackson2.JacksonFactory; | |
import com.google.api.client.util.GenericData; |
- Date: <DATE - when the decision was made>
- Driver: <DRIVER - list a single person driving consenus and decision making>
- Stakeholders: <STAKEHOLDERS - list all relevant stakeholders affected by this decision>
- Status: [PROPOSED | DECIDED | SUPERSEDED]
- Categories: <CATEGORIES - use a simple grouping to help organize the set of decisions (e.g. backend, payment, user management, ...)>
- Outcome: <OUTCOME - once decided, provide a short summary of the decision outcome here>
This file contains 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
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.ArrayBlockingQueue; | |
import java.util.concurrent.BlockingQueue; | |
public class TestArrayBlockingQueuePerf { | |
private static final int CHANNEL_NUM = 8; | |
private static final int CHANNEL_BUFFER_SIZE = 65536; |
This file contains 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
from("timer://scheduler?period=30s") | |
.log("get access token") | |
.to("direct:authService"); | |
from("direct:authService").tracing() | |
.setHeader(Exchange.HTTP_PATH) | |
.simple("<auth service context>/oauth2/token") | |
.setHeader("CamelHttpMethod") | |
.simple("POST") | |
.setHeader("Content-Type") |
This file contains 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
/* | |
Parallel processing with ordered output in Go | |
(you can use this pattern by importing https://github.com/MarianoGappa/parseq) | |
This example implementation is useful when the following 3 conditions are true: | |
1) the rate of input is higher than the rate of output on the system (i.e. it queues up) | |
2) the processing of input can be parallelised, and overall throughput increases by doing so | |
3) the order of output of the system needs to respect order of input | |
- if 1 is false, KISS! |
This file contains 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
/* | |
This snippet is an example of backpressure implementation in Go. | |
It doesn't run in Go Playground, because it starts an HTTP Server. | |
The example starts an HTTP server and sends multiple requests to it. The server starts denying | |
requests by replying an "X" (i.e. a 502) when its buffered channel reaches capacity. | |
This is not the same as rate-limiting; you might be interested in https://github.com/juju/ratelimit | |
or https://godoc.org/golang.org/x/time/rate. |
These are the Kickstarter Engineering and Data role definitions for both teams.
NewerOlder