Computer
Computer Diary
    RepRap


    "Yes, we scan."

    Barack Obama
    2013/06/30, USA

    Here my little rant and praise place, where the daily experiences of my programming work are expressed. I publish them with the idea that others might find it useful and benefit from it.

    Tag <Linux>

    Check also other posts with other tags.

    2013/12/14
    MetaFS - Dealing With Metadata the Proper Way
    last edited 2013/12/20 16:04 (*)

    As I posted earlier Metadata - The Unresolved Mess (2012-07) I have started another effort to really bring decade long pondering on the issue together, and MetaFS I started a few weeks ago, and it is slowly growing now:


    MetaFS is a "Proof of Concept" meta file system which:

    • has no hierarchical constraints, but can have a hierarchical appearance
    • free definable metadata & tags for each item
    • full text indexing & search on the fly
    • content is hashed by default (e.g. maintaining integrity & finding duplicates)

    It has been implemented for Linux using FUSE, specifically using the Perl-FUSE module, providing UNIX file system interface for test purposes:

    % cp .../Shakespeare/*.txt .
    

    % cp .../Books/*.pdf .

    % cp -r .../Photos .

    once data is in the MetaFS realm, all data is indexed within seconds (it may take longer if large quantity of new data arrives), as next you can query the indexed data:
    % mfind sherlock
    ... list all files where 'sherlock' was found (.txt, .pdf, .odt etc)
    

    % mfind mime:image/ ... list all images

    % mfind location:lat=40,long=-10 ... list all items (e.g. photos) with near GPS location

    % mfind location:city=London,GB ... list all items (e.g. photos) with near GPS location

    "No more grep", but all content is fully indexed.

    I think a state-of-the-art file system should have the functionality of a database:

    • easy to query
    • fast searching of content, filename, tags or other metadata (incl. geospatial lookup of GPS coordinates of items)
    • flexible views (no constraints on actual structure)

    Linux desktops (GNOME, KDE, etc) and Microsoft's Windows (XP,Vista,7,8) have all failed (as of 2013/11) in this regards, metadata information are not handled well, search for content are only available as third party software or are very slow (e.g. post indexing). Apple on the other hand has provided some of the functionality as MetaFS proposes: OS X provides full text search and tagging; yet, it's only available on the OS X platform and is a closed system.

    MetaFS goes further, beside being Open Source, it allows you to write your own handlers, e.g. to extract metadata from soundfiles and visualize the waveform, or parse the text content and look for village or city names, and tag the text with GPS coordinates.

    You find more information at MetaFS.org .



    2012/11/27
    UNIX Man on Windows 7: VirtualBox + Ubuntu + LXC
    last edited 2013/12/14 07:40 (*)

    I code nowadays (2012/11) on a bunch of laptops (with 2nd screens attached) which run on Windows 7 (Win7) mostly - with one keyboard and mouse controlling 2-4 machines using Synergy package.

    Win7 is suitable for basic works, but in the moment serious programming is required, a real UNIX is required. I used to install Cygwin.com (UNIX framework for Windows) but switched now (2012/10) to VirtualBox.org (VB), which I virtualize an entire LINUX/Ubuntu Server Edition (12.10) box with.


    Once it's running and up, I use PuTTY to ssh/login into the virtual machine, and I follow up and install LXC:

    % sudo apt-get install lxc lxc-utils
    % sudo lxc-create -t ubuntu -n ubu00
    % sudo lxc-console -n ubu00
    

    and you will see an actual login:

    Ubuntu 12.10 ubu00 tty1
    

    ubu00 login: |

    Virtual Machines (LXC) within a Virtual Machine (VirtualBox)

    LinuX Containers (LXC) is a lightweight LINUX virtualization approach with little demands on the CPU unlike other approaches such as Xen.org or KVM ; and therefore it is possible to run LXC containers within a VB-box:

    • Windows 7 (e.g. 192.168.0.10)
      • VirtualBox (with "Bridged Network")
        • LXC Host (e.g. 192.168.0.32)
          • LXC machine 1 (e.g. 10.0.3.12)
          • LXC machine 2 (e.g. 10.0.3.20)
          • etc.

    or Windows7(VirtualBox(LXC Host(LXC machine 1, LXC machine 2,..)))

    The computational overhead of LXC containers to its host is minimal, as LXC is just process isolation, all using the same LINUX kernel.

    As a sidenote, VirtualBox.org the Open Source Software (OSS) performs along the commercial competition like VMWare Player , only apprx. 6% difference, VMWare Player slightly faster.

    LXC framework on Ubuntu 12.10 provides various templates:

    • altlinux
    • archlinux
    • busybox: 2MB small functional LINUX system
    • debian: works right away (apprx. 300MB)
    • fedora: requires yum to be installed first (apprx. 485MB)
    • opensuse: requires zypper to be installed, failed to compile due immature 'cmake' mess
    • ubuntu: works flawlessly (apprx. 310MB)
    • ubuntu-cloud: works flawlessly (apprx. 670MB)

    Additionally you can clone existing LXC containers, e.g. I created

    • ubu00 as default Ubuntu, and
    • ubu01, ubu02 are cloned from ubu00,
    • alike with deb00 Debian.org etc.

    I personally prefer Ubuntu.com LINUX flavor due the solid package manager, and installing the usual components is done quickly, e.g.

    % sudo apt-get install screen lighttpd mysql-server mysql-client mongodb samba
    
    With a decent equipped laptop (e.g. 3GB RAM, 2 cores, 2GHz) a reasonable responsive LINUX box with LXC-based virtualized sub-machines is possible, ideal for development (e.g. CMS like Wordpress.org / Typo3.org / Drupal.org or Mediawiki.org ) and testing configurations intensively.

    Update 2012/11/30: I began to work with server hardware, where I was creating 40 LXC machines, and start and stop them in batch, and I noticed larger amount of LXC do not start and stop reliable as of Ubuntu 12.10, e.g. out of 40 about 1-7 machines fail to start or stop (lxc-stop hangs actually) every 2nd or 3rd time of starting or stopping. So, it's good for experimenting, but for production it seems not yet ready. A quick solution is to put a sleep of one second before starting the next container. I will issue a bug report addressing problem.

    Update 2012/12/21: Nested LXC and juju cloud framework: LXC in Ubuntu 12.04 , useful overview and details.



    2009/03/03
    Problems with MacOSX
    last edited 2009/03/30 19:08 (*)

    On MacOSX 10.5.6 on MacBook Pro:

    Rendering Artifacts

    I was disappointed about KDE-4.1 half backed unfinished frontend programming where graphical artifacts were quite common, yet, after 2-3 weeks the MacBook Pro with MacOSX 10.5.6 with recent fixes shows OpenGL articifacts as well. Here a screenshot showing the black artifacts (the blurred out infos and red marker is done by me):


    MacOSX OpenGL artifacts (aka nobody is perfect)

    Crashing while Asleep

    Today I opened the MacBook Pro, after having put the machine into sleep . . . and it stopped to wake up. I had to forcefully shutdown the machine by pressing the "ON/OFF" (|) button for 5 seconds, then it shut down, waiting a few seconds and press the button again, and the machine was booting freshly.

    I'm surprised that Apple has the same problems as PC makers to put machines to sleep and wake up instantly.

    Setting Up Apple File Server (AFP) on Kubuntu

    I found this link HowTo: Make Ubuntu A Perfect Mac File Server And Time Machine which was most informative, and surprising one has to compile the 'netatalk' by hand in order to include settings required to make AFP work with recent MacOSX clients - but after 40 minutes the AFP server was up and running, even announced through the network as it were an original Apple File Server.

    The only problem I faced later, when you create files and folders on the console of the server itself (Linux), those become unreadable or unaccessible for the MacOSX access and vice-versa. This becomes a problems when you work on a web-site, and save files on it, and have Linux webserver access those files internally.

    Terminal.app: Fixing Backspace & Delete Keys

    As one notices quickly, Apple redefined the Backspace key to be "Delete", and the Delete key to be "Backspace", Microsoft behaviour, and this is meant as an insult.

    Here the remedy:

    • Within Terminal.app -> Preference -> Advanced -> "Delete sends ^H" and select this
    • Within your .cshrc or .bash add 'stty erase ^H'

    Source:



    Check also other posts with other tags.


    [ post new entry ] (only for administators)

    Title:

    Text:

    Tags: (separated by commas)

    Date (optional):

    Password:
     


    .:.




    Copyright 2007-2016, 2020-2022 © by René K. Müller <spiritdude@gmail.com>
    Illustrations and graphics made with Inkscape, GIMP and Tgif