Skip to content

Instantly share code, notes, and snippets.


Rinat Abdullin abdullin

View GitHub Profile
abdullin / errors.txt
Created Aug 17, 2022
A list of Kubeflow errors discovered while trying to build a simple pipeline.
View errors.txt
(tracking them here just ouf of amusement)
Incompatible argument passed to the input "in_model_path" of component "step-train": Argument type "String" is incompatible with the input type "GCSPath"
Passing value "data" with type "String" (as "Parameter") to component input "in_model_path" with type "GCSPath" (as "Artifact") is incompatible. Please fix the type of the component input.
ValueError: Unexpected type
TypeError: The pipeline argument "model_path" is viewed as an artifact due to its type "Path". And we currently do not support passing artifacts as pipeline inputs. Consider type annotating the argument with a primitive type, such as "str", "int", "float", "bool", "dict", and "list".
View ddd-in-golang.markdown

This is my response to an email asking about Domain-Driven Design in golang project.

Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.

That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.

Conclusions could be very different, if there was a different project, team or a story-teller.

Short story

abdullin / LICENSE
Last active Jul 10, 2020
Naive ring benchmark in .NET Core using simulated actors
MIT License 2018 Rinat Abdullin
View .drone.yml
image: ruby2.0.0
- cp config/database.example.yml config/database.yml
- bundle install
- psql -c 'create extension hstore;' -U postgres -h
- psql -c 'create role exmu with superuser login;' -U postgres -h
- psql -c 'create database exmu_test;' -U postgres -h
- bundle exec rake db:test:prepare
- bundle exec rspec spec
View RedirectToDynamicCommand.cs
/// <summary>
/// Creates convention-based routing rules
/// </summary>
public sealed class RedirectToDynamicCommand
readonly IDictionary<Type, Wire> _dict = new Dictionary<Type, Wire>();
sealed class Wire
public MethodInfo Method;
View Structuring Neat .NET Core Command Line Apps
abdullin / SampleTracer.cs
Created Mar 20, 2018
A sample code to generate JSON dumps according to the catapult event format. Not used any more (planning to write a new one some time later).
View SampleTracer.cs
public sealed class Tracer {
int _traceId;
readonly Func<long> _clock;
StreamWriter _writer;
public Tracer(Func<long> clock) {
_clock = clock;
View RedirectToWhen2.cs
public sealed class RedirectToDynamicEvent
public readonly IDictionary<Type, List<Wire>> Dict = new Dictionary<Type, List<Wire>>();
public sealed class Wire
readonly MethodInfo _method;
public Type ParameterType;
readonly object _subject;
readonly bool _includeVersion;
View 526646648311906304.markdown

This is a response to Bill Fisher regarding experience with Flux:

@abdullin Also, can you clarify what you mean by "solution structure"? I am thinking about revising the examples soon.

Currently all flux samples (that I've seen) group files into folders based on technical similarity. For example, stores go with stores, action creators reside in the same folder shared with the other action creators.

This pattern works quite well for smaller projects. It feels especially good for the sample projects of various MVC frameworks, when you have just a bunch of controllers, models and views.

However, as we discovered on some production projects, such approach doesn't scale well. At some point you end up with dozens of technically similar files per folder and logically messy solution.

View benc.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Threading;
namespace SearchBench {