Giter Site home page Giter Site logo

transformerizer's Introduction

Transformerizer

A parallel transformation library with a producer-consumer design

Build Status Coverage Status

Description

Transformerizer is a simple transformation library that allows you to run multi-step trasnformations in parallel. Each step can run in parallel with each other using a producer/consumer design and with itself by setting a differnet number of threads to process each step.

Installation

The easiest way to install this is using nuget: https://www.nuget.org/packages/Transformerizer

Usage

Usage is simple: any enumerable can begin a transformation by calling the BeginTransform(..) extension method. Then call ThenTransform(...) as necessary followed by EndTransform(...).

var enumerable = new int[] { 1, 2, 3, 4, 5, };

var result = enumerable
    .BeginTransform(x => x * 5, 1)
    .ThenTransform(x => x / 3, 2)
	.EndTransform();

Bugs And Feature Requests

Any TODO items, feature requests, bugs, etc. will be tracked as GitHub isues here: https://github.com/bungeemonkee/Transformerizer/issues

transformerizer's People

Contributors

bungeemonkee avatar

Stargazers

 avatar

Watchers

 avatar  avatar

transformerizer's Issues

Add BeginTransformMany

TransformMany(...) is very useful for transformations which can return zero or more results from a single input but there is no analog to being a transformation chain with. Create an analogous BeginTransformMany(...) function.

Support multiple transformations from a single input

Sometimes multiple actions must be taken on a single input (sync a single change to several places, etc.). It would be great if we could support this in a fluid way. Some syntax like this maybe:

var threads1 = 5;
var threads2 = 10;
var items = new List<int>();
var results = items.BeginTransform(threads1) // This would just begin the transformation, essentially creating the transformer
    .Transform(SomeTranformFunction) // Transform the int with one method
    .Transform(AnotherTransformFunction) // Transform the int with another method, this would have to return the same type as the method above
    .ThenTransform(threads2) // This would aggregate the results from the two methods above and create the next transformer
    .Transform(SecondTransformerMethod)
    .EndTransform();

Support type discriminators

Add some syntax to enable a single transformer/threadpool to handle multiple types each with a different transformation function.

Add a statistics framework

Some way to collect statistics without major performance impact could be very useful for debugging. Possible statistics:

  • Min/max/average buffer size
  • Estimated thread idle time (as percent of total or raw time)
  • Total transformation time
  • Time when each transformation step completed (as percent of total or raw time)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.