Skip to content

Instantly share code, notes, and snippets.

View promontis's full-sized avatar
💭
:octocat:

Michel van den Berg promontis

💭
:octocat:
View GitHub Profile
public class WorkflowInstancePreviewer : IWorkflowInstancePreviewer
{
private readonly IServiceScopeFactory _serviceScopeFactory;
private readonly IWorkflowInstanceStore _workflowInstanceStore;
private readonly IWorkflowRegistry _workflowRegistry;
private readonly ICreatesActivityExecutionContextForActivityBlueprint _activityExecutionContextFactory;
public WorkflowInstancePreviewer(IServiceScopeFactory serviceScopeFactory, IWorkflowInstanceStore workflowInstanceStore, IWorkflowRegistry workflowRegistry, ICreatesActivityExecutionContextForActivityBlueprint activityExecutionContextFactory)
{
_serviceScopeFactory = serviceScopeFactory;
public class EmailAddress
{
public string Email { get; set; }
public string Name { get; set; }
}
public delegate Task EventHandler<TEvent>(dynamic templateData, TEvent @event, Dictionary<string, object> parameters);
public interface IMailAppender : IMailInterceptor
{
/* eslint-disable @typescript-eslint/no-namespace */
import * as THREE from 'three';
import * as React from 'react';
import mergeRefs from 'react-merge-refs';
import { extend, useFrame, ReactThreeFiber, useThree, ThreeEvent } from '@react-three/fiber';
import { Line2, LineSegmentsGeometry, LineMaterial } from 'three-stdlib';
import { InterleavedBufferAttribute } from 'three';
import { Instance } from '@react-three/fiber/dist/declarations/src/core/renderer';
type SegmentsProps = {
/* eslint-disable react/prop-types */
import React, { ReactElement, useContext, useState } from "react";
import * as three from "three"
import { useDrag } from "../../../hooks/useDrag";
import { useHover } from "../../../hooks/useHover";
import { camContext } from "../controls";
interface Props {
render: (hovering: boolean) => ReactElement;
onMove?: () => void;
import React, { useCallback, useEffect, useRef, useState, useMemo } from "react";
import * as three from "three"
import { useThree } from 'react-three-fiber';
import { Lines } from "./lines";
import { ScaleHandles } from "./scaleHandles";
import { MoveHandles } from "./moveHandles";
import { IntersectionPlane } from "./intersectionPlane";
import { useDrag } from '../../../hooks/useDrag';
import { useHover } from "../../../hooks/useHover";
import { intersectObjectWithRay } from "./intersection";
interface Props {
object: three.Object3D | undefined;
}
export const Gizmo = (props: Props) => {
const [scale, setScale] = useState(new three.Vector3());
useFrame(({ camera }) => {

Streams

Timeline stream

Totem is an event sourcing framework framed as a timeline. Other event sourcing implementations tend to emit to individual streams, as opposed to the one common stream. The main tradeoff between this is that of total order VS contention. The timeline stream has a total order for all of the events in an area. This can be of use when an order is needed over the topics within an area. The downside of such one common stream is that of contention; many events need to write to that one and single stream.

There is one timeline stream per area and it is the single source of truth for an area.

An event on this stream contains a 'value' (the payload of the event) and 'metadata'. The metadata contains several interesting fields:

using Chr.Avro.Abstract;
using Chr.Avro.Confluent;
using Chr.Avro.Resolution;
using Confluent.Kafka;
using Confluent.SchemaRegistry;
using System;
using System.Diagnostics;
using System.Threading.Tasks;
namespace ConsoleApp1
public class Subscriber : ISubscribeSynchronousToAll
{
private readonly StreamsDBClient _client;
private readonly string _assemblyName;
public Subscriber(StreamsDBClient client)
{
_client = client;
_assemblyName = Assembly.GetEntryAssembly().GetName().Name;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using EventFlow.Aggregates;
using EventFlow.Exceptions;
using EventFlow.Extensions;
using EventFlow.Logs;