Skip to content

Instantly share code, notes, and snippets.

View conniey's full-sized avatar

Connie Yau conniey

View GitHub Profile
@conniey
conniey / 01-README.md
Last active May 26, 2021 16:46
Asynchronous closeable.

Closing objects asynchronously

Classes such as AMQP connections, sessions, and links require a response from a network resource to understand when it is in a good close state. Currently, there is no way to express this async operation without blocking.

Other languages have the concept of async closeable such as .NET's IAsyncDisposable.

Why not Mono.using or Flux.using?

@conniey
conniey / update-entity.md
Last active June 15, 2020 01:21
Options for updating a queue.

Updating Service Bus entities

In our ServiceBusManagementAsyncClient, we expose Mono<QueueDescription> updateQueue(QueueDescription queue).

  • ATOM API is old; unsure if they are actively developing it.
  • The underlying REST call performs a replace. Any unpopulated properties in the QueueDescription are replaced with service default values.
  • Only a subset of properties can be updated.
    • Only 5/23 properties can be updated.
    • The rest are read-only after Queue creation.
  • There is no PATCH support.
@conniey
conniey / batched-send.md
Last active March 18, 2020 17:23
API proposal for smarter sends in Event Hubs

Batched send with EventHubProducerClient

General changes

  • Add an API, send that takes an Iterable<EventData>. Events passed in are grouped into batches and sent to the service.
    • SendOptions can be passed in to configure the size of the batch, partition key, or partition id.
    • If in the middle of the send operation, a batch fails to send (and all of its retries are exhausted), we complete the Mono with an exception. The SendException contains all the events in that batch. No more events are taken from the Iterable.
@conniey
conniey / profiles.json
Created October 25, 2019 23:03
Windows Terminal settings.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles": [
{
// Make changes here to the powershell.exe profile
@conniey
conniey / 0-synchronous.md
Last active August 12, 2019 22:59
Synchronous Event Hubs APIs

September Preview: Synchronous APIs

Event Hubs Track 1 library contains synchronous and asynchronous APIs. Initially shipped with only async APIs, but found developers had troubles with CompletableFuture. Consequently sync APIs were added.

As per the Java guidelines, we will also have a sync API to lessen the mental burden when devs initially use our APIs. If they are concerned about performance, they can shift to using the async APIs.

Notable changes

@conniey
conniey / UsageUserTFMTargets.usql
Created February 22, 2017 00:34
T-SQL script
SET @@InternalDebug = "FileSetV2:on";
DECLARE @Year string = "2017";
DECLARE @Month string = "01";
DECLARE @Day string = "26";
DECLARE @InputFiles string = "/AnalyzeRequests/" + @Year + "/" + @Month + "/"+ @Day + "/{id}.json";
CREATE DATABASE IF NOT EXISTS apiport;
USE apiport;
@conniey
conniey / history_rei_gemwater.md
Last active February 17, 2017 08:57
Rei Gemwater's backstory

Rei Gemwater

Standing at 5'10" and 120 lbs, Rei Gemwater is a noble Sun elf of the Western Heartlands. 110 years ago, she was born into the House of Gemwater led by her father Alwyn and mother Merissa.

Her first 75 years of childhood and young adulthood was a carefree time where she spent much of her time helping her parents man their vast tome collection in the famous Baldur's Gate