Coder Social home page Coder Social logo

cimba's Introduction

Build Status

Client-Integrated Micro-Blogging Architecture application

Note: if you just want to get down to business, you can skip directly to the dev section.

CIMBA for End-Users

CIMBA is a privacy-friendly, decentralized microblogging application that runs in your browser. It is built using the latest HTML5 technologies and Web standards. With CIMBA, people get a microblogging app that behaves like Twitter, built entirely out of parts they can control.

To use CIMBA, people must have an account at some Data Server (also called a “personal data store”) which implements the Linked Data Platform (LDP) Web standard with appropriate extensions. Users may choose to run their own Data Server, use one provided by an employer/school/government, or even pay for a Data Server service. Whatever their choice, they can easily switch to another Data Server whenever they want or even concurrently use different Data Servers for different aspects of their life.

Basically, if you don't like CIMBA anymore, or if there is a better microblogging Web app that you want to use, you just need to replace the Web app, which only acts as the UI component of the system. The data you have created will not be affected by the change!

Once the app has been loaded into your browser, all communications will take place between you (the actual app running in the browser) and your personal Data Server, or the Data Servers of the people to which you have subscribed. Whatever data/content CIMBA produces will also be stored on your Data Server.

In other words:

  • open protocol: CIMBA clients and servers communicate entirely using open standard protocols, formats, and vocabularies. New elements may not yet have been standardized, but we fully support them becoming open standards. This means anyone can read the specs and make a drop-in replacement client or server.

  • open source: our implementation of CIMBA, including all its libraries and the Data Server code, are available under an Open Source license (MIT). Creating your own fork is easy and also encouraged!

  • open data: as a Crosscloud application, CIMBA stores its data under user control, so if the user runs an alternative client, they have access to exactly the same data. Users can even use multiple compatible clients at the same time, seeing the same content.

  • open network: since social connections are modeled as more data, when users switch clients, they keep their social networks. New CIMBA-compatible applications start off already having a critical mass of users, instead of starting as a “ghost town”, populated only by the most intrepid early adopters.

  • open platform: because the essential functionality is provided by the (application-agnostic) Data Servers, new clients can be deployed as just static files (html, css, js). Developers do not need to code up any back-end or have any operational support -- any generic web hosting is fine.

  • extensible: because CIMBA’s data model is RDF triples, modified versions can extend the model with their own arbitrary data, such a geographic or demographic data. When necessary, modified versions can also use LDP extensions. If properly designed, these extension will be available to the people using the extended software, but have a graceful fall-back for everyone else.

  • independent: CIMBA forks and CIMBA-compatible applications are not subject to the control of any 3rd party, such as a company that might come to view your software as competition, or a foreign government. You don’t need anyone’s permission to run your own CIMBA-compatible clients or Data Management servers.

CIMBA for Developers

For software developers, CIMBA presents a radically open alternative to platforms like Twitter and Facebook.

Components

  • Being 100% decentralized and free of application-specific back-ends, CIMBA uses HTTP to communicate with generic Data Servers, though HTTPS support on the Data Servers is strongly recommended.

  • The client is built using the latest HTML5 technologies. We're also using AngularJS!

  • To identify users, CIMBA relies on WebID (a work-in-progress open standard at W3C).

  • For authentication, a mix between WebID-TLS and WebID delegated access (link to paper) is used.

  • Access control policies on the Data Server are written using WebAccessControl, a decentralized system for allowing different users and groups various forms of access to resources where users and groups are identified by HTTP URIs (WebIDs in our case).

Architecture - overview

CIMBA only requires one starting point, the user's WebID. Here is an example WebID: https://user.name/card#me. From the WebID, CIMBA follows Linked Data principles to discover where the user's posts are, as well as where to fetch posts from the people the user has subscribed to. You can use the following pseudo-algorithm as reference:

Get WebID -> find <Storage endpoint>
    |-> from <Storage endpoint> -> get all [Workspaces]
        |-> for each <workspace> in [Worspaces] -> is sioc:Space?
            |-> if True
                |-> from <workspace> -> get all [Channels]
                    |-> for each <channel> in [Channels] -> get [Posts]
                        |-> display [Posts] and allow new posts from user
            |-> if all False (no microblogging workspaces found)
                |-> suggest (create) <new workspace> under <Storage endpoint>
                |-> suggest (create) <new channel> under <new workspace>
                    |-> set <new channel> as default and allow new posts from user

Architecture - detailed

When we started designing CIMBA, we wanted it to work in a very generic way, to allow it to be more interoperable. Here are some very important concepts we came up with:

  • All content (data) generated by CIMBA will be stored on the user's Data Server in a workspace dedicated to microblogging. The Space vocabulary is used to describe workspaces.

  • CIMBA uses the SIOC vocabulary to express microblogging posts and to save the feeds that it has to follow in order to fetch data from outside sources (i.e. people you subscribe to).

  • Linked Data principles are used to link from the profile to the actual Data Server that is used as generic storage. In other words, CIMBA will then look for a specific relation which indicates that the user has attached a Data Server to his/her profile. The triple looks like this:

<#me> <http://www.w3.org/ns/pim/space#storage> <https://example.org/data/> .

  • From the generic storage space, CIMBA will try to find the workspace dedicated to microblogging by doing an HTTP GET on https://example.org/data/. If no microblogging workspace is found, CIMBA assumes the user does not use microblogging and it will automatically create a workspace by doing an HTTP POST to https://example.org/data/, which is an LDP Container. Here is an example of the request (abstracting prefixes):

    REQUEST:

    POST /data/ HTTP/1.1
    Host: example.org
    Content-Type: text/turtle
    Slug: microblog
    Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
    
    <>  a ldp:BasicContainer;
        dc:title "Microblogging workspace" .
    

    RESPONSE:

    HTTP/1.1 201 Created
    Location: https://example.org/data/microblog/
    Link: <https://example.org/data/microblog/.acl>; rel=acl
    Link: <https://example.org/data/microblog/.meta>; rel=meta
    

    CIMBA used LDP to create a new container, which is the microblogging workspace. A very interesting feature is the rel=acl Link header. This header is returned by the server to indicate where the client (CIMBA) can POST access control policies for the newly created resource.

  • Unlike Twitter, CIMBA introduces the concept of channels, to be used as categories for different kinds of content (i.e. personal posts, work-related, family, etc.). To create channels, the same procedure is used as was the case earlier for the microblog workspace.

    REQUEST:

    POST /data/microblog/ HTTP/1.1
    Host: example.org
    Content-Type: text/turtle
    Slug: channel
    Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
    
    <>  a ldp:BasicContainer;
        dc:title "Main channel" .
    

    RESPONSE:

    HTTP/1.1 201 Created
    Location: https://example.org/data/microblog/channel/
    Link: <https://example.org/data/microblog/channel/.acl>; rel=acl
    Link: <https://example.org/data/microblog/channel/.meta>; rel=meta
    
  • Because CIMBA encourages users to have multiple channels, users can then define different ACL policies as they sit fit. The ACL policies apply by default to all posts (content) created within. However, CIMBA allows users to override the default ACLs by setting a specific policy for new posts. Using the link in the rel=acl Link header, CIMBA can easily post a default ACL policy: REQUEST:

    POST /data/microblog/channel/.acl HTTP/1.1
    Host: example.org
    Content-Type: text/turtle
    
    <>
        <http://www.w3.org/ns/auth/acl#accessTo> <>, <.> ;
        <http://www.w3.org/ns/auth/acl#agent> <https://user.name/card#me> ;
        <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write> .
    
    <#channel>
        <http://www.w3.org/ns/auth/acl#accessTo> <.> ;
        <http://www.w3.org/ns/auth/acl#agentClass> foaf:Agent ;
        <http://www.w3.org/ns/auth/acl#defaultForNew> <.> ;
        <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .
    

    RESPONSE:

    HTTP/1.1 200 OK
    

    This policy basically states that user https://user.name/card#me can Read/Write the .acl resource, while anyone that is a foaf:Agent (any user) can Read resources from https://example.org/data/microblog/channel/.

  • A user can subscribe to other users' channels. To do so, CIMBA basically follows the same procedure as it did for the owner. At the end, if it finds any channels, it will save them in a resource called follows, under the microblogging workspace: https://example.org/data/microblog/follows. Finally, it will proceed to fech posts from each remote channel.

Karma Testing Information -Getting karma to test in chrome as well as firefox. Use the following command in a command line

npm install karma-chrome-launcher --save-dev

Then add 'karma-chrome-launcher' to the plugins array and 'Chrome' to the browsers array in karma-unit.tpl.js. Similar things must be done for the other major browsers.

cimba's People

Contributors

mansoure avatar melvincarvalho avatar presbrey avatar sandhawke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cimba's Issues

Cimba doesn't display my name when authentified

Hi

I've created a webid on stample.io and logs in to Cimba with it.
My card has public ACL for all agents.

https://sebas5.stample.io/card


<> a <http://xmlns.com/foaf/0.1/PersonalProfileDocument> ;
    <http://www.w3.org/ns/ldp#contains> <> ;
    <http://xmlns.com/foaf/0.1/primaryTopic> <#i> .

<#ld-cal> a <http://ns.rww.io/wapp#App> ;
    <http://ns.rww.io/wapp#description> "Simple Linked Data calendar with agenda."^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://ns.rww.io/wapp#endpoint> <https://sebas5.stample.io/calendar> ;
    <http://ns.rww.io/wapp#name> "LD-Cal"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://ns.rww.io/wapp#serviceId> <https://ld-cal.rww.io> .

_:node18j01fotgx1 <http://www.w3.org/ns/auth/cert#exponent> "65537"^^<http://www.w3.org/2001/XMLSchema#integer> ;
    <http://www.w3.org/ns/auth/cert#modulus> "db5de72a7b374a3d03532d768879e101e5114c711ed8cbd588166256c485897864e8973d721362d70e12e3cad16938849f3563f362de4dfb6342d73a1d6bf23cf527c7d59c0bf504569f687c8841ab12d27e8f61777b2379cd80a20a49f8ceb9fa39f95a53511dfa9164f013fb0cb1b9b2ca4e1a78f39351e1c10228e3e2697034110e88a1e75894fd88acad0a915f01cbb0f8b72bb08e6ee9d9d2a942aaf917b05b074538213e0e317d511f9abc5ce240a628fc51d818359fc4bb9d99d2451005b28897bc0718985480ccb65cf64e02940600ab99c8d2bd5f03b6bc9cd7a055aa5c673175b8b8c893e6d74ca972b6d29d48dc65f985d32bf3daf3579ef32f57"^^<http://www.w3.org/2001/XMLSchema#hexBinary> .

_:node18j01fotgx2 <http://www.w3.org/2007/ont/link#protocol> "http"^^<http://www.w3.org/2001/XMLSchema#string> , "file"^^<http://www.w3.org/2001/XMLSchema#string> , "chrome"^^<http://www.w3.org/2001/XMLSchema#string> , "https"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://www.w3.org/2000/01/rdf-schema#label> "This Session"^^<http://www.w3.org/2001/XMLSchema#string> .

<#i> <http://xmlns.com/foaf/0.1/mbox> <mailto:[email protected]> ;
    a <http://xmlns.com/foaf/0.1/Person> ;
    <http://www.w3.org/ns/auth/cert#key> _:node18j01fotgx1 ;
    <http://xmlns.com/foaf/0.1/knows> <https://my-profile.eu/people/deiu/card#me> , <http://bblfish.net/people/henry/card#me> ;
    <http://xmlns.com/foaf/0.1/givenname> "Herqule"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://xmlns.com/foaf/0.1/workplaceHomepage> "www.stample.io"^^<http://www.w3.org/2001/XMLSchema#string> ;
    <http://xmlns.com/foaf/0.1/name> "Sebastien Lorber"^^<http://www.w3.org/2001/XMLSchema#string> .

My card has a name / given name but Cimba displays Hello Unknown...

Enhancement - Search / Discovery

So, from a discovery layer - being able to share a URL from cimba, to present a channel. User would need to 'subscribe' if they wanted to 'save it'.

Re: Search, the ability to search for content.

making and editing FOAF

Newbies being introduced to FOAF / RWW / Dataspaces, etc. need something simple to help em go get foaf'd.

also; given that a newbie will likely be introduced by someone else who's already been foaf'd, perhaps when finding others on the network, it would be nice to adapt / edit existing foaf to include 'friend' in the foafs.

The other use-case might be to allow followers or not to. Ie; not friend, nor associate, nor colleague but rather likes to follow channel therefore; channel has foaf of its own?

or other method...

Add installation and running info

As far as my experience goes, it's necessary to:

  1. clone the repository
  2. npm install, bower install, ...

But I don't know what to do with Grunt and I have no desire to go through Grunt docs to find out.
A simple info about prerequisities, installation steps and running the app would go a long way.

❤️ 🔗 💻

Detect Hyperlinks

It would be nice if posts could detect hyperlinks and make them clickable.

I'll have a look to see if I can find a js library that does this.

webid diagnostic link broken auth.my-profile.eu

When cimba login fails at http://cimba.co/#/login , it pops up a dialog panel which points you to

https://auth.my-profile.eu/auth/index.php?verbose=on

to diagnose the problem, but that domain doesn't exist:

$ nslookup my-profile.eu
Server:     128.30.2.23
Address:    128.30.2.23#53

Non-authoritative answer:
Name:   my-profile.eu
Address: 212.1.214.33

$ nslookup auth.my-profile.eu
Server:     128.30.2.23
Address:    128.30.2.23#53

** server can't find auth.my-profile.eu: NXDOMAIN

(Not sure why my login failed either -- might be separate bug)

webid diagnostic link broken auth.my-profile.eu

When cimba login fails at http://cimba.co/#/login , it pops up a dialog panel which points you to

https://auth.my-profile.eu/auth/index.php?verbose=on

to diagnose the problem, but that domain doesn't exist:

$ nslookup my-profile.eu
Server:     128.30.2.23
Address:    128.30.2.23#53

Non-authoritative answer:
Name:   my-profile.eu
Address: 212.1.214.33

$ nslookup auth.my-profile.eu
Server:     128.30.2.23
Address:    128.30.2.23#53

** server can't find auth.my-profile.eu: NXDOMAIN

(Not sure why my login failed either -- might be separate bug)

Enhancement - Create URI / URL for Sharing Channel

I've started using CIMBA as a way to log WebLinks, whilst researching an area of technology where i'm considering how to define usable solutions.

It would be useful if i could generate a link for the channel, that i could share, so others could in-turn be made aware of the channel and track it / contribute, etc.

Channels not found

I seem to not be able to find my channels any more. Tim Holborn reported the same issue.

I get the message:

You're almost there! Now you just need to create a channel for your posts.

From the ng

ng-show="me.webid && me.storagespace && me.mbspace && me.chspace == false"

It finds my webid and greets me, but not sure about the space.

It works fine for me on an earlier cloned version at http://foaf.cc

hash: a21d3a4
date: 19 March 201

Will see if I can work out more.

WebID - Log-out

I've got a few webid's stored. When i log-out, it automatically selects the same certificate to log back in again.

would be nice if it had a prompt that said something along the lines of 'login as' (name of existing WebID) or New.

Default webids end in #

Perhaps the wrong repo to put this issue, but the default webid provider ( I think id.mit.edu ? ) provides webid's that end in a #

This is fine in turtle or ntriples, but it will break qnames which some tooling depends on.

Suggest in the spirit of "Cool URIs dont change" to add #me #this or #i instead if possible to new IDs

Enhancement: Collaborative Channels

Create a channel that's a collaborative channel.

Perhaps about a topic. Not sure.

Could be done semantically? similar to a #tag.

could be done by creating an 'id' that lives in some 'commons' area.

Perhaps using an ontological function, that points at a URI that makes a #tag type method more specific; for grouping purposes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.