GithubHelp home page GithubHelp logo

circonus-labs / libmtev Goto Github PK

View Code? Open in Web Editor NEW
116.0 18.0 33.0 21.72 MB

Mount Everest Application Framework

Home Page: http://circonus-labs.github.io/libmtev/

License: Other

Shell 0.54% Perl 0.46% C 83.87% Lua 2.57% DTrace 0.04% C++ 2.62% Assembly 0.21% Makefile 0.79% XSLT 0.13% JavaScript 1.60% GDB 0.01% CSS 5.36% Roff 0.51% HTML 0.26% M4 0.69% Python 0.33%
non-blocking framework c network toolkit hacktoberfest

libmtev's Introduction

Coverity Scan Build Status

libmtev - a toolkit for building high-performance servers.

Read the documentation.

To build, check out the instructions in BUILDING.

To run the test suite, run make check from the test/ directory.

Enjoy.

An incomplete list of features.

  • process manager/watchdog/monitor/crash catcher
  • powerful config system with write-back on changes
  • eventing system for sockets, timers and asynch jobs
    • Multi-Threaded EVent loops - (mtev)
    • dynamically scaling asynchronous jobqs
  • module system
  • network listener system (w/ TLS)
    • REST/http routing convenience layer
    • channelized reverse tunneling of TCP.
  • telnet-accessible command-control system
  • epoch memory reclamation
  • clustering subsystem
  • robust rest-accessible statistics (w/ histograms)
  • fq and amqp connectors
  • DTrace (and Systemtap/eBPF) USDT probes
  • opentracing (zipkin thrift) support
  • mdb helpers (Illumos)
  • various data structures
  • accelerated timing support (faster than OS)
  • dynamic hooks and runtime resolveable callsites
  • embedded luajit w/ stand-alone lua runtime
  • mtevbusted (mtev capable lua busted testing suite)

TODO

libmtev's People

Contributors

abh avatar aidancully avatar andre9875 avatar bdunavant avatar bincircon avatar binqiu avatar cody271 avatar dispalt avatar esproul avatar gallison93 avatar gdusbabek avatar heinrichhartmann avatar igalic avatar iukpocirconus avatar jabley avatar jonaskunze avatar jpeach avatar mcieslinski avatar neophenix avatar pamaddox avatar piotrsikora avatar pjulien avatar postwait avatar pquerna avatar robboeckermann avatar samuelwm01 avatar sevan avatar vasuraman11 avatar ynachiket avatar zmalone 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

libmtev's Issues

Logo design

Hello there. I am a graphic designer. I want to design a logo for the readme. If you like it. I will give you present.

issue compiling on debian jessie

After remove a test for lua.h (which seems to fail on jessie), I was able to get configure to run.

thomas@circonus:~/libmtev$ git diff
diff --git a/configure.in b/configure.in
index 82f6788..856dd37 100755
--- a/configure.in
+++ b/configure.in
@@ -238,7 +238,7 @@ if test "x$ENABLE_LUA" != "xno"; then
                AC_MSG_ERROR([*** liblua52 required ***])
        fi

-       AC_CHECK_HEADER(lua.h, [], [AC_MSG_ERROR([*** lua (headers) required ***])])
+#      AC_CHECK_HEADER(lua.h, [], [AC_MSG_ERROR([*** lua (headers) required ***])])
        AC_CHECK_HEADER(udns.h, [], [AC_MSG_ERROR([*** udns.h required ***])])
        AC_CHECK_LIB(udns, dns_new, [], [AC_MSG_ERROR([*** libudns required ***])])
 fi

I still expect an issue when it comes to handling lua (but hopefully it will be not too hard to hand edit the Makefile to fix the include and lib paths).

But more importantly It seems that some API changed with libck

make[2]: Entering directory '/home/thomas/libmtev/src/utils'
mtev_memory.c: In function ‘ck_epoch_barrier_true’:
mtev_memory.c:60:20: warning: passing argument 1 of ‘ck_epoch_barrier’ from incompatible pointer type
   ck_epoch_barrier(r);
                    ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:159:6: note: expected ‘struct ck_epoch_t *’ but argument is of type ‘struct ck_epoch_record_t *’
 void ck_epoch_barrier(ck_epoch_t *, ck_epoch_record_t *);
      ^
mtev_memory.c:60:3: error: too few arguments to function ‘ck_epoch_barrier’
   ck_epoch_barrier(r);
   ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:159:6: note: declared here
 void ck_epoch_barrier(ck_epoch_t *, ck_epoch_record_t *);
      ^
mtev_memory.c: In function ‘mtev_memory_barriers’:
mtev_memory.c:67:21: warning: assignment from incompatible pointer type
     else do_cleanup = ck_epoch_poll;
                     ^
mtev_memory.c: In function ‘mtev_memory_maintenance’:
mtev_memory.c:74:37: warning: assignment from incompatible pointer type
   if(do_cleanup == NULL) do_cleanup = ck_epoch_poll;
                                     ^
mtev_memory.c: In function ‘mtev_memory_begin’:
mtev_memory.c:90:18: warning: passing argument 1 of ‘ck_epoch_begin’ from incompatible pointer type
   ck_epoch_begin(epoch_rec, NULL);
                  ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:87:1: note: expected ‘struct ck_epoch_t *’ but argument is of type ‘struct ck_epoch_record_t *’
 ck_epoch_begin(ck_epoch_t *epoch, ck_epoch_record_t *record)
 ^
mtev_memory.c: In function ‘mtev_memory_end’:
mtev_memory.c:93:16: warning: passing argument 1 of ‘ck_epoch_end’ from incompatible pointer type
   ck_epoch_end(epoch_rec, NULL);
                ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:123:1: note: expected ‘struct ck_epoch_t *’ but argument is of type ‘struct ck_epoch_record_t *’
 ck_epoch_end(ck_epoch_t *global, ck_epoch_record_t *record)
 ^
mtev_memory.c: In function ‘mtev_memory_ck_free_func’:
mtev_memory.c:158:19: warning: passing argument 1 of ‘ck_epoch_call’ from incompatible pointer type
     ck_epoch_call(epoch_rec, &e->epoch_entry, f);
                   ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:139:1: note: expected ‘struct ck_epoch_t *’ but argument is of type ‘struct ck_epoch_record_t *’
 ck_epoch_call(ck_epoch_t *epoch,
 ^
mtev_memory.c:158:30: warning: passing argument 2 of ‘ck_epoch_call’ from incompatible pointer type
     ck_epoch_call(epoch_rec, &e->epoch_entry, f);
                              ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:139:1: note: expected ‘struct ck_epoch_record_t *’ but argument is of type ‘struct ck_epoch_entry_t *’
 ck_epoch_call(ck_epoch_t *epoch,
 ^
mtev_memory.c:158:47: warning: passing argument 3 of ‘ck_epoch_call’ from incompatible pointer type
     ck_epoch_call(epoch_rec, &e->epoch_entry, f);
                                               ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:139:1: note: expected ‘struct ck_epoch_entry_t *’ but argument is of type ‘void (*)(struct ck_epoch_entry_t *)’
 ck_epoch_call(ck_epoch_t *epoch,
 ^
mtev_memory.c:158:5: error: too few arguments to function ‘ck_epoch_call’
     ck_epoch_call(epoch_rec, &e->epoch_entry, f);
     ^
In file included from mtev_memory.c:34:0:
/usr/include/ck_epoch.h:139:1: note: declared here
 ck_epoch_call(ck_epoch_t *epoch,
 ^
Makefile:36: recipe for target 'mtev_memory.lo' failed

The version installed is

$ dpkg -l | grep libck
ii  libck-dev                      0.3.5-1                     amd64        Concurrency Kit - development files
ii  libck0                         0.3.5-1                     amd64        Concurrency Kit - shared libraries

$ cat /etc/debian_version
8.3

mtev_json_object ref counting should be atomic

extern struct mtev_json_object* mtev_json_object_get(struct mtev_json_object *jso)
{
  if(jso) {
    jso->_ref_count++;
  }
  return jso;
}
extern void mtev_json_object_put(struct mtev_json_object *jso)
{
  if(jso) {
    jso->_ref_count--;
    if(!jso->_ref_count) jso->_delete(jso);
  }
}

Object shared among many threads, get/put pattern results in a bad ref count and either a leak or a crash when jso is freed while there are still references to it.

Ref counting should probably be atomic (ck_pr_inc/dec_64 or similar)

Allow divesting of mtev_mm_barrier_asynch responsibilities

When threads call mtev_memory_maintenance_ex(MTEV_MM_BARRIER_ASYNCH), it delays work that they will do on some subsequent call to the same function. However, when threads shut down, they must wait for all outstanding reclamation requests to complete before the thread will terminate (mtev_memory_fini_thread). This is highly undesirable in the job queue thread wind-down scenario and can cause starvation and backlogs.

There should be an option for threads to "disown" reclamation responsibilities and this should called during shutdown to allow a prompt return from mtev_memory_fini_thread.

badly referenced dependencies: jlog

Hello,

> autoconf
> ./configure
[...]
checking ck_pr.h usability... yes
checking ck_pr.h presence... yes
checking for ck_pr.h... yes
checking for ck_ht_init in -lck... yes
checking for hwloc_topology_init in -lhwloc... yes
checking for jlog_new in -ljlog... no
configure: error: *** libjlog required github.com/omniti-labs/jlog ***

jlog is not present on circonus-labs, it is available at https://labs.omniti.com/jlog/
but this is not what is expected from the message :-)

Looking forward to testing your work 😄

Thomas

Support parameterized logging

Allow logging API to support key value pairs (and perhaps nested K/V pairs).
Allow streams to transform them.
This should support writing fast binary logs as well as something like JSON.

Lua build options don't work.

The --enable-lua configuration option is allowed to take no, lua52 or LuaJIT as options.

If you pass --disable-lua, the build still tries to build the various Lua components. It is clear that no-one ever does this.

If you pass --enable-lua=lua52, you get an unconditional error.

If you pass --enable-lua=LuaJIT, you need an undocumented dependency on the udns-devel package (at least on Fedora).

What's the right approach here? Enforce that LuaJIT is required? Try to make Lua optional? Support multiple different Lua implementations?

Want option to disable trace output files

The run_glider function unconditionally saves the stdout of the configured glider to tracedir. Depending on the glider being used, this can end up being a rather large amount of output, and frequent crashes can cause the tracedir to grow quite large.

The operator should be able to disable this functionality if it is causing issues or provides insufficient value.

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.