Skip to content

From little things big things grow.

License

Notifications You must be signed in to change notification settings

dengwh0523/yxtrang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yxtrang
-------

The 'trang is not a framework, it's a library. A toolkit. A loose
collection of small modules that do interesting things and which can
be used together if need be or not. It has no dependencies on any
external libraries. It is written in C and is absolutely free.

From little things big things grow!


Current modules
---------------

base64:

 Base64 encoder/decoder.


daemon:

 Platform agnostic daemonizer code.


httpserver:

 Mechanism to easily write a custom HTTP handler (see examples/httpd).
 Should also serve as a template for any bespoke protocol.


json:

 JSON parser/generator.


jsonq:

 JSON quick and dirty search for named value. Doesn't allocate any
 memory and is useful for one-off searches.


linda:

 An implementation of the Linda coordination language as an idempotent
 JSON database built on top of 'store'. It has some limited indexing
 and ad-hoc querying capabilities (see examples/lindad).

list:

 Simple doubly-linked list/stack operations.


network:

 Threadpooled socket handling with support for select, poll, epoll
 and kqueue. Supports TCP (with TLS) and UDP (unicast, multicast and
 broadcast).


rational:

 Rational number (ie. numerator/denominator) operations. Useful,
 for example, expressing currency, eg. $3.21 = r_rat(3,21,100).


scriptlet:

 Engine to compile to bytecode and run micro-scripts. These can be used
 for event-handling/event-processing to transform input under user
 defined rules that are loaded at run-time.


skiplist:

 Index for any type. This unique variant uses a special bucketized mod
 allowing more efficient storage (400M vs 150M keys on an 8GB system)
 than traditional skiplist.


store:

 Append-mode log-structured store with index by UUID. There is no
 persistent disk index, rather it is regenerated in memory each time
 at start.


thread:

 Threads, threadpool, locks, atomics etc.


tree:

 Append-mode binary tree designed primarily for in-order (or near)
 insertion. Delete is supported with space recovery. This variant is
 bucketized and is extremely space-efficient: equal to skiplist above
 but twice as fast.


uncle:

 Umbilical network client liason engine. Resource discovery. Uses UDP
 (broadcast for now, will move to multicast) datagrams. Uncle is scope
 based, meaning it can organize resources by group: those within the
 same scope can find each other, but not those outside. Uncle is not
 a centralized server. It's job is to facilitate decentralized and
 distributed services via mutual discovery.


uuid:

 Universal unique identifiers.



Build
-----

  git clone http://github.com/infradig/yxtrang
  cd yxtrang
  make

Compilers tested: gcc & clang with C99 and C11 options.
Also tcc and VC++2010.

Platforms tested: Linux, FreeBSD, WinXP, Win7+.

About

From little things big things grow.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages