Giter Site home page Giter Site logo

yakari's Introduction

Yakari

Yakari Logo

Build status

Yakari is simply in memory cache distributor.

Project is aimed to reduce distributed caching systems serialization/deserialization and network operation costs. You simply work with your localCache, the GreatEagle observe's your operations and take care of everything. In yakari if you set 1 object it makes 1 serialization and 1 network operation, for first get operation it makes 1 network operation, 1 deserialization, after then there is no deserialization or network operation you can get your cache object from your localCache, how much you want.

Presentation: Concept of Yakari

Yakari is Very Easy


  1. Install: Using Nuget

    Install-Package Yakari.Pack
  2. Configure:

    // Application name, desired to share same cache items
    var tribeName = "MyTribe";
    // To seperate app instances, diagnostinc purposes, * Must ne unique: You can use Guid.NewGuid().ToString();
    var memberName = "Beaver1";
    //StackExchange.Redis connectionstring
    var redisConnectionString = "127.0.0.1:6379,abortConnect=false,defaultDatabase=1,keepAlive=300,resolveDns=false,synctimeout=5000,allowAdmin=true";
    // Default Logger
    var logger = new ConsoleLogger(LogLevel.Info);
    // Default Serializer
    var serializer = new JsonNetSerializer();
    //Redis Remote Cache Provider for Yakari
    var remoteCacheProvider = new RedisCacheProvider(redisConnectionString, serializer, logger);
    //Redis Subscription Manager for tribe communication.
    var subscriptionManager = new RedisSubscriptionManager(redisConnectionString, tribeName, logger);
    // Options class for LittleThunder.
    var localCacheProviderOptions = new LocalCacheProviderOptions(logger);
    // Little Thunder the Local Cache Provider
    var localCacheProvider = new LittleThunder(localCacheProviderOptions);
    // The Great Eagle
    var observer = new GreatEagle(memberName, subscriptionManager, serializer, localCacheProvider, remoteCacheProvider, logger);
    // Great eagle start observing and loads every previous remote cache items in seperate thread
  3. Use:

    // Usage
    var key = "pebbles";
    
    // Simple Set
    localCacheProvider.Set(key, new[] { "pebble1", "pebble2", "pebble3" }, CacheTime.FifteenMinutes);
    
    // Simple Get
    var pebbles = localCacheProvider.Get<string[]>(key, TimeSpan.FromSeconds(5));
    
    // Get with Acquire Function *Recommended
    var item = localCacheProvider.Get<string[]>(key, TimeSpan.FromSeconds(5), () =>
        {
            return new[] { "pebble1", "pebble2", "pebble3" };
        }, CacheTime.FifteenMinutes);
    
    // Simple Delete
    localCacheProvider.Delete(key);

Happy distributing ๐Ÿ˜„

All tests are passing, we are stable now, please feed us...

We Need Help for

  1. Documentation
  2. Test
  3. Review
  4. Coding
  5. Porting Other Languages, Java:Jakari, Go:Gakari, etc...

You can ping me at: https://twitter.com/farukpehlivanli or https://tr.linkedin.com/in/efaruk

Our #Slack Team Domain: https://yakariteam.slack.com/

Please Tweet us ;)

Many Thanks to Our Sponsors:

kloia

yakari's People

Contributors

efaruk avatar dirtypaws avatar gokhansengun avatar sinantecer avatar deryadorian avatar

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.