This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
| public class CachePipelineBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> | |
| { | |
| private readonly IDistributedCache cache; | |
| private readonly ILogger<SGUKAspNetCore> logger; | |
| public CachePipelineBehavior( | |
| IDistributedCache cache, | |
| ILogger<SGUKAspNetCore> logger) | |
| { | |
| Ensure.Argument.NotNull(cache, nameof(cache)); |
- JAVA : 1-4 MB
- C++ : 1 MB
- Python : 64 KB
- Golang : 2-4 KB
- Node.js : Single threaded and event driven
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutation
Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
So, are you building microservices? Take a look at a few of these symptoms, and decide for yourself:
- ❌ A change to one microservice often requires changes to other microservices
- ✅ Deploying one microservice requires other microservices to be deployed at the same time
- ❓ Your microservices are overly chatty
- ❌ The same developers work across a large number of microservices
- ✅ Many of your microservices share a datastore
- ✅ Your microservices share a lot of the same code or models
Used M1 Mac mini 2020 with macOS Big Sur Version 11.5.2.
According to the GitHub issue comment in Lima's GitHub repository, Lima requires a patched QEMU on M1 Macs.
Note that the followings are customized steps by @toricls based on the original steps and the script. Be sure to check the original files when you try it on your own.
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Information in this Gist originally from this github issue, which is outdated.
As @RomanMinkin mentioned, you can also consider Casbin (https://github.com/casbin/casbin). It is the most starred authorization library in Golang. There are several differences between Casbin and OPA.
| Feature | Casbin | OPA |
|---|---|---|
| Library or service? | Library/Service | Library/Service |
| How to write policy? | Two parts: model and policy. Model is general authorization logic. Policy is concrete policy rule. | A single part: Rego |
| RBAC hierarchy | Casbin supports role hierarchy (a role can have a sub-role) | Role hierarchies can be encoded in data. Also with the new graph.reachable() built-in function queries over those hierarchies are much more feasible now. |
| RBAC separation of duties | Not supported | Supported: two roles cannot be assigned together |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by: