Giter Site home page Giter Site logo

soluto / tweek Goto Github PK

View Code? Open in Web Editor NEW
345.0 24.0 50.0 14.78 MB

Tweek - an open source feature manager

Home Page: https://tweek.soluto.io

License: MIT License

C# 34.59% JavaScript 18.28% Shell 0.43% HTML 0.17% TypeScript 28.55% Batchfile 0.01% Dockerfile 0.88% Makefile 0.03% Go 7.58% Open Policy Agent 0.21% Starlark 0.11% Less 9.17%
devops configuration backend microservices ab-testing experiments continuous-delivery feature-flags feature-toggles soluto-open-source

tweek's People

Contributors

alef83 avatar avivrubys avatar carmel-scharf avatar charnel avatar daonb avatar dependabot[bot] avatar elaygl avatar eyal-levy avatar gabrn avatar gilm123 avatar michaelkruglos avatar nataly87s avatar noamokman avatar nogashimoni avatar omerlh avatar orrosenblatt avatar rafikul-sekh avatar rosensj avatar shaikatz avatar shayams avatar soundug avatar tal952 avatar talarari avatar talgsoluto avatar tomeresk avatar tweek-renovate avatar vmr1532 avatar yaron-idan avatar yshayy avatar zoharlevin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tweek's Issues

meta data features - type specs

type Tag:String

type KeyMetaData{
    key:string;
    displayName:string;
    description?:string;
    type?:string;
    tags:string;
}

type SearchQuery{
    text:string;
    tags:string;
}

type MetaPropertyType{
    name:string;
    type:string | MetaDataType (inline);
    defaultValue?:string;
    description?:string;
}

type MetaDataType{
    name:string;
    baseType:string;
    allowedValues?:string[];
    compare?:string;
    validate?:string;   
}

type MetaRepository{
    //keys
    getKeyMetaData(key:string):Promise<KeyMetaData>;
    setKeyMetaData(key:string, meta:KeyMetaData):Promise;
    searchKeys(SearchQuery):Promise<KeyMetaData[]>;

    //props
    listProperties():Promise<PropertyMetaData[]>;
    setPropertyMetaData(property:string, meta:PropertyMetaData ):Promise;
    deletePropertyMetaData(property:string, meta:PropertyMetaData ):Promise;

    //tags
    listTags():Promise<Tag[]>;
    deleteTag(tag:string):Promise;

    //datatypes
    listMetaDataTypes():Promise<MetaDataType[]>;
    setMetaDataType(dataType:string, meta:PropertyMetaData ):Promise;
    deleteMetaDataType(dataType:string):Promise;
}

reduce save time

each tag adding, jpad or meta change, doing a pull and push, this operation causes a jpads build taking ~1-2 minutes.
as a mvp we will do 1 save for all changes (tags,meta,jpad) instead of save for each

Support for partitions

Partitions are way to organize rules on key.
Instead of having a flat view of rules, rules are organized/grouped by a partition.
A partition can be defined by using one or more properties.

// link to example

Persist/save meta key data

  • add meta client
  • add new meta repository and mock implementation
  • set new couchbase key space
  • create couchbase meta repository implementation
  • set server api (proxy in serverside to the couchbase)

both client and server should have mock/real meta provider

JPad Editor

  • Basic Viewer.
  • Ability to edit rules.
  • Commit and publish.

Editor Experience

  • View
    • Matcher
      • Properties
        • Simple fields
        • Other keys
      • Operators
        • Binary
        • Conjuction
    • Values
      • SingleVariant
      • MultiVariant
        • Barnouli
        • Weighted
  • Edit
    • Cases
      • Delete
      • Add
      • Reorder
    • Matcher
      • Add condition
      • Delete condition
      • Properties
        • Simple fields
        • Other keys
      • Operators
        • Binary
        • Conjuction
    • Values
      • Change types
      • SingleVariant
      • MultiVariant
        • Barnouli
        • Weighted
  • Meta Integration

key meta data viewer and editor

  • view display name and description
  • view tags
  • edit tags
  • edit display name and description

include writing the reducer, add action types

Context writing endpoint for configuration service

Expose api for writing user data to context.
Suggest format:

POST /context/{identityType}/{identityId}/{key}
value

or

POST /context/{identityType}/{identityId}  
{key1:value1, key2:value2, ...}

Need to consider security (not MVP)

Add tests keys for smoke

suggested keys:

@tests
    simple
    nested
        key1
        key2
        key3
    multivarientkeys
        uniform
        bernoulli
        weighted
    matchers
        context
        not
        equal
        in
        comparison
        fixedcontextbasedkey
        keydependency
    rules
        multipleconditions
        multiplerules

Testing couchbase driver

Couchbase is a document and kv db based on memcached.
It got the following advantages:

  • Free and open source
  • Extremely fast read throughput (for key-value)
  • Persistence
  • High availability - with cluster management and data-center replication
  • Decentralized - all nodes are identical, no SPOF.
  • Flexible data model (document db)
  • Indexing and Querying capabilities
  • Search support
  • Map reduce views
  • Nice management tools
  • Not as used as Cassandra/Mongodb/Redis, but still used by big players
  • Consistency - "Document access in Couchbase is strongly consistent, query access is eventually consistent" sounds good
  • Should be easy to deploy on azure/docker cloud
  • And there's an Enterprise version - support/qa/etc...

You can check the admin panel on:
http://couchbase-07cc5a45.b5501720.svc.dockerapp.io:8091/
username: tweek
pass:...

While we continue to use our "drivers" abstraction to decouple our app from the db, it might be the best solution to meet all our needs easily.

Most benchmarks are lies, but it should have very fast read performance -
http://www.datastax.com/dev/blog/how-not-to-benchmark-cassandra-a-case-study
http://www.couchbase.com/sites/default/files/uploads/all/Benchmarking-Couchbase-Server-for-Interactive-Applications.pdf

refactor tweek-rules structre

Current:

tweek-rules:
rules/{*keypath}.jpad
meta/{*keypath}.json
tags.json

suggested:

tweek-authoring:
dist/keys/{*keypath}.jpad
meta/keys/{*keypath}.json
         tags/{tagname}.json
         identities/{identity}.json (identity+properties)
         types/{type}.json

Convert JPad Project to fsharp

Current C# wrapper is really not need and make code more complex with ugly interop tricks.
EntryPoints are pretty much the same as C# api:

type JPadParser(settings:ParserSettings) :
       Parse: (source:string)->IRule

type JPadGenerator :
       AddSingleVariant: (...params)-> generator
       AddMultiVariant: (...params)-> generator
       Build() -> RuleDefinition //(format*string)

Prove "FF" incremental roll out is working (or not...)

Tweek value distributor currently create different distribution for different users based on the CreationDate of the user vs the experiment start-time.

In that way, by adding a new distribution, old users will get the old distribution values (retaining persistence) while new ones will get the new distribution values.

It was assumed that simply updating the rule instead of adding a new distribution is the same as reshuffle, but it's actually not the same because of the algo. (unless we replace the ruleid as well)

FF uses bernoulliTrial, which means a two variant distribution of [true|false] based on percentage.
It seems that in this case, since rule id, identity id, total bucket size (100) does not change, the users that got true will get the same values on increasing the "true" distribution.

In the case, FF rollout will work properly - meaning old users won't get "reshuffled".
We need to write a simple unit test to prove it, it might be that we already implement FF rollout by accident :)

JPad format

Write a specification for JPad format.
Write a schema for validation.

Update Rules flow

Suggested flow:

  • Tweek management service register hook on git repo to be notified on push
  • Git hook on update send post to tweek management/admin service
  • Tweek management service pulls all the data from
  • Tweek management service does some validations/test based on admin settings
  • Tweek management service bundle all the rules to single json
  • Tweek management service send the rules to configuration service instance.
  • Tweek Configuration service instance compile the rules
  • If compilation works, configuration services sends 200 back to management
  • Configuration service use db to propagate configuration changes to all instances.

Some notes
Tweek management service does not exist yet.
I think it will include in the future (Not all MVP):

  • Rules editing front-end
  • Rules validation constraints
  • Configuration service settings (format/parser/etc...)
  • Service Health check
  • Other Management (authentication, etc...)
  • Management service can use consul or zookeeper to sync and scale

Handle custom comparers parsing error

Error on the "target" value breaks the service which make sense, since we can easily prevent it.
Error on the value from the context fail the request.
It might be better to fail only the specific rule and log error, and return the other rules data to the agents.

better backoffice server logging

the server logs for tweek backoffice are currently in the docker service logs.
the docker logs are not user-friendly, slow, doesnt show past logs

Move all tests to xunit?

Currently, we use these frameworks for tests:
xunit
nunit 2.x
nunit 3.x

We also use FsCheck and FsUnit libraries for F# tests.
Both of them works properly with nunit 2.x and xunit, but not with nunit 3.x.
Since nunit 2.x will be obsolete and there are many breaking changes between 3.x and 2.x, it might makes sense to drop nunit in favor of xunit.

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.