Samizdat News and Roadmap
=========================

News
----

2004-10-22: Samizdat 0.5.4 is released.

    In this version, front page layout was changed to the more familiar
    vertial split with the main column featuring focuses and right
    column running recent updates in the open publishing wire. New
    moderation facility allows to take over messages, displace their
    contents completely, and block member accounts. More new features:
    alternative CSS theme Indy is added and now is selectable from the
    Settings page; Belarussian translation is added; database connection
    is now configurable and allows to run multiple Samizdat instances on
    a single server; oversize titles and descriptions are now truncated.

2004-09-20: Samizdat 0.5.3 is released.

    Starting with this version, Samizdat can send out email: currently,
    it is used to recover lost passwords and to confirm that member
    email address is real. Email addresses are now unique, making it
    more difficult to cheat using throwaway accounts. Other changes
    include new dc:description message property for attaching article
    abstract, thumbnail image, or table of contents to a message, new
    preferences infrastructure allowing to add more server-side member
    settings in the future, and the inevitable database schema change.

2004-07-05: Samizdat 0.5.2 is released.

    This version adds Wiki functionality to Samizdat, allowing to edit
    messages and track history of changes. Messages may use Textile
    format for advanced hypertext markup, editing may be limited to the
    original creator or open for all site members. Other highlights of
    this release are FastCGI support, configurable site logo, multiple
    usability improvements, and the usual bunch of bugfixes. Once again,
    database schema is slightly changed.

2004-03-18: Samizdat 0.5.1 "Paris Commune" release is out.

    This release is dedicated to 133rd anniversary of the Paris Commune.
    Main feature of this version is i18n support, with Russian
    translation already in place. Other improvements include ability to
    work as plain CGI without mod_ruby, support for Windows/Cygwin,
    massive speed increase, and a long list of bugfixes. Database schema
    is changed again, but this time it is trivial to migrate from the
    previous version.

2003-12-01: Samizdat 0.5.0 is released.

    This version introduces basic focus management, completing the
    minimal set of features required for an open publishing part of the
    engine, and making Samizdat ready for public beta testing. Other
    major changes in this release include Pingback support, many user
    interface improvements, another rewrite of multimedia upload,
    testing framework, and more.

2003-10-17: samizdat-devel mailing list is created.

    The mailing list is dedicated to development of the Samizdat
    collaboration and open publishing engine. Secondary list topics
    include Samizdat demployment, usage, and other related issues.

2003-09-01: Samizdat 0.0.4 is released.

    This version allows to upload multimedia messages, including images
    and verbatim plain text, and introduces publishing of user-defined
    queries in form of "application/x-squish" messages. When migrating
    from older versions, Samizdat database should be dropped and
    recreated from scratch because of incompatible database schema
    change: content is now stored as a blob. In addition, file upload
    feature relies on StringIO module that is available as part of the
    Ruby 1.8 or can be installed separately from the Ruby Shim library
    for Ruby 1.6.

2003-08-08: Samizdat 0.0.3 is released.

    In this version, query construction UI is added, allowing to compose
    and modify search queries more conveniently and without having to
    manually edit raw Squish. Other major changes include switch to
    Unicode UTF-8 as default encoding, great improvement of browsers
    support in CSS, more code refactoring. Many minor bugs and
    inconsistencies are fixed, UI is enhanced in several places.

2003-07-14: Samizdat 0.0.2 is released.

    This version implements query validation and security limits, making
    execution of user-defined search queries safer. Other changes
    include schema improvements (better integration of Samizdat RDF
    schema with Dublin Core, separate namespace for tags, switch from
    RDF/XML to more readable N3 notation), enhanced search result
    display (resource rendering is separated into a class), UI CSS
    clean-up, documentation updates. Access to utility classes is
    reorganized and simplified.

2003-06-12: Samizdat 0.0.1 is released.

    This is the first version that includes basic RDF search query
    construction UI. Other functionality covered by this version
    includes: registering site members, publishing and replying to
    messages, voting for standard tags on resources.


Release Roadmap
---------------

0.0.1 - basic search interface
0.0.2 - query validation and security limits
0.0.3 - query construction UI
0.0.4 - multimedia messages, query publishing
0.5.0 - basic focus management, first beta release
0.5.1 - i18n, plain CGI, performance
0.5.2 - FastCGI, Textile, versioning
0.5.3 - email interface, account management
0.5.4 - frontpage, moderation
0.6.0 - syndication, caching
0.7.0 - free exchange
0.8.0 - calendar
0.8.1 - full RDQL, SQLite
0.8.2 - alternate RDF backends: 3store
0.9.0 - multi-part resources
1.0.0 - distributed operation (personal, p2p)


Development Directions
----------------------

- filter and search (important)
- RDF schema integration with Dublin Core (done), FOAF and Annotea
- testing framework (important, in progress)
- email interface (in progress)
- web of trust management -- depends on email interface
- static publishing -- depends on RDF storage workflow control
- gettext l10n (done)
- calendar/collaboration (help needed)
- p2p (research help needed)
- usability (in progress)


RDF Storage Tasks
-----------------

- generalize RDF storage, implement full DQL and encompass RDQL
- unit, functional, and performance test suite
- separate library for RDF storage
- investigate alternative backends: FramerD, 3store, Redland
  -- depends on separate library for RDF storage
  -- depends on test suite
- security: Squish literal condition safety (done), limited number of
  query clauses (done), dry-run of user-defined query, approvable
  resource usage
- query result set representation
- don't-bind variables in query pattern
- parametrized queries
- support blob literals
  -- depends on parametrized queries
- vocabulary entailment: RDF, RDFS, OWL
- RDF aggregates storage internalization (Seq, Bag, Alt)
- storage workflow control (triggers)
- transparent (structured) RDF query storage
  -- depends on RDF aggregates storage
  -- depends on storage workflow control
- subqueries (query premise)
  -- depends on transparent query storage
- chain queries
  -- depends on native RDF storage


RDF Storage Performance
-----------------------

- URIref hashes
- may-bind and don't-bind parameters
- parametrized queries
- query introspection
- query result set representation


RDF Aggregates
--------------

Application:
- Version Tracking
- Structured Documents
- Stored Queries

Requirements
- Tree Walking
- Sequence

Version Tracking: dct:isVersionOf

problem: how to extract n-th version of a document in a relational RDF
store without n-way join? - add special construct to Squish to express
repetitive RDF arcs (repetitive property grounding)

Example of 4th Item Extraction:

SELECT ?fourth
WHERE (s:next ex:head ?second)
      (s:next ?second ?third)
      (s:next ?third ?fourth)

SELECT s3.subject AS fourth
FROM Statement s1, Statement s2, Statement s3,
     Resource r1, Resource r2
WHERE s1.property = r1.id AND r1.label = 's:next'
  AND s1.subject = r2.id AND r2.label = 'ex:head'
  AND s2.property = r1.id
  AND s1.object = s2.subject
  AND s2.property = r1.id
  AND s2.subject = s3.object

SELECT ?fourth
WHERE (s:next*3 ex:head ?fourth)

CREATE FUNCTION property_chain_counted(property, head, count) RETURNS int AS
DECLARE
  i int;
  next int;
BEGIN
  i := 1; next := head;
  WHILE i <= count AND next IS NOT NULL DO BEGIN
    SELECT INTO :next s.object FROM Statement s
      WHERE s.property = property AND s.subject = next;
    i := i + 1;
  END;
  RETURN :head;
END;

CREATE FUNCTION property_chain_match(property, head, tail) RETURNS int AS
DECLARE
  i int;
  next int;
BEGIN
  i := 0; next := head;
  WHILE next <> tail AND next IS NOT NULL DO BEGIN
    SELECT INTO :next s.object FROM Statement s
      WHERE s.property = property AND s.subject = next;
    i := i + 1;
  END;
  RETURN i;
END;

(ns:property * ?count ?head ?tail)

2 cases: 1) property is mapped to a table; 2) generic property.

SELECT field FROM table WHERE id =


Transparent Query Storage
-------------------------

Argument for transparent (structured) query storage: ability to analyze,
find similar, merge, etc.

Separate Schema namespace: http://.../samizdat/query.
   sq:mustBind
   sq:triples
   sq:literalCondition
   sq:orderBy
   sq:cache

Can rdf:Statement.rdf:subject contain a blank node name?

In relational storage, Statement.subject refers to Resource.id, so it
looks like the trick is to add a blank_node boolean field.

If uriref in Squish query is already stored in the site KB,
Query.triples.li.Statement should refer to the Resource.id. This means,
each uriref in a query text should be looked up for id.


Sub-Resources In The Site Structure
-----------------------------------

Sub-resource relations:

focus -> related resource
message -> reply
message -> next-version
toc -> message


Admin Actions
-------------

- overtake message (normal moderation)
- overwrite message (remove abusive content)
- disable account (stop abuse)

