Code Monkey home page Code Monkey logo

mzbench_diameter_worker's Introduction

MzBench Diameter Worker

This is diameter worker for MzBench

For now it is suitable for simple request/answer scenarios. It supports both, TCP and SCTP transports.

Configuration

MzBench

Erlang release in MzBench doesn't include diameter application. You have to add it.

Edit node/rebar.config, find relx configuration part add ,{diameter, load} after inets:

{relx, [
    {release, {mzbench, "0.5.5"},
        [mzbench, dummy_worker, mz_histogram, mz_counter,
        crypto, public_key, asn1, ssl, inets]},

will be:

{relx, [
    {release, {mzbench, "0.5.5"},
        [mzbench, dummy_worker, mz_histogram, mz_counter,
        crypto, public_key, asn1, ssl, inets, {diameter, load}]},

Reinstall node code:

cd node
make clean
make local_tgz
make install

Dictionaries

You need diameter dictionaries for your diameter applications in OTP Diameter Dictionary Format.

Place them in dia subdirectory.

Worker

Worker accepts the following parameters:

  • dictionary, diameter dictionary module name
  • module, callback module, defaults to diameter_worker_cb, see OTP Diameter for details. It implements diameter_app behavior
  • origin_host, defaults to inet:gethostname()
  • origin_realm, defaults to "mzbench-client.com"
  • product_name, defaults to "MzBench"
  • auth_application_id, comma separated list of integers, defaults to empty string
  • acct_application_id, comma separated list of integers, defaults to empty string
  • service_name, distinct one diameter service from another, must be unique per client, defaults to diameter_worker
  • address, server address, defaults to "127.0.0.1"
  • port, server port, defaults to 3868
  • avp_dictionaries, comma separated list of additional diameter module dictionaries, defaults to empty string
  • transport, "tcp" or "sctp", defaults to "tcp"

Message Representation

Messages are represented as Erlang maps. You can use JSON format in resource files alternatively.

Lists of messages are represented as lists of maps:

[#{message_name => string(), message => map()}]

Usage

connect(address = "127.0.0.1", port=3868, auth_application_id = "4",
            dictionary="diameter_3gpp_ro", avp_dictionaries="diameter_ericsson")
call(MessageName, MessageBody),
call(MessageList)
disconnect()

Look in Examples subdicrectory for further inspiration.

mzbench_diameter_worker's People

Contributors

eryx67 avatar

Watchers

 avatar  avatar

Forkers

nenzyz ioolkos

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.