Ver Fonte

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/SPIN/thesis-carsten-hybridosn

Carsten Porth há 6 anos atrás
pai
commit
252d235caf
33 ficheiros alterados com 913 adições e 285 exclusões
  1. 231 237
      app/package-lock.json
  2. 2 1
      app/package.json
  3. 5 1
      app/src/app/app.module.ts
  4. 1 1
      app/src/components/tweet-body/tweet-body.html
  5. 2 1
      app/src/components/tweet-body/tweet-body.ts
  6. 1 1
      app/src/components/tweet/tweet.html
  7. 10 6
      app/src/components/tweet/tweet.scss
  8. 51 4
      app/src/pages/home/home.ts
  9. 12 2
      app/src/pages/profile/profile.ts
  10. 27 12
      app/src/pages/write-tweet/write-tweet.ts
  11. 30 0
      app/src/providers/p2p-database-gun/p2p-database-gun.ts
  12. 29 0
      app/src/providers/p2p-storage-ipfs/p2p-storage-ipfs.ts
  13. 28 19
      app/src/providers/twitter-api/twitter-api.ts
  14. BIN
      thesis/Masterthesis - Hybrid Online Social Networks - Carsten Porth.pdf
  15. 61 0
      thesis/Masterthesis - Hybrid Online Social Networks - Carsten Porth.tex
  16. 101 0
      thesis/Masterthesis - Hybrid Online Social Networks - Carsten Porth.xmpdata
  17. 3 0
      thesis/bib/bibliography.bib
  18. 7 0
      thesis/content.tex
  19. 0 0
      thesis/content/00-abstract-de.tex
  20. 0 0
      thesis/content/00-abstract-en.tex
  21. 14 0
      thesis/content/01-introduction.tex
  22. 14 0
      thesis/content/02-background.tex
  23. 32 0
      thesis/content/03-related-work.tex
  24. 5 0
      thesis/content/04-concept.tex
  25. 5 0
      thesis/content/05-proof-of-concept.tex
  26. 2 0
      thesis/content/06-discussion.tex
  27. 11 0
      thesis/content/07-conclusion.tex
  28. BIN
      thesis/graphics/.DS_Store
  29. 69 0
      thesis/header.tex
  30. 113 0
      thesis/pdfa.xmpi
  31. 35 0
      thesis/tud/erklaerung.tex
  32. BIN
      thesis/tud/tk.pdf
  33. 12 0
      thesis/tud/tkTitle.tex

Diff do ficheiro suprimidas por serem muito extensas
+ 231 - 237
app/package-lock.json


+ 2 - 1
app/package.json

@@ -41,6 +41,7 @@
     "cordova-support-google-services": "^1.2.0",
     "cordova-universal-links-plugin": "git+https://github.com/walteram/cordova-universal-links-plugin.git",
     "firebase": "^5.2.0",
+    "gun": "^0.9.99996",
     "ionic-angular": "3.9.2",
     "ionicons": "3.0.0",
     "javascript-time-ago": "^1.0.31",
@@ -50,7 +51,7 @@
     "zone.js": "0.8.26"
   },
   "devDependencies": {
-    "@ionic/app-scripts": "3.1.10",
+    "@ionic/app-scripts": "^3.2.0",
     "typescript": "~2.6.2"
   },
   "description": "HybridOSN is a Twitter client and a so called Dapp which allows its users to exchange data also via a P2P network using blockchain technology.",

+ 5 - 1
app/src/app/app.module.ts

@@ -24,6 +24,8 @@ import { ProfileHeaderComponent } from '../components/profile-header/profile-hea
 import { PipesModule } from '../pipes/pipes.module';
 import { WriteTweetPage } from '../pages/write-tweet/write-tweet';
 import { QuotedStatusComponent } from '../components/quoted-status/quoted-status';
+import { P2pStorageIpfsProvider } from '../providers/p2p-storage-ipfs/p2p-storage-ipfs';
+import { P2pDatabaseGunProvider } from '../providers/p2p-database-gun/p2p-database-gun';
 
 @NgModule({
   declarations: [
@@ -65,7 +67,9 @@ import { QuotedStatusComponent } from '../components/quoted-status/quoted-status
     HttpClient,
     { provide: ErrorHandler, useClass: IonicErrorHandler },
     AuthProvider,
-    TwitterApiProvider
+    TwitterApiProvider,
+    P2pStorageIpfsProvider,
+    P2pDatabaseGunProvider
   ]
 })
 export class AppModule { }

+ 1 - 1
app/src/components/tweet-body/tweet-body.html

@@ -1,6 +1,6 @@
 <!-- Generated template for the TweetBodyComponent component -->
 <div>
-  <p [innerHTML]="status | replaceUrls: entities.urls | replaceHashtags: entities.hashtags"></p>
+  <p [innerHTML]="status"></p>
   <img *ngIf="hasPhoto" src="{{ entities.media[0]['media_url_https'] }}" alt="Photo" class="photo">
   <quoted-status *ngIf="data.quoted_status" [data]="data.quoted_status"></quoted-status>
 </div>

