Skip to content

Instantly share code, notes, and snippets.

View JunTaoLuo's full-sized avatar

John Luo JunTaoLuo

  • Agile 6
  • Pittsburgh
View GitHub Profile
@JunTaoLuo
JunTaoLuo / Contributing.md
Last active May 4, 2023 22:25
MLiP GitHub Contribution Guidelines

Contribution guidelines

The following steps should be followed when contributing work to this repository.

1. Open an issue to track the work to be done

  1. Open a new issue in our repository.
  2. Fill out the details including the deliverable and grading scheme in the issue description.
    1. Specify the due date by selecting a milestone (e.g. Milestone2)
  3. Assign a person who will be responsible in the "Assignee" section. This step can be skipped if no one wil be working on this issue in the near future.
@JunTaoLuo
JunTaoLuo / Resource Limit APIs.md
Last active April 29, 2021 21:19
Resource Limits

Background and Motivation

Outages caused when system activities exceed the system’s capacity is a leading concern in system design. The ability to handle system activity efficiently, and gracefully limit the execution of activities before the system is under stress is a fundamental to system resiliency. .NET does not have a standardized means for expressing and managing resource limiting logic needed to produce a resilient system. This adds complexity to designing and developing resilient software in .NET by introducing an easy vector for competing resource limiting logic and anti-patterns. A standardized interface in .NET for limiting activities will make it easier for developers to build resilient systems for all scales of deployment and workload.

Users will interact with the proposed APIs in order to ensure rate and/or concurrency limits are enforced. This abstraction require explicit release semantics to accommodate non self-replenishing (i.e. concurrency) resource limits similar to how Semaphores o

@JunTaoLuo
JunTaoLuo / LabelConsolidation.md
Last active January 25, 2021 22:59
ASP.NET Core area label consolidation

ASP.NET Core area label consolidation

Goals

Last week, we discussed the idea of consolidating some of the labels we use for issue management. The main goals of this effort are:

  1. Reduce the number of mis-tagged issues due to the confusion of which area labels should be applied
  2. Make the labels more clearly indicate which group/triage is responsible for tracking the filed issues

Update to area labels

Logging Formatter API

Goals

We want to add the capability to control the format of the logs produced by our console logger. Currently, there is an option to choose between Default (logging on multiple lines with colors) and Systemd. We would like to add a compact format which will log using a single line, as well as a JSON based log format. We would also like to add an extension point so that users can specify their own custom log format. The motivation for these log formats can be found at https://github.com/dotnet/extensions/issues/2479. Finally, we need to be able to control the formatter used as well as the formatters via Configuration.

Scope

We are considering limiting the scope of the formatter API to Logging.Console for now, instead of Logging.Abstractions.

| Category | Current Grade | Cost | Aspirational Grade | Notes |
|---------------------- |--------------- |------ |-------------------- |------- |
| Planning | C | L | B | There are now more documentation of this process via OKRs and specs so I feel the transparency has increased. |
| Design | C | XL | B | Need to factor in infrastructure when designing features. E.g. Blazor WebJS. |
| Build/Infrastructure | D | XL | B | Need to align with rest of dotnet, we have too much "special" logic. |
| Coding | B | XXL | A | Need to respond to community PRs more promptly. |
| Testing | C | L | B | How do we know we have the right amount of coverage? Coverage is mostly driven by devs but may become out of date over time. Need improvements in tooling for debuggability/reliabil

Branching steps

  1. get darc: https://github.com/aspnet/Extensions/blob/master/eng/common/darc-init.sh
  2. Add bot config to merge p5 back to master: dotnet/versions#463. May need to retrigger via internal dnceng dotnet/arcade/branch-merge-pr-generator
  3. Create branches with git
  4. Update branding on master to preview 6: https://github.com/aspnet/AspNetCore/commit/3af9f5811441e221ec72965d9f086da5f91623dc
  5. Remove preview4 branches, need to disable protected branches via settings
  6. email to notify branching

?. Update Maestro subscriptions

using System;
using System.Buffers.Binary;
using System.Collections.Generic;
using System.Net.Http;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Grpc.Core;
namespace Sample.Clients
@JunTaoLuo
JunTaoLuo / AspNetCoreFx.md
Last active October 30, 2018 23:53
aspnetcore shared framework support status
Distribution Windows Linux macOS
x64 2.1 - crossgen'ed 2.1 - crossgen'ed 2.1 - no crossgen
x86 2.1 - crossgen'ed NA NA
Arm64 post-3.0 pending 3.0 - no crossgen, not tested NA
Arm32 2.2 - not tested 2.2 - no crossgen, not tested NA
Musl64 NA 2.1 - no crossgen, not tested NA
@JunTaoLuo
JunTaoLuo / Program.cs
Created October 22, 2018 18:26
WindowsVersions
using System;
using Microsoft.Win32;
namespace TestVersion
{
class Program
{
static void Main(string[] args)
{
var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
@JunTaoLuo
JunTaoLuo / a.cs
Last active June 22, 2018 05:04
Trivia
const int ArrLen = 6;
const int MaxNum = 6;
public static void Main(string[] args)
{
// initialize
var rnd = new Random();
var nums = new long[ArrLen];
for (var i = 0; i < ArrLen; i++)