- How to effectively compose your business logic
- Slim your aggregates with Event Sourcing!
- Architecture Weekly Webinar #8 - Slim down your aggregates!
- Straightforward Event Sourcing with TypeScript and NodeJS
- Process Managers Made Simple - Chris Condron - EventSourcing 2021
- Architecture Weekly Wbinar #3 - Implementing Distributed Processes
- Saga and Process Manager - distributed processes in practice
- [Event-driven distributed processes by example](https://event-driven.io/en/event_driven_distributed_processes_by_exam
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
using System; | |
using System.Globalization; | |
using System.Threading; | |
namespace Titan.Util | |
{ | |
/// <summary> | |
/// Helper class for invoking tasks with timeout. Overhead is 0,005 ms. | |
/// </summary> | |
/// <typeparam name="TResult">The type of the result.</typeparam> |
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
// * stackalloc does not work, we need pool as consumer is async so it needs Memory not Span | |
// * this might be most likley overcomplicated and ArrayBufferWriter could be enough, | |
// but it really tries to abuse the chance that read chunks are very small so there is | |
// only one rent from pool and one alloc for final result | |
// * these 3 methods could be a struct nicely encapsulating functionality but it is used | |
// from async method so struct would be copied all the time | |
// * these 3 methods could be a class, but I would like to limit allocation to minimum, | |
// so it uses `ref` arguments to delegate `state` to caller and allow keeping it on stack | |
static async ValueTask<ReadOnlyMemory<byte>> ReceiveStringAsync(WebSocket socket, CancellationToken ct = default) |
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
public class EnumMapper : IDisposable | |
{ | |
readonly Dictionary<Type, Dictionary<string, object>> _stringsToEnums = | |
new Dictionary<Type, Dictionary<string, object>>( ) ; | |
readonly Dictionary<Type, Dictionary<int, string>> _enumNumbersToStrings = | |
new Dictionary<Type, Dictionary<int, string>>( ) ; | |
readonly ReaderWriterLockSlim _lock = new ReaderWriterLockSlim( ) ; |
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
void main(List<String> arguments) { | |
print('Hello world!'); | |
var student = Student('mikhail', 'ushanov', DateTime(2018, 01, 01)); | |
print(student); | |
} | |
// 2.10 1 | |
class Student extends User { | |
DateTime yearOfAdmission; |
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 'dart:io'; | |
void main() { | |
var total = 0; | |
for (;;) { | |
stdout.write("Input number or 'stop': "); | |
var input = stdin.readLineSync()!; | |
if (input == 'stop') break; |
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
void main() { | |
for (int i = 0; i < 100; i++) { | |
if (i.isEven) | |
print("${i}"); | |
} | |
} |
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
/* | |
* Используя switch, напишите программу в методе main(), которая выводит название месяца по номеру от 1 до 12. | |
*/ | |
var monthMap = <int, String> { | |
1: "Январь", | |
2: "Февраль", | |
3: "Март", | |
4: "Апрель", | |
5: "Май", |
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
// 1 | |
int a = 1; | |
void main() { | |
// 2 | |
double b; | |
// 3 | |
var text = "text"; |
NewerOlder