+ 2 - 1
app/src/components/tweet-body/tweet-body.ts

@@ -34,7 +34,8 @@ export class TweetBodyComponent {
 
   get hasPhoto() {
     return (
-      this.entities["media"] && this.entities["media"][0]["type"] == "photo"
+      !this.data["private_tweet"] &&
+      (this.entities["media"] && this.entities["media"][0]["type"] == "photo")
     );
   }
 }

+ 1 - 1
app/src/components/tweet/tweet.html

@@ -1,4 +1,4 @@
-<ion-item text-wrap>
+<ion-item text-wrap [class.private]="data.private_tweet">
   <p *ngIf="data.retweeted_status" class="retweet-info">{{ data.user.name }} has retweeted:</p>
   <tweet-header [user]="user" [tweetCreatedAt]="createdAt"></tweet-header>
   <tweet-body [data]="data"></tweet-body>

+ 10 - 6
app/src/components/tweet/tweet.scss

@@ -1,7 +1,11 @@
 tweet {
-  .retweet-info {
-    font-weight: 250;
-    font-size: 10px;
-    margin-bottom: 8px;
-  }
-}
+    .retweet-info {
+        font-weight: 250;
+        font-size: 10px;
+        margin-bottom: 8px;
+    }
+    .private {
+        background: #333;
+        color: #efefef;
+    }
+}

+ 51 - 4
app/src/pages/home/home.ts

@@ -5,8 +5,11 @@ import {
   MenuController,
   InfiniteScroll
 } from "ionic-angular";
+import { Storage } from "@ionic/storage";
 import { TwitterApiProvider } from "../../providers/twitter-api/twitter-api";
 import { WriteTweetPage } from "../write-tweet/write-tweet";
+import { P2pDatabaseGunProvider } from "../../providers/p2p-database-gun/p2p-database-gun";
+import { P2pStorageIpfsProvider } from "../../providers/p2p-storage-ipfs/p2p-storage-ipfs";
 
 @IonicPage()
 @Component({
@@ -20,20 +23,44 @@ export class HomePage {
   constructor(
     public navCtrl: NavController,
     private twitter: TwitterApiProvider,
-    private menuCtrl: MenuController
+    private menuCtrl: MenuController,
+    private gun: P2pDatabaseGunProvider,
+    private ipfs: P2pStorageIpfsProvider,
+    private storage: Storage
   ) {}
 
   ionViewDidLoad() {
     this.menuCtrl.enable(true, "sideNav");
   }
 
-  ionViewDidEnter() {
-    this.twitter.fetchHomeFeed().then(res => (this.data = res.data));
+  async ionViewDidEnter() {
+    this.twitter
+      .fetchHomeFeed()
+      .then(
+        res =>
+          (this.data = this.data
+            .concat(res.data)
+            .sort((a, b) => this.sortByDateAsc(a, b)))
+      );
+    this.gun
+      .getLastTweetFromUser("username")
+      .then(hash => this.ipfs.fetchTweet(hash))
+      .then(tweet => this.addUserObject(tweet))
+      .then(
+        res =>
+          (this.data = this.data
+            .concat(res)
+            .sort((a, b) => this.sortByDateAsc(a, b)))
+      );
+    this.twitter
+      .fetchFriends(await this.storage.get("userId"))
+      .then(res => console.log(res));
   }
 
   doRefresh(refresher) {
     this.twitter.fetchHomeFeed().then(res => {
       this.data = res.data;
+      console.log(res);
       refresher.complete();
     });
   }
@@ -42,7 +69,9 @@ export class HomePage {
     this.twitter
       .fetchHomeFeedSince(this.data[this.data.length - 1].id)
       .then(res => {
-        this.data = this.data.concat(res.data);
+        this.data = this.data
+          .concat(res.data)
+          .sort((a, b) => this.sortByDateAsc(a, b));
         infiniteScroll.complete();
       });
   }
@@ -50,4 +79,22 @@ export class HomePage {
   writeTweet() {
     this.navCtrl.push(WriteTweetPage);
   }
+
+  private async addUserObject(tweet) {
+    tweet.user = await this.twitter.fetchUser(tweet.user_id);
+    return tweet;
+  }
+
+  private sortByDateAsc(a, b) {
+    const dateA = new Date(a.created_at);
+    const dateB = new Date(b.created_at);
+
+    if (dateA > dateB) {
+      return -1;
+    } else if (dateA < dateB) {
+      return 1;
+    } else {
+      return 0;
+    }
+  }
 }

+ 12 - 2
app/src/pages/profile/profile.ts

@@ -6,6 +6,8 @@ import {
   InfiniteScroll
 } from "ionic-angular";
 import { TwitterApiProvider } from "../../providers/twitter-api/twitter-api";
+import { P2pStorageIpfsProvider } from "../../providers/p2p-storage-ipfs/p2p-storage-ipfs";
+import { P2pDatabaseGunProvider } from "../../providers/p2p-database-gun/p2p-database-gun";
 
 /**
  * Generated class for the ProfilePage page.
@@ -22,13 +24,14 @@ import { TwitterApiProvider } from "../../providers/twitter-api/twitter-api";
 export class ProfilePage {
   userId: string;
   user: any = [];
-
   tweets: any[];
 
   constructor(
     public navCtrl: NavController,
     public navParams: NavParams,
-    private twitter: TwitterApiProvider
+    private twitter: TwitterApiProvider,
+    private ipfs: P2pStorageIpfsProvider,
+    private gun: P2pDatabaseGunProvider
   ) {}
 
   ionViewDidLoad() {
@@ -39,6 +42,8 @@ export class ProfilePage {
     this.twitter
       .fetchUserTimeline(this.userId)
       .then(res => (this.tweets = res));
+
+    this.checkP2pTweets("username");
   }
 
   doRefresh(refresher) {
@@ -59,4 +64,9 @@ export class ProfilePage {
         infiniteScroll.complete();
       });
   }
+
+  private async checkP2pTweets(userId) {
+    const lastTweetHash = await this.gun.getLastTweetFromUser(userId);
+    const res = await this.ipfs.fetchTweet(lastTweetHash);
+  }
 }

+ 27 - 12
app/src/pages/write-tweet/write-tweet.ts

@@ -3,10 +3,13 @@ import {
   IonicPage,
   NavController,
   NavParams,
-  AlertController
+  LoadingController
 } from "ionic-angular";
 import { FormBuilder, Validators, FormGroup } from "@angular/forms";
 import { TwitterApiProvider } from "../../providers/twitter-api/twitter-api";
+import { Storage } from "@ionic/storage";
+import { P2pStorageIpfsProvider } from "../../providers/p2p-storage-ipfs/p2p-storage-ipfs";
+import { P2pDatabaseGunProvider } from "../../providers/p2p-database-gun/p2p-database-gun";
 
 /**
  * Generated class for the WriteTweetPage page.
@@ -28,7 +31,10 @@ export class WriteTweetPage {
     public navParams: NavParams,
     private formBuilder: FormBuilder,
     private twitter: TwitterApiProvider,
-    private alertCtrl: AlertController
+    private loadingCtrl: LoadingController,
+    private storage: Storage,
+    private ipfs: P2pStorageIpfsProvider,
+    private gun: P2pDatabaseGunProvider
   ) {
     this.tweet = this.formBuilder.group({
       text: ["", Validators.maxLength(140)],
@@ -45,20 +51,29 @@ export class WriteTweetPage {
     return progress * circumference;
   }
 
-  submitTweet() {
+  async submitTweet() {
+    let loading = this.loadingCtrl.create();
+    loading.present();
+
     if (this.tweet.value.p2p) {
-      this.alertCtrl
-        .create({
-          title: "Private Mode",
-          subTitle:
-            "Your tweet will be encrypted and send to the private network. TODO!",
-          buttons: ["OK"]
-        })
-        .present();
+      const tweet = await this.buildPrivateTweet();
+      const res = await this.ipfs.storeTweet(tweet);
+      this.gun.storeLastTweetHashForUser("username", res["Hash"]);
     } else {
-      this.twitter.tweet(this.tweet.value["text"]);
+      await this.twitter.tweet(this.tweet.value["text"]);
     }
 
+    loading.dismiss();
     this.navCtrl.pop();
   }
+
+  private async buildPrivateTweet() {
+    return {
+      full_text: this.tweet.value["text"].trim(),
+      user_id: await this.storage.get("userId"),
+      created_at: Date.now(),
+      private_tweet: true,
+      entities: {}
+    };
+  }
 }

+ 30 - 0
app/src/providers/p2p-database-gun/p2p-database-gun.ts

@@ -0,0 +1,30 @@
+import { Injectable } from "@angular/core";
+import Gun from "gun";
+
+/*
+  Generated class for the P2pDatabaseGunProvider provider.
+
+  See https://angular.io/guide/dependency-injection for more info on providers
+  and Angular DI.
+*/
+@Injectable()
+export class P2pDatabaseGunProvider {
+  private gun;
+
+  constructor() {
+    this.gun = Gun();
+  }
+
+  public storeLastTweetHashForUser(userid, hash): void {
+    this.gun.get(userid).put({ lastTweet: hash });
+  }
+
+  public async getLastTweetFromUser(userid) {
+    return new Promise(resolve =>
+      this.gun
+        .get(userid)
+        .get("lastTweet")
+        .once(resolve)
+    );
+  }
+}

+ 29 - 0
app/src/providers/p2p-storage-ipfs/p2p-storage-ipfs.ts

@@ -0,0 +1,29 @@
+import { HttpClient } from "@angular/common/http";
+import { Injectable } from "@angular/core";
+
+/*
+  Generated class for the P2pStorageIpfsProvider provider.
+
+  See https://angular.io/guide/dependency-injection for more info on providers
+  and Angular DI.
+*/
+@Injectable()
+export class P2pStorageIpfsProvider {
+  private infuraUrl = "https://ipfs.infura.io:5001/api/v0/";
+
+  constructor(public http: HttpClient) {}
+
+  public storeTweet(tweet) {
+    const formData = new FormData();
+    formData.append("data", JSON.stringify(tweet));
+
+    return this.http.post(this.infuraUrl + "add", formData).toPromise();
+  }
+
+  public fetchTweet(hash) {
+    const options = {
+      params: { arg: hash }
+    };
+    return this.http.get(this.infuraUrl + "cat", options).toPromise();
+  }
+}

+ 28 - 19
app/src/providers/twitter-api/twitter-api.ts

@@ -5,30 +5,20 @@ import Twit from "twit";
 
 @Injectable()
 export class TwitterApiProvider {
-  consumer_key: string = "UxZkbKotkr8Uc6seupnaZ1kDE";
-  consumer_secret: string =
-    "fEAas8iugR60FOEXsFG0iajq6oyfIIXRBVMlTgWxBd1stWIKHq";
-  access_token_key: string;
-  access_token_secret: string;
-  client;
+  client: Twit;
 
   constructor(public http: HttpClient, private storage: Storage) {
-    Promise.all([
-      this.storage.get("accessTokenKey"),
-      this.storage.get("accessTokenSecret")
-    ]).then(values => {
-      this.access_token_key = values[0];
-      this.access_token_secret = values[1];
-      this.initApi();
-    });
+    this.initApi();
   }
 
-  private initApi() {
+  private async initApi() {
+    const access_token_key = await this.storage.get("accessTokenKey");
+    const access_token_secret = await this.storage.get("accessTokenSecret");
     this.client = new Twit({
-      consumer_key: this.consumer_key,
-      consumer_secret: this.consumer_secret,
-      access_token: this.access_token_key,
-      access_token_secret: this.access_token_secret,
+      consumer_key: "UxZkbKotkr8Uc6seupnaZ1kDE",
+      consumer_secret: "fEAas8iugR60FOEXsFG0iajq6oyfIIXRBVMlTgWxBd1stWIKHq",
+      access_token: access_token_key,
+      access_token_secret: access_token_secret,
       timeout_ms: 60 * 1000 // optional HTTP request timeout to apply to all requests.
     });
   }
@@ -88,4 +78,23 @@ export class TwitterApiProvider {
   public async tweet(status) {
     return await this.client.post("statuses/update", { status: status });
   }
+
+  public async fetchFriends(userId) {
+    let friends = [];
+    let cursor = -1;
+
+    while (cursor != 0) {
+      const res = await this.client.get("friends/list", {
+        user_id: userId,
+        count: 200,
+        include_user_entities: false,
+        cursor: cursor
+      });
+
+      cursor = res.data["next_cursor"];
+      friends = friends.concat(res.data["users"]);
+    }
+
+    return friends;
+  }
 }

BIN
thesis/Masterthesis - Hybrid Online Social Networks - Carsten Porth.pdf


+ 61 - 0
thesis/Masterthesis - Hybrid Online Social Networks - Carsten Porth.tex

@@ -0,0 +1,61 @@
+\input{header}
+
+%%%%%%%%%%%%%%%%
+\newcommand{\name}{Carsten Porth}
+\newcommand{\betreuer}{Jörg Daubert, Aidmar Wainakh}
+\newcommand{\type}{Masterarbeit} %Bachelorarbeit, Masterarbeit
+\newcommand{\workTitle}{Hybrid Online Social Networks}
+\newcommand{\dateOfSubmission}{\today}
+%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%
+%TK Modifications (do not modify)
+\input{tud/tkTitle}
+%%%%%%%%%%%%%%%%
+
+\begin{document}
+
+  \maketitle
+
+  \selectlanguage{english}
+  \begin{abstract}
+  \input{content/00-abstract-en}
+  \end{abstract}
+   \thispagestyle{empty}
+    
+  \selectlanguage{ngerman}
+  \begin{abstract}
+  \input{content/00-abstract-de}  
+  \end{abstract}
+
+  \thispagestyle{empty}
+  
+  \newpage
+  \tableofcontents
+  \thispagestyle{empty}
+  \newpage
+  \thispagestyle{empty}
+  \quad 
+  \newpage
+  \pagenumbering{arabic}
+  \setcounter{page}{1}
+  
+  \input{content}
+  
+  %Backmatter   
+  \clearpage
+
+  \listoffigures
+  \newpage
+  
+  \listoftables  
+  \newpage
+  
+  %Run bibtex to generate bibliography
+  \bibliography{bib/bibliography}{}
+  \bibliographystyle{plain}
+
+  \input{tud/erklaerung}
+
+\end{document}
+

+ 101 - 0
thesis/Masterthesis - Hybrid Online Social Networks - Carsten Porth.xmpdata

@@ -0,0 +1,101 @@
+% Replace the following information with your document's actual
+% metadata. If you do not want to set a value for a certain parameter,
+% just omit it.
+%
+% Symbols permitted in metadata
+% =============================
+% 
+% Within the metadata, all printable ASCII characters except
+% '\', '{', '}', and '%' represent themselves. Also, all printable
+% Unicode characters from the basic multilingual plane (i.e., up to
+% code point U+FFFF) can be used directly with the UTF-8 encoding. 
+% Consecutive whitespace characters are combined into a single
+% space. Whitespace after a macro such as \copyright, \backslash, or
+% \sep is ignored. Blank lines are not permitted. Moreover, the
+% following markup can be used:
+%
+%  '\ '         - a literal space  (for example after a macro)                  
+%   \%          - a literal '%'                                                 
+%   \{          - a literal '{'                                                 
+%   \}          - a literal '}'                                                 
+%   \backslash  - a literal '\'                                                 
+%   \copyright  - the (c) copyright symbol                                      
+%
+% The macro \sep is only permitted within \Author, \Keywords, and
+% \Org.  It is used to separate multiple authors, keywords, etc.
+% 
+% List of supported metadata fields
+% =================================
+% 
+% Here is a complete list of user-definable metadata fields currently
+% supported, and their meanings. More may be added in the future.
+% 
+% General information:
+%
+%  \Author           - the document's human author. Separate multiple
+%                      authors with \sep.
+%  \Title            - the document's title.
+%  \Keywords         - list of keywords, separated with \sep.
+%  \Subject          - the abstract. 
+%  \Org              - publishers.
+% 
+% Copyright information:
+%
+%  \Copyright        - a copyright statement.
+%  \CopyrightURL     - location of a web page describing the owner
+%                      and/or rights statement for this document.
+%  \Copyrighted      - 'True' if the document is copyrighted, and
+%                      'False' if it isn't. This is automatically set
+%                      to 'True' if either \Copyright or \CopyrightURL
+%                      is specified, but can be overridden. For
+%                      example, if the copyright statement is "Public
+%                      Domain", this should be set to 'False'.
+%
+% Publication information:
+%
+% \PublicationType   - The type of publication. If defined, must be
+%                      one of book, catalog, feed, journal, magazine,
+%                      manual, newsletter, pamphlet. This is
+%                      automatically set to "journal" if \Journaltitle
+%                      is specified, but can be overridden.
+% \Journaltitle      - The title of the journal in which the document
+%                      was published. 
+% \Journalnumber     - The ISSN for the publication in which the
+%                      document was published.
+% \Volume            - Journal volume.
+% \Issue             - Journal issue/number.
+% \Firstpage         - First page number of the published version of
+%                      the document.
+% \Lastpage          - Last page number of the published version of
+%                      the document.
+% \Doi               - Digital Object Identifier (DOI) for the
+%                      document, without the leading "doi:".
+% \CoverDisplayDate  - Date on the cover of the journal issue, as a
+%                      human-readable text string.
+% \CoverDate         - Date on the cover of the journal issue, in a
+%                      format suitable for storing in a database field
+%                      with a 'date' data type.
+
+
+
+\Title{Hybrid Online Social Networks}
+
+\Author{Carsten Porth}
+
+\Copyright{Copyright \copyright\ 2019 "Carsten Porth"}
+
+\Keywords{Hybrid App\sep
+          Online Social Network\sep
+          Peer 2 Peer\sep
+	  OOP}
+
+\Subject{Hier steht eine Zusammenfassung der Arbeit
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod 
+tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
+At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd 
+gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy 
+eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 
+At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, 
+no sea takimata sanctus est Lorem ipsum dolor sit amet.}
+

+ 3 - 0
thesis/bib/bibliography.bib

@@ -0,0 +1,3 @@
+% Encoding: UTF-8
+
+@Comment{jabref-meta: databaseType:bibtex;}

+ 7 - 0
thesis/content.tex

@@ -0,0 +1,7 @@
+\input{content/01-introduction}
+\input{content/02-background}
+\input{content/03-related-work}
+\input{content/04-concept}
+\input{content/05-proof-of-concept}
+\input{content/06-discussion}
+\input{content/07-conclusion}

+ 0 - 0
thesis/content/00-abstract-de.tex


+ 0 - 0
thesis/content/00-abstract-en.tex


+ 14 - 0
thesis/content/01-introduction.tex

@@ -0,0 +1,14 @@
+\chapter{Introduction}
+\label{ch:introduction}
+
+\section{Motivation}
+\label{sec:motivation}
+
+\section{Challenge}
+\label{sec:challenge}
+
+\section{Research Question}
+\label{sec:research-question}
+
+\section{Outline}
+\label{sec:outline}

+ 14 - 0
thesis/content/02-background.tex

@@ -0,0 +1,14 @@
+\chapter{Background}
+\label{ch:background}
+
+\section{Peer-to-peer}
+\label{sec:p2p}
+
+\subsection{Centralized vs. Dezentralized Networks}
+
+\subsection{Structured vs. Unstructured Networks}
+
+\subsection{Decentralized Applications}
+
+\section{Summary}
+\label{sec:background-summary}

+ 32 - 0
thesis/content/03-related-work.tex

@@ -0,0 +1,32 @@
+\chapter{Related Work}
+\label{ch:related-work}
+
+This chapter gives a comprehensive overview about different projects trying to protect the users' personal data. Six different approaches are presented and their relevance for this work discussed. While some projects are extensions for established online social networks, others are completely new social networks. For each project, the way data is stored and accessed and how communication is realized are investigated. The chapter concludes with a summary of the related work.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% For each project, write about
+% - how is data stored
+% - how is communication realized
+% - how is data accessed (authorization)
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{Safebook}
+\label{sec:safebook}
+
+\section{Diaspora}
+\label{sec:diaspora}
+
+\section{Akasha}
+\label{sec:akasha}
+
+\section{LifeSocial.KOM}
+\label{sec:lifesocial}
+
+\section{Twitterize}
+\label{sec:twitterize}
+
+\section{FaceCloak}
+\label{sec:facecloak}
+
+\section{Summary}
+\label{sec:related-work-summary}

+ 5 - 0
thesis/content/04-concept.tex

@@ -0,0 +1,5 @@
+\chapter{Concept}
+\label{ch:concept}
+
+\section{Summary}
+\label{sec:concept-summary}

+ 5 - 0
thesis/content/05-proof-of-concept.tex

@@ -0,0 +1,5 @@
+\chapter{Proof of Concept}
+\label{ch:proof-of-concept}
+
+\section{Summary}
+\label{sec:proof-of-concept-summary}

+ 2 - 0
thesis/content/06-discussion.tex

@@ -0,0 +1,2 @@
+\chapter{Evaluation}
+\label{ch:evaluation}

+ 11 - 0
thesis/content/07-conclusion.tex

@@ -0,0 +1,11 @@
+\chapter{Conclusions}
+\label{ch:conclusions}
+
+\section{Summary}
+\label{sec:summary}
+
+\section{Contributions}
+\label{sec:contributions}
+
+\section{Future Work}
+\label{sec:future-work}

BIN
thesis/graphics/.DS_Store


+ 69 - 0
thesis/header.tex

@@ -0,0 +1,69 @@
+\documentclass[longdoc,colorback,linedtoc,parskip=half*,accentcolor=tud9d,12pt]{tudreport}
+
+%%%%%%%%%%%%%%%%
+%Some helpful packages and commands. Modify to your needs.
+\usepackage[nottoc]{tocbibind}
+\usepackage[english,ngerman]{babel}
+\usepackage[utf8]{inputenc}
+
+\usepackage{comment}
+\usepackage{graphicx}
+\usepackage{tabularx}
+\usepackage{multirow}    
+\usepackage{multicol}
+\usepackage{rotating}
+\usepackage{tabularx}
+\usepackage{array}
+\usepackage{url}
+\usepackage[ngerman,pdfview=FitH,pdfstartview=FitV]{hyperref}
+\usepackage[a-1b]{pdfx}
+\usepackage{prettyref}
+\usepackage{booktabs}
+\usepackage{ccicons}  % for Creative Commons citation icons
+\usepackage{ragged2e} % for tighter hyphenation
+\usepackage{soul}
+\usepackage{marginnote}
+\usepackage{wrapfig}
+\usepackage{blindtext}
+
+% llt: Define a global style for URLs, rather that the default one
+\makeatletter
+\def\url@leostyle{%
+	\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
+\makeatother
+\urlstyle{leo}
+
+% farben
+\definecolor{javared}{rgb}{0.6,0,0} % for strings
+\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
+\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
+\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
+
+\definecolor{sgblue}{rgb}{0.27,0.44,0.84}
+\definecolor{sgyellow}{rgb}{0.97,0.97,0.64}
+\definecolor{sgred}{rgb}{0.67,0.2,0.0}
+\definecolor{sggray}{rgb}{0.4,0.4,0.4}
+\definecolor{sggolden}{rgb}{0.97,0.80,0.3}
+
+% quelltexte einbinden
+\usepackage{listings}
+\renewcommand{\lstlistlistingname}{List of Listings}
+\lstset{numbers=left, 
+	numberstyle=\tiny, 
+	basicstyle=\footnotesize,
+	keywordstyle=\color{javapurple}\bfseries,
+	stringstyle=\color{javared},
+	commentstyle=\color{javagreen},
+	morecomment=[s][\color{javadocblue}]{/**}{*/},
+	numbersep=10pt, 
+	language=Java,
+	frame=single
+}
+\lstset{prebreak=\raisebox{0ex}[0ex][0ex]{$\hookleftarrow$}}
+\lstset{postbreak=\raisebox{0ex}[0ex][0ex]{$\hookrightarrow$ }}
+\lstset{breaklines=true, breakatwhitespace=true}
+
+\reversemarginpar
+\newcommand\todo[1]{
+	\marginnote{\hspace*{-2cm}\fcolorbox{sggolden}{sgyellow}{\textbf{\textcolor{sgred}{\textbf{!}}}}\hspace*{0.75cm}} \textsf{\scriptsize{\fcolorbox{sggolden}{sgyellow}{\textbf{\textcolor{red}{TODO}} \textcolor{sgred}{#1}}}}
+}

+ 113 - 0
thesis/pdfa.xmpi

@@ -0,0 +1,113 @@
+<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d' ?> 
+
+<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.0-c316 44.253921, Sun Oct 01 2006 17:14:39"> 
+   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
+      <rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" 
+                       xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" 
+                       xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" 
+       > 
+        <pdfaExtension:schemas> 
+          <rdf:Bag> 
+            <rdf:li rdf:parseType="Resource"> 
+               <pdfaSchema:namespaceURI>http://ns.adobe.com/pdfx/1.3/</pdfaSchema:namespaceURI> 
+               <pdfaSchema:prefix>pdfx</pdfaSchema:prefix> 
+               <pdfaSchema:schema>PDF/X Schema</pdfaSchema:schema> 
+               <pdfaSchema:property> 
+                 <rdf:Seq> 
+                   <rdf:li rdf:parseType="Resource"> 
+                     <pdfaProperty:category>external</pdfaProperty:category> 
+                     <pdfaProperty:description>URL to an online version or preprint</pdfaProperty:description> 
+                     <pdfaProperty:name>AuthoritativeDomain</pdfaProperty:name> 
+                     <pdfaProperty:valueType>Text</pdfaProperty:valueType> 
+                   </rdf:li> 
+                 </rdf:Seq> 
+               </pdfaSchema:property> 
+            </rdf:li> 
+            <rdf:li rdf:parseType="Resource"> 
+              <pdfaSchema:schema>PRISM metadata</pdfaSchema:schema> 
+              <pdfaSchema:namespaceURI>http://prismstandard.org/namespaces/basic/2.2/</pdfaSchema:namespaceURI> 
+              <pdfaSchema:prefix>prism</pdfaSchema:prefix> 
+              <pdfaSchema:property> 
+               <rdf:Seq> 
+   <rdf:li rdf:parseType="Resource">
+    <pdfaProperty:name>aggregationType</pdfaProperty:name>
+    <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+    <pdfaProperty:category>external</pdfaProperty:category>
+    <pdfaProperty:description>The type of publication. If defined, must be one of book, catalog, feed, journal, magazine, manual, newsletter, pamphlet.</pdfaProperty:description>
+  </rdf:li> 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+              </rdf:Seq></pdfaSchema:property> 
+            </rdf:li> 
+          </rdf:Bag> 
+        </pdfaExtension:schemas> 
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/"> 
+         <pdf:Producer>pdfTeX</pdf:Producer> 
+         
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> 
+         <dc:format>application/pdf</dc:format> 
+         <dc:title><rdf:Alt><rdf:li xml:lang="x-default">Hybrid Online Social Networks</rdf:li></rdf:Alt></dc:title>
+         <dc:creator><rdf:Seq><rdf:li>Carsten Porth</rdf:li></rdf:Seq></dc:creator>
+         <dc:publisher><rdf:Bag><rdf:li></rdf:li></rdf:Bag></dc:publisher>
+         
+         <dc:rights><rdf:Alt><rdf:li xml:lang="x-default">Copyright © 2019 "Carsten Porth"</rdf:li></rdf:Alt></dc:rights>
+         <dc:description><rdf:Alt><rdf:li xml:lang="x-default">Hier steht eine Zusammenfassung der Arbeit Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</rdf:li></rdf:Alt></dc:description>
+         <dc:subject><rdf:Bag><rdf:li>Hybrid App</rdf:li>
+     <rdf:li>Online Social Network</rdf:li>
+     <rdf:li>Peer 2 Peer</rdf:li>
+     <rdf:li>OOP</rdf:li></rdf:Bag></dc:subject>
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:prism="http://prismstandard.org/namespaces/basic/2.2/"> 
+         
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> 
+ 
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"> 
+         <pdfaid:part>1</pdfaid:part> 
+         <pdfaid:conformance>B</pdfaid:conformance> 
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> 
+         <xmp:CreatorTool>LaTeX with hyperref package</xmp:CreatorTool> 
+         <xmp:ModifyDate>2018-10-09T01:01:56+02:00</xmp:ModifyDate> 
+         <xmp:CreateDate>2018-10-09T01:01:56+02:00</xmp:CreateDate> 
+         <xmp:MetadataDate>2018-10-09T01:01:56+02:00</xmp:MetadataDate> 
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:xmpRights = "http://ns.adobe.com/xap/1.0/rights/"> 
+         <xmpRights:Marked>True</xmpRights:Marked>
+<xmpRights:UsageTerms><rdf:Alt><rdf:li xml:lang="x-default">Copyright © 2019 "Carsten Porth"</rdf:li></rdf:Alt></xmpRights:UsageTerms>
+      
+      </rdf:Description> 
+      <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"> 
+         <xmpMM:DocumentID>uuid:2B1E6027-A121-A2A7-8228-B625D938041C</xmpMM:DocumentID> 
+         <xmpMM:InstanceID>uuid:9A4A4FE3-DBFC-7494-96F2-B2B803E582E2</xmpMM:InstanceID> 
+      </rdf:Description> 
+   </rdf:RDF> 
+</x:xmpmeta> 
+                                                                                                                                
+                                                                                                                                
+                                                                                                                                
+                                                                                                                                
+<?xpacket end='w'?> 

+ 35 - 0
thesis/tud/erklaerung.tex

@@ -0,0 +1,35 @@
+ % Try not to modify, but please check https://www.informatik.tu-darmstadt.de/de/studierende/studienbuero/abschlussarbeiten/ for any updates
+ % Date: 16.02.2018
+ \clearpage
+ 
+\section*{Erklärung zur Abschlussarbeit gemäß § 23 Abs. 7 APB der TU Darmstadt}
+  \thispagestyle{empty}
+  Hiermit versichere ich, \name, die vorliegende \type{} ohne Hilfe Dritter und nur mit den angegebenen Quellen und Hilfsmitteln angefertigt zu haben. Alle Stellen, die Quellen entnommen wurden, sind als solche kenntlich gemacht worden. Diese Arbeit hat in gleicher oder ähnlicher Form noch keiner Prüfungsbehörde vorgelegen. 
+  
+  Mir ist bekannt, dass im Falle eines Plagiats (§38 Abs.2 APB) ein Täuschungsversuch vorliegt, der dazu führt, dass die Arbeit mit 5,0 bewertet und damit ein Prüfungsversuch verbraucht wird. Abschlussarbeiten dürfen nur einmal wiederholt werden.
+  
+  Bei der abgegebenen \type{} stimmen die schriftliche und die zur Archivierung eingereichte elektronische Fassung überein.
+  
+  Bei einer \type{} des Fachbereichs Architektur entspricht die eingereichte elektronische Fassung dem vorgestellten Modell und den vorgelegten Plänen.
+
+\vspace{80pt}
+
+Darmstadt, den \dateOfSubmission
+\vspace{-30pt}
+\begin{flushright} 
+\hfill\tudrule[0.5\textwidth]\\
+{\footnotesize Unterschrift}
+\end{flushright}
+
+
+%%%%%%%%%%%%%%%%
+%  English translation for information purposes only:
+%%%%%%%%%%%%%%%%
+% Thesis Statement pursuant to \S{} 22 paragraph 7 of APB TU Darmstadt
+%I herewith formally declare that I, \name, have written the submitted thesis independently. I did not use any outside support except for the quoted literature and other sources mentioned in the paper. I clearly marked and separately listed all of the literature and all of the other sources which I employed when producing this academic work, either literally or in content. This thesis has not been handed in or published before in the same or similar form.
+%
+%I am aware, that in case of an attempt at deception based on plagiarism (§38 Abs. 2 APB), the thesis would be graded with 5,0 and counted as one failed examination attempt. The thesis may only be repeated once.
+%
+%In the submitted thesis the written copies and the electronic version for archiving are identical in content.
+%
+%For a thesis of the Department of Architecture, the submitted electronic version corresponds to the presented model and the submitted architectural plans.

BIN
thesis/tud/tk.pdf


+ 12 - 0
thesis/tud/tkTitle.tex

@@ -0,0 +1,12 @@
+\title{\vspace{-2.5cm}
+	\begin{wrapfigure}{r}{4cm}
+		\vspace{-0.5cm}
+		\includegraphics[scale=1.1]{tud/tk.pdf}
+	\end{wrapfigure}
+	\workTitle
+}
+\subtitle{\type{} von \name{}}
+\subsubtitle{Tag der Einreichung: \dateOfSubmission \\ \vspace{3mm} 1. Gutachter: Prof. Dr. Max M\"uhlh\"auser \\ 2. Gutachter: \betreuer \\ \vspace{3mm} Darmstadt, den \dateOfSubmission}
+  
+\institution{Fachbereich Informatik \\ Telekooperation \\ Prof. Dr. Max M\"uhlh\"auser}
+ 

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff