Git Product home page Git Product logo

leo_pod's Introduction

leo_pod - A Fast Erlang worker pool manager

leo_pod is an Erlang worker pool manager. It is implemented no to use ETS (Erlang Term Storage). This is because we met a problem of ETS when we run it on high spec machines.

Usage

See files under the test/ directory in the repository.

    %% Prepare
    PodName = 'first_leo_pod',
    PodSize     = 8,
    MaxOverflow = 16,
    ModName     = 'leo_pod_mod',
    WorkerArgs  = [{protocol, tcp},
                   {host, "127.0.0.1"},
                   {port, 8080}],
    leo_pod:start_link(PodName, PodSize, MaxOverflow, ModName, WorkerArgs),

    %% Execute - [checkout > call > checkin]
    {ok, Worker} = leo_pod:checkout(PodName),
    {ok, _Reply} = gen_server:call(Worker, {echo, <<"Hello Hal,">>}),
    ok = leo_pod:checkin(PodName, Worker),
    ok.

Usage in Leo Project

leo_pod is used in leo_rpc library. It is used to mangage the number of process of RPC clients for each node. It is necessary because some OS has the limit for the number of file descriptors and therefore connections to the other nodes.

License

leo_pod's license is "Apache License Version 2.0"

Sponsors

LeoProject/LeoFS is sponsored by Rakuten, Inc. and supported by Rakuten Institute of Technology.

leo_pod's People

Contributors

egisatoshi avatar mocchira avatar yosukehara avatar

Stargazers

 avatar

Watchers

 avatar  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.