More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  Tharaka Devadithya's spa...PhotosProfileFriendsBlog Tools Explore the Spaces community

Blog

2/20/2007

Data Models

Data Models
  • Graph
    - DBMS with graph data model for knowledge handling (link)
  • E-R Model - Wikipedia
    - The entity-relationship model—toward a unified view of data (link)
  • Network Model - Wikipedia
    - Network (CODASYL) Data Model (link)
  • XQuery and XPath data model (link
CLASSIC: a structural data model for objects (link)
 
Wikipedia - Data Models (link) and Data Modelling (link)
 
Database Models - Wikipedia (Unixspace)
 
Data Modeling 101 (link)
 
12/25/2006

Fedora Setup

These tips are mainly for installing applications that are not open source. For most of the open source applications, FC package manager, Yum will do the job.

Personal Fedora Core 6 Installation Guide (link)
Sun J2SDK-1.5 on Fedora Core 5 and 6 (FC5 and FC6) (link)

How to make fonts on Fedora Core 6 look like on Microsoft Windows (link)

12/23/2006

Doxygen

Create a configuration file
doxygen -g <config-file>
If <config-file> is not given, the default is Doxyfile.
The generated file has configuration parameters. Most of them have comments and are self explanatory. Some parameters that need to be modified are,
  • PROJECT_NAME
  • OUTPUT_DIRECTORY
  • REPEAT_BRIEF
    - If YES, prepends the brief description of a member or function before the detailed description.
  • EXTRACT_ALL
    - If YES, all entities in the documentation are documented, even if no documentation was available.
    - Warnings about undocumented members will not be generated as long as this is set to YES.
  • INPUT
    - List of directories containing source files.
    - If left blank, the current directory will be used.
  • RECURSIVE
    - If YES, processes sub-directories recursively.
  • SOURCE_BROWSER
    - If YES, generates cross-reference a (documented) entity with its definition in the source files.
  • GENERATE_HTML, GENERATE_LATEX
Most of the others can be left with their default values.
Examples of documeting the code can be found at, http://www.stack.nl/~dimitri/doxygen/docblocks.html.
Running doxygen
doxygen <config-file>
12/20/2006

Concepts Related to RDF

Semi-Structured Data - Peter Wood
Description Logic - Course Notes
Sub-graph Isomorphism Problem (distributed)
 
RDF Vs. XML
  • XML and RDF (blog)
  • Why RDF model is different from the XML model (link)
    - In XML, there are many ways to represent something like "The author of the page is Ora". In RDF, there is only one way.
    - While all the different ways may convey some meaning for the human reader, it will not be the case for a computer.
    - Querying in XML is more complex due to many ways of representing the same thing.
    - Mapping from XML to RDF is many-to-one.
  • Using XML for Data (link)
    - An XML document can't have disjoint parts and therefore XML doesn't map 1-1 with a directed, labeled graph.
  • Is RDF/XML Good for Anything? (link)
    - XML is designed to describe trees. RDF/XML is a transfer syntax for graphs.
What the Semantic Web can represent (link)
  • The Semantic Web and Entity-Relationship models
    - RDF is similar to E-R model except that relationships are first class objects in RDF.
    - In RDF, the set of slots of an object is not defined when the class of an object is defined.
  • The Semantic Web and Relational Databases
    - In DB, a query can join tables by any comlumns which match by datatype.

 SPARQL Vs. RDQL

  • From RDQL to SPARQL (blog
Advantages of SPARQL
  • Supports named graphs - query contains a FROM clause to specify the graph
  • Supports queries with typed literals
  • Sort results

Ontologies

 
Misconceptions about OWL Reasoning - Harry Chen
... this classification could create misconceptions that lead people to wrongly interpret the properties of different OWL reasoning. For example, a common belief is that when you build an ontology, you should attempt to stay within OWL-DL because OWL-DL reasoners is more efficient that OWL-Full reasoners. Some others believe that the use of OWL-Full will always cause intractable computation performance in a reasoner.
 
...just because a system is undecidable does not mean that it is useless. Turing complete languages (such as Java or C) are not guaranteed to complete (while(true) {...}) and yet these languages are still quite useful. Programmers just have to be careful that their constructs terminate.
 
 
10/21/2006

SVN

Import existing project to new repository

Assumption: each project has its own repository. This is so that each project has its own revision numbering.
Create a new repository:
svnadmin create --fs-type fsfs /path/to/repos

Subversion book recommends having the folder structure as branches, tags, trunk in its 'A Quick Start'. I.e. all project files in trunk while branches and tags directories are empty.
/tmp/myproject/branches/
/tmp/myproject/tags/
/tmp/myproject/trunk/
foo.c
bar.c
Makefile


Import the existing code (remove binaries before this step):
svn import /tmp/myproject file:///path/to/repos/myproject -m 'Initial import'

Checkout:
svn checkout file:///path/to/repos/myproject/trunk myproject
Or
svn checkout svn+ssh://hostname/path/to/repos/myproject/trunk myproject

Tagging:
svn copy svn+ssh://hostname/path/to/repos/myproject/trunk svn+ssh://hostname/path/to/repos/myproject/tags/release-1.0 -m "Tagging the 1.0 release of myproject"

Differences from CVS

Separate commands to
1. check status of working copy - svn status
2. update working copy with repository - svn update
In CVS, cvs update would do both the above.

MySQL

Installing MySQL as a non-privileged user

The installation instructions as root are pretty straightforward in the official documentation. However for non-roots, lot of details are missing there. Some useful information can be found here.

Some of the steps I followed with a source distribution are shown below:
  1. configure
    CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=$INSTDIR/mysql-5.0 --localstatedir=$INSTDIR/mysql/data --with-unix-socket-path=$INSTDIR/mysql/tmp/mysql.sock --enable-assembler --with-mysqld-ldflags=-all-static
    Notes:
    1. Not all programs in MySQL are affected by these parameters. For those that are not affected, command line parameters must be used.
    2. If embedded server functionality is required, then use --with-embedded-server flag when running configure.
  2. Initialize server
    $INSTDIR/mysql-5.0/bin/mysql_install_db --ldata=$INSTDIR/mysql/data
  3. Start server
    $INSTDIR/mysql-5.0/bin/mysqld_safe --datadir=$INSTDIR/mysql/data --pid-file=$INSTDIR/mysql/tmp/mysql.pid --socket=$INSTDIR/mysql/tmp/mysql.sock &
  4. Verify the server is running
    $INSTDIR/mysql-5.0/bin/mysqladmin version
    $INSTDIR/mysql-5.0/bin/mysqladmin variables
  5. Shut down the server
    $INSTDIR/mysql-5.0/bin/mysqladmin -u root shutdown
Notes: Most of the arguments are needed to override options in /etc/my.cnf (assuming there is another version of MySQL installed by a root). Some of the options can be include in an options file, so that it is not required to specify them as command line parameters. More information can be found here.

Installing as root on Fedora Core

Binary RPM seems to be the most convenient.
  • rpm -ivh MySQL-server-VERSION.ARCH.rpm
  • rpm -ivh MySQL-client-VERSION.ARCH.rpm
  • rpm -ivh MySQL-devel-VERSION.ARCH.rpm
This runs the following as well.
  • mysql_install_db
  • /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/.pid

An alternative is to install from source.
Some useful information can be found here.

If installed with yum, the group permissions for mysql db and related tables (/var/lib/mysql/mysql/) are set incorrectly as root:root. It should be modified as mysql:root. Anyway, this approach seems to be pretty messy and should be attempted only if one has nothing to do for the next 24-48 hours!

Basic usage

Connect: mysql -h host -u user -p
Disconnect: quit
List of DBs: show databases;
Create DB: create database db_name;
Delete DB: drop database db_name;
Export DB: mysqldump -u username -ppassword database_name > backup.sql
Import DB: mysql -u username -ppassword database_name < backup.sql

Other links
Change passwords
Add a new user
C API

Miscellaneous Research Topics

Data Acquisition

Model-Driven Data Acquisition in Sensor Networks - Paper from MIT/Berkeley

  • Incorporates statistical models of real-world processes into a sensornet query processing architecture.

Data Transformations

Data Format Description Language (DFDL) Overview


Reflective Middleware

The Case for Reflective Middleware

  • A multimedia streaming or videoconferencing application can obtain dramatic improvements in its quality of service by selecting a network transport protocol that suits the underlying network infrastructure (e.g., wireless LAN, wired LAN, or long distance Internet) and the available bandwidth.
  • Reconfigure the application to show the video in the larger display.
  • Select networking protocols, security policies, encoding algorithms, and various other mechanisms to optimize system performance for different contexts and situations.


Research directions in reflective middleware: the Lancaster experience - paper

  • Component frameworks - middleware platform is composed of a set of frameworks each of which represents some aspect of the required functionality or structure. E.g.,
    • protocol frameworks
    • dispatching of incoming calls
    • resource management
    • scheduling
  • These component frameworks accept ‘plug-in’ components that add or extend behaviour.
  • Component frameworks are themselves components, thus facilitating the construction of nested structures.
  • Reflection is then used to support introspection and adaptation of the underlying component/component framework structures.


Towards A Component-Based Middleware Framework for Configurable and Reconfigurable Grid Computing - paper

  • Grid middleware platforms have significant limitations as a Grid middleware support infrastructure.
  1. Extremely limited, in comparison to object-based middleware platforms (e.g. RM-ODP and CORBA)
  2. Little or no support for QoS specification and realisation
  3. Does not include results from from advanced middleware research (reflective and component-based middleware technologies)
  • provision of generic services. E.g., CORBA supports generic reusable services like
    • fault tolerance
    • persistent state
    • automated logging
    • load-balancing
    • transactional object invocation
    • event distribution


Resources

  • Google: reflective OR reflection middleware OR programming grid - results
  • scholar.google.com: reflective OR reflection middleware grid - results

Binary Protocols

Choosing Technology: Web Services vs. Binary Protocols - John L. Miller's web log

Web services programming tips and tricks: Send binary data without using attachments

  • inlining the binary data using xsd:hexBinary


XML, SOAP and Binary Data

  • Current approaches
    • SOAP with Attachments (SwA)
    • WS-Attachments
  • Alternatives to text encoding
    • XInclude
    • WBXML


WAP Binary XML Content Format

  • W3C specification


Will Binary XML Solve XML Performance Woes? - Ronald Schmelzer

Is Now the Time for Binary XML

Related work in C++ Reflection

SEAL Reflex

  • Paper - The SEAL C++ Reflection System, S. Roiser, CHEP '04, Interlaken, Switzerland, Sept. 27th, 2004 (pdf, ppt)


Metaclasses and Reflection in C++

  • Not sure whether this always require you to insert meta-information into existing classes? The examples, suggest that, but the site doesn't explicitly mention it.

A metaobject protocol for C++ - Paper


OpenC++


Reflection for C++

  • Two approaches
    • Use debug information - needs to always compile in debug mode, might work only with gcc
    • Programmer needs to provide meta information - intrusive
  • Contains a good comparison of different approaches


C++ Reflection - Homepage

  • A library to provide full reflection for C++ through template metaprogramming techniques
  • programmes have to annotate classes to make them reflexive


C++ Reflection Using GCCXML? - Discussion


C++ Reflection and Service Library

  • Uses a visitor to collect information from classes
  • intrusive


OOPSLA'98


Compile Time Reflection for C++

  • Part of the effort of providing support for compile time reflection in C++
  • No details about desgin/implementation on the web page
  • Example of such a feature - the type traits proposal by John Maddock (Boost)


Template Metaprogramming an Object Interface to Relational Tables - Short paper


A Case for Reflection


A system for reflection in C++


Design and Implementation of Metalevel Architecture in C++ – MPC++ Approach - paper

  • Meta-level architecture in C++
  • Provides
    • reification
    • reflection
  • Compile-time metalevel processing
  • Modifies and extends C++ syntax and semantics


Non-intrusive object introspection in C++: architecture and application - paper

  • A separate meta object is defined for each class that completely captures information of the class for introspection purposes.
  • Maintains static offsets to class members
  • Friend functions are inserted into classes to obtain offsets of private members - instrusive
  • The meta class for class (Klass) must store
    • the name of the class
    • pointers to meta objects of its base classes
    • methods to get names
    • memory offsets of all its data members
    • methods to get names and implementations of all its member functions (i. e., getMethod)
  • All objects are treated as pointers of type (void *)