Browse Source

Fix Makefile; add docs.

Stefano Cossu 3 years ago
parent
commit
5e1c8e5fa6
5 changed files with 88 additions and 4 deletions
  1. 3 0
      CODE_OF_CONDUCT
  2. 8 0
      LICENSE
  3. 4 4
      Makefile
  4. 51 0
      README.md
  5. 22 0
      TODO.md

+ 3 - 0
CODE_OF_CONDUCT

@@ -0,0 +1,3 @@
+Be curious.
+Be persistent.
+Be generous.

+ 8 - 0
LICENSE

@@ -0,0 +1,8 @@
+----------------------------------------------------------------------------
+"REROUTED BEER-WARE LICENSE" (Revision 42a):
+Stefano Cossu wrote this project.  As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think
+this stuff is worth it, you can buy Poul-Henning Kamp <phk@FreeBSD.ORG> a beer
+in return.
+----------------------------------------------------------------------------
+

+ 4 - 4
Makefile

@@ -7,7 +7,7 @@ all: test
 check:
 	splint \
 		-Iinclude -Iext/xxHash -Iext/openldap/libraries/liblmdb \
-		-D_XOPEN_SOURCE 500 \
+		-D_XOPEN_SOURCE=500 \
 		-preproc \
 		test.c
 
@@ -16,7 +16,7 @@ build:
 		-std=gnu99 \
 		-Iinclude -Iext/xxHash -Iext/openldap/libraries/liblmdb \
 		-luuid \
-		-D_XOPEN_SOURCE 500 \
+		-D_XOPEN_SOURCE=500 \
 		ext/xxHash/xxhash.c ext/openldap/libraries/liblmdb/midl.c \
 		ext/openldap/libraries/liblmdb/mdb.c \
 		src/*.c \
@@ -28,7 +28,7 @@ test:
 		-DDEBUG \
 		-Iinclude -Iext/xxHash -Iext/openldap/libraries/liblmdb -Itest \
 		-luuid -lpthread \
-		-D_XOPEN_SOURCE 500 \
+		-D_XOPEN_SOURCE=500 \
 		ext/xxHash/xxhash.c ext/openldap/libraries/liblmdb/midl.c \
 		ext/openldap/libraries/liblmdb/mdb.c \
 		src/*.c test.c \
@@ -39,7 +39,7 @@ profile:
 		-std=gnu99 \
 		-Iinclude -Iext/xxHash -Iext/openldap/libraries/liblmdb \
 		-luuid \
-		-D_XOPEN_SOURCE 500 \
+		-D_XOPEN_SOURCE=500 \
 		ext/xxHash/xxhash.c ext/openldap/libraries/liblmdb/midl.c \
 		ext/openldap/libraries/liblmdb/mdb.c \
 		src/*.c profile.c \

+ 51 - 0
README.md

@@ -0,0 +1,51 @@
+# LSUP_RDF
+
+**This project is work in progress.**
+
+This C library was initially meant to replace RDFLib dependency and Cython code
+in [Lakesuperior](https://github.com/scossu/lakesuperior) in an effort to
+reduce code clutter and speed up RDF handling; it later became a project for an
+independent RDF library. Initial experiments with Redland as a more efficient
+replacement for RDFLib were not successful due to the complexity of the API and
+the lack of an adequate persistent back end.
+
+This library makes two graph back ends available: a memory one based on hash
+maps and a disk-based one based on LMDB, an extremely fast and compact embedded
+key-store value. Graphs can be created independently with either back end
+within the  same program. Triples in the persistent back end are fully indexed
+and optimized for a balance of lookup speed, data compactness, and write
+performance (in order of importance).
+
+The API is not yet defined and at the moment this project is only intended for
+curious developers and researchers.
+
+This is also my first stab at writing a C library (coming from Python) and an
+unpaid fun project, so don't be surprised if you find some gross stuff.
+
+## In Scope – Short Term
+
+The short-term goal is to support usage in Lakesuperior and a workable set
+of features as a standalone library:
+
+- Handling of graphs, triples, terms
+- Memory- and disk-backed (persistent) graph storage
+- Contexts (disk-backed only)
+- Handling of blank nodes
+- Validation of literal and URI terms
+- Validation of RDF triples
+- Fast graph Lookup using matching patterns
+- Graph boolean operations
+- Serialization and de-serialization to/from N-Triples and Turtle
+- Compile-time configuration of max graph size (efficiency vs. huge capacity)
+- Python bindings
+
+## Possibly In scope – Long Term
+
+- SPARQL queries (We'll see... Will definitely need help)
+- Binary serialization and hashing of graphs
+- Lua bindings
+- C++ bindings (requires external contribution)
+
+## Likely Out of Scope
+
+- JSON-LD serialization

+ 22 - 0
TODO.md

@@ -0,0 +1,22 @@
+# Quick TODO list
+
+## Critical
+
+- LMDB back end
+- N3 serialization / deserialization
+- Turtle serialization / deserialization
+- Python bindings
+- Better error handling
+
+
+## Non-critical
+
+- Logging
+- Optimize hash maps for arbitrary key lengths (macros)
+- Term and triple validation
+
+
+## Long-term
+
+- Generic graph (non RDF constrained)
+- Lua bindings