Rktik - A Social Network for Groups

69

description

Rktik is an online community that allows like-minded people to collect and publish content together. Rktik is set apart from similar online services by its distinct modeling of individual user and group identity. This thesis describes Rktik’s conceptualization and software architecture and how it fulfills its development goals. The first chapter motivates the project and gives an introduction to methodology and comparable products. Then a conceptual description of Rktik’s functionality is given. Following that, the technical background of implementation and operation of the service is described. The last chapter contains an evaluation and discussion of the project and its future development.

Transcript of Rktik - A Social Network for Groups

Page 1: Rktik - A Social Network for Groups
Page 2: Rktik - A Social Network for Groups

ii

My gratitude goes to Dr. Helmar Gust, Prof. Dr. Kai-Uwe Kühnberger, Dr. UweMeyer and Prof. Dr. Achim Stephan for their support of the Cognitive Networksproject and development of the related Souma and Rktik software projects. I wouldlike to thank all participants in the Cognitive Networks project, and especially Ngan-Tram Ho Dac, Leonid Berov, Atik Jamneshan and Wjatscheslaw Loev for the inspiringtime spent in this group. Advice provided by Elisabeth Mühlfeld, Pablo León Villa-grá, Larissa Heidemeyer and Javier Carrillo Milla was greatly appreciated. My specialthanks go to Anne Ahrend-Reimer and Horst Reimer for their support.

Page 3: Rktik - A Social Network for Groups

D E C L A R AT I O N

I declare that I have authored this thesis independently, that I have not used otherthan the declared sources and resources, and that I have explicitly marked all materialwhich has been quoted either literally or by content from the used sources.

Berlin, November 2015

Vincent Ahrend

Page 4: Rktik - A Social Network for Groups
Page 5: Rktik - A Social Network for Groups

C O N T E N T S

1 introduction 1

1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Problem: Privacy and Identity . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4 State of the Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4.1 Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4.2 Reddit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.4.3 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 conceptual 9

2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.2 Frontpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1.3 Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2 Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2.1 Overview: Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2.2 Reposts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2.3 Attaching Media: Percepts . . . . . . . . . . . . . . . . . . . . . 13

2.2.4 Distributing Attention: Voting and Hotness . . . . . . . . . . . 14

2.3 Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.1 User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.3.2 Personas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2.3.3 Movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2.4 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.4.1 Individual Thoughts . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.4.2 Contextual Rights Management . . . . . . . . . . . . . . . . . . 20

2.4.3 Mindspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.4.4 Blogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.4.5 Dialogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3 implementation and operation 25

3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.2 Shared Data Model: Nucleus . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.2.1 Serializable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.2.2 Nucleus Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.2.3 Modeling Data with SQLAlchemy . . . . . . . . . . . . . . . . . 31

3.3 Web Server: Glia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.3.1 Web View and URL Routing . . . . . . . . . . . . . . . . . . . . 34

3.3.2 HTML Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

v

Page 6: Rktik - A Social Network for Groups

vi contents

3.3.3 Asynchronous UI . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.3.4 Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.4 Improving Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3.5 Hosting and Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4 evaluation and discussion 41

4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4.2 Usage Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.2.1 Usage sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.2.2 Users per week . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4.2.3 Usage of features . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4.3 Movement Agency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

4.4 External Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Bibliography 53

bibliography 55

Appendix 57

.1 Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

.2 Cached Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

.2.1 Model Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

.2.2 Other Cached Values . . . . . . . . . . . . . . . . . . . . . . . . . 61

Page 7: Rktik - A Social Network for Groups

L I S T O F F I G U R E S

Figure 1 Frontpage graph visualization . . . . . . . . . . . . . . . . . . . . 11

Figure 2 Notification menu showing one unread notification about a re-ceived private message . . . . . . . . . . . . . . . . . . . . . . . . 11

Figure 3 Relation of content-related concepts . . . . . . . . . . . . . . . . 12

Figure 4 Relation of identity-related concepts . . . . . . . . . . . . . . . . 15

Figure 5 The switch menu lets users activate or create other personas . . 16

Figure 6 Reposts have two contexts, marked red in this screenshot of a re-post’s page: 1) The original thought, created in Movies Mindspace,to which this one is a reply and 2) Movies blog, the Mindspacein which this repost was placed. . . . . . . . . . . . . . . . . . . 19

Figure 7 Relation of context-related concepts . . . . . . . . . . . . . . . . 20

Figure 8 Comment tree with a depth of three replies . . . . . . . . . . . 21

Figure 9 Movement Mindspace showing thoughts sorted by hotness onthe left and the movement chat on the right . . . . . . . . . . . 22

Figure 10 Class diagram of important classes and relations in Rktik asdescribed in Section Nucleus Models. Some attributes and op-erations have been omitted for simplicity. . . . . . . . . . . . . . 27

Figure 11 Plot of threshold function for c = 1 to 100 . . . . . . . . . . . . . 29

Figure 12 Plot of threshold function for c = 100 to 10,000 . . . . . . . . . . 29

Figure 13 Schematic overview of Rktik’s most important components . . 33

Figure 14 The size of attached images is adapted to available space . . . 35

Figure 15 Desktop notification indicating a new reply on a user’s thought 37

Figure 16 Number of sessions per day . . . . . . . . . . . . . . . . . . . . . 43

Figure 17 Number of weekly users . . . . . . . . . . . . . . . . . . . . . . . 43

Figure 18 Number of users who created thoughts . . . . . . . . . . . . . . 44

Figure 19 Number of users who edited thoughts . . . . . . . . . . . . . . 45

Figure 20 Number of users who clicked the frontpage graph visualization 45

Figure 21 Number of users who followed or unfollowed blogs . . . . . . 46

Figure 22 Number of users who toggled their membership status . . . . 47

Figure 23 Number of users who loaded the notebook view . . . . . . . . . 48

Figure 24 Number of users who cast votes . . . . . . . . . . . . . . . . . . 48

vii

Page 8: Rktik - A Social Network for Groups
Page 9: Rktik - A Social Network for Groups

1I N T R O D U C T I O N

Rktik1 is an online community that allows like-minded people to collect and publishcontent together. Rktik is set apart from similar online services by its distinct modelingof individual user and group identity. This thesis describes Rktik’s conceptualizationand software architecture and how it fulfills its development goals. The first chaptermotivates the project and gives an introduction to methodology and comparable prod-ucts. Then a conceptual description of Rktik’s functionality is given. Following that,the technical background of implementation and operation of the service is described.The last chapter contains an evaluation and discussion of the project and its futuredevelopment.

1.1 motivation

Rktik is the successor to the Souma app, which started as a hobby project of VincentAhrend in 2012 and was then developed from 2013-2014 in the Cognitive Networksstudy project at University of Osnabrück (Ahrend et al., 2015). Souma’s original moti-vation was the sharing of files with groups of friends in an application with a modernuser interface that does not rely on the benevolence of central service providers. Overthe course of development however, these goals changed significantly.

The Souma project started with the aim of merging social networking functionalitywith filesharing tools. A combination of these can only be provided by a decentral-ized system due to privacy and legal reasons. The Cognitive Networks study projectdeveloped this idea further and priorities shifted to focus on the more general goalof creating a humanist reconstruction of social networks. The motivation being “the driveto create a social network by understanding human subjects and their modes of beingand interacting, and translating this into a virtual space that makes the social networkexperience more reflective and community based; less egocentric and consumptionbased” (Ahrend et al., 2015).

This shift in goals, combined with the remnants of various side projects embeddedin the app, obscured the core of the project in Souma’s code base. Therefore, afterthe end of the study project, Rktik was conceptualized as a new web-based platformbased on Souma. This process centered on a more limited focus: Developing a socialpublishing platform that implements a new concept of individual and group identity

1 Rktik is a neologism, reminiscent of the German “Arktis” and English “Arctic”. It allows for a shortdomain name (rktik.com) and its connection to the Arctic, seafaring, and related concepts offer a varietyof options for branding.

1

Page 10: Rktik - A Social Network for Groups

2 introduction

online. This concept will allow users to freely create new online identities in orderto explore their personality and also to evade the now all-encompassing surveillanceof online activities by corporations and government agencies. Sorted by priority, thegoals of this process are:

1. Bringing the application from prototype status to being ready and useful for endusers by implementing a complete feature set (completeness).

2. Selecting the smallest set of features that allows users an efficient managementof privacy and can be implemented by a single developer (feasibility).

3. Stripping out and refactoring code from the Souma project in order to create alean code base that can be maintained and extended in the future (maintainabil-ity).

1.2 problem : privacy and identity

The essential problem in managing privacy in online systems is the need of serviceproviders to directly access user data. This need exists for both, web applications, aswell as native applications2 that offload parts of their data processing to remote servers(which is the case for many native mobile applications). Companies need direct accessto user data in order to take advantage of central data processing facilities runningon web servers. Some of the advantages of web applications, as opposed to nativeapplications without a remote backend, are: 1) no software piracy, 2) more efficientmaintenance and solving of software bugs due to direct access to the running system,and 3) no need to support a wide range of (possibly low-performance) user hardware.

A further problem of web applications is that government agencies are surveillinglarge parts of online communications. While the extent to which large organizationscan access user data is not fully understood, it can be assumed that accessing unen-crypted user data on web servers presents the lowest barriers to access. Furthermore,data bound to a real person’s name is more valuable in data analysis, since it can bemore easily combined with other data sources that are referring the name. This wide-spread surveillance stands in stark contrast to the availability of accessible tools forshaping user’s online privacy and identity.

One possible approach to these problems is presented in the proposed peer-to-peer(P2P) extension of Rktik (see Section External Clients). This would use cloud infrastruc-ture for transferring data, while processing and storing data on user machines, therebymaking information inaccessible at the server-level. While this solution does not offerthe mentioned advantages of web applications, it offers a lot of value to users whoplace importance on their privacy. Due to the technical complexity of implementing apeer-to-peer protocol, a second solution to the problem was implemented.

2 Native applications are run on the user’s local machine and stand in contrast to web applications thatare run on a server and transmit their user interface as a web site.

Page 11: Rktik - A Social Network for Groups

1.3 methodology 3

The approach pursued in this thesis offers users increased control over their privacyby partially decoupling their offline identity from what they do online. This is achievedby extending the concept of pseudonymity in letting 1) a single person control mul-tiple pseudonyms and 2) letting multiple persons control a shared pseudonym. Thisfunctionality allows users to blur the mapping between their real and online identitiesand thereby reduce the value of their user data to third parties.

1.3 methodology

The Rktik application is based on the Souma prototype developed in the CognitiveNetworks study project (see Ahrend et al., 2015, pp. 95–108). In line with the goalsoutlined in Section Motivation, Rtkik’s development process included

1. Defining required functionality.2. Setting up a development environment.3. Implementing features.4. Setting up third-party infrastructure.5. Finding and removing bugs.6. Evaluation

The methodology used for developing Rktik strives to document the implementationprocess thoroughly and to help interested third parties participate in development lateron. The Github issue tracker3 is used to record tasks and eventual subtasks using abranching model based on that proposed by Driessen (2010). A Git repository, alsohosted on Github, is used to track changes to the source code. Changes are referencedfrom the issue tracker when they are connected to the resolution of an issue. UsingGit and Github helps to keep an overview of tasks and their relation to specific sourcecode changes and offers quick access to past versions of the source code.

The Rktik application is implemented in the Python programming language, us-ing the Flask framework for web applications4 and the SQLAlchemy object relationalmapper5. Additionally, some features of the user interface are implemented using thejQuery6 library. The operating environment is provided by Heroku7 in the form ofa platform-as-a-service (PAAS). A PAAS allows running a web application on provi-sioned servers without the need to configure them manually. See Section Hosting andDeployment for more details on this process.

These technological choices were taken from the Souma project.

3 Access to the issue tracker is restricted to Github accounts registered as Rktik developers. See https://github.com/features for a description of the service.

4 http://flask.pocoo.org/docs/0.10/5 https://pypi.python.org/pypi/SQLAlchemy/0.9.26 https://jquery.com/7 https://heroku.com

Page 12: Rktik - A Social Network for Groups

4 introduction

1.4 state of the art

This section describes social networks that share similarities with Rktik. It will explaintheir functionality and specifically focus on their representation of identity.

This comparison includes three social platforms with more than 100 million monthlyactive users, each of which has a bias towards a different communication structure.This includes Facebook as a social network used for communication within peer-groups,Reddit as a social network where users publish to the general public and email as amedium used for direct communication. All three services are also used for one-to-one,one-to-many and many-to-many communication.

The following subsections will explain the basic functionality of each service andcompare them to Rktik.

1.4.1 Facebook

available since February 2004

monthly active users 1.49 billion as of June 30, 2015 (Facebook, n.d.-b)website facebook.com

Facebook is an online social network that allows friends and acquaintances to keeptrack of each other’s personal lives. Facebook offers a similar core functionality asRktik in that users can publish content on their profiles, vote8 and comment on con-tent of other users, and subscribe to their content feeds. Both services center the userinterface on a feed of content from subscribed sources that is sorted based on a com-bination of recency and other factors. Facebook also allows users to create groups aseither public or private spaces. Members can communicate in a group chat or postmessages to its feed. Messages can contain events, votes and files/media9. Users mayalso communicate via private messages.

In contrast to these similarities, Facebook is different from Rktik both in policy andfeatures. It requires users to identify with their real name and explicitly forbids creat-ing more than one personal user account (Facebook, n.d.-a). User generated content onFacebook is hidden from the public by default and accessible only once a friendshipconnection to the user has been established. Facebook groups must choose to be eitherpublic or private. In contrast to Rktik, private groups cannot publish contents publiclyand groups in general cannot publish content using the identity of the group.

In addition to the core and group functionality, Facebook offers many features rang-ing from business directories to video calling. These have not been included in thiscomparison as they do not directly compare to features of Rktik.

8 Votes are called “like” on Facebook.9 Attached files must not be music or executables and their file size cannot exceed 25mb.

Page 13: Rktik - A Social Network for Groups

1.4 state of the art 5

1.4.2 Reddit

available since June 2005

monthly active users 203 million as of September 15, 2015 (Reddit, n.d.-a)website reddit.com

Reddit is a social link aggregator that lets users create link and text submissions andthen sorts them based on user votes and recency. Submissions are created in Subreddits,which are sub-communities of Reddit related to specific topics. Each submission hasa comments section in which its contents are discussed by the community. Commentscan also be voted on and are displayed in a hierarchical layout based on their reply-structure. Each subtree is sorted according to number of votes and recency. Usersof reddit collect karma by gathering votes on their own submissions and comments.Karma serves as an incentive to submit content that other users will vote on and it isdisplayed on user’s profiles as a numeric value.

In contrast to Facebook, Reddit encourages the creation of multiple accounts peruser (see Reddit, n.d.-b). However, it does not provide user interface controls for this.Every account is identified by its username, which is pseudonymous and does notnecessarily reflect the offline identity of a user.

This core functionality of Reddit is mostly identical to that of Rktik. Differencesbetween the services can be found in their implementation of user and group identityas well as the way external contents are displayed. These differences will be describedin what follows.

Users cannot directly publish content on their profile, as all submissions must beplaced in one of the Subreddits. Subreddit’s contents are visible either for the generalpublic or only for confirmed members, as decided by their founding user. In contrastto Rktik, Reddit does not allow Subreddits to aggregate content in a space visible onlyto members, while also publishing content in a public space. Neither can memberspublish content using the Subreddit’s identity for authorship.

The content on reddit.com is almost text-only. If a link submission points to animage, a small preview is displayed next to the submission’s title, while links to othercontent are never rendered inline.

Page 14: Rktik - A Social Network for Groups

6 introduction

1.4.3 Email

available since ~ 1971

10

monthly active users ~ 2.6 billion11

website none

Email is a protocol for distributing messages to one or many recipients. While Rktik,Facebook and Reddit are offered by their respective providers, Email is a protocol formessage delivery that is implemented by many service providers worldwide, whilestill allowing all users to exchange messages with each other. Email messages mayalso contain any number of media attachments.

A user of Email is identified by their email address. Some email service providers letusers choose a username for themselves, while others have policies regarding usage ofa real name or other personally identifying features, such as their role in a company.

As there is no single user interface for email, users can chose from a wide range ofsoftware clients. These can be websites, native applications, or email features embed-ded in other applications. Available features depend entirely on the client used.

Automated email lists, or email lists, allow for similar use cases as those Rktik wasdesigned for. They are distribution services that forward incoming messages, sent toa special email address, to all users registered with the email list. Registration may beopen to the general public or restricted to a group of users defined by the email listoperator. Messages sent to the email list may also be read using a web based discussionarchive.

An email list is similar to Rktik movements, Subreddits and Facebook groups inthat it provides members with a space for discussion and exchange related to a spe-cific topic. Submissions are tied to their author and — depending on the email clientused — discussion may be hierarchically organized by reply-structure as is the case inReddit and Rktik. Email does not provide a mechanism for voting on messages, so dis-cussions are sorted chronologically. Email lists also do not offer features for collectivelyauthoring content and publishing it to people outside the email list.

10 As the email protocol evolved over time from non-networked messaging protocols, there is no specificpoint in time from which on email was generally available. In 1971 the first networked electronic mailsystem for ARPANET was standardized (see Crocker, 1982).

11 It is difficult to estimate the number of people who actively use email because of the large number ofemail service providers. The market research firm Radicati estimated a number of 2.6 billion active emailusers in 2015 (Radicati & Hoang, 2011).

Page 15: Rktik - A Social Network for Groups

1.4 state of the art 7

Table 1: Overview of username restrictions and group features

Platform Username Group Features

Facebook Real name Discussion, voting, group chat, events, file sharingReddit Pseudonym DiscussionEmail Both Discussion, file sharing12

Rktik Pseudonym Discussion, group chat, publishing

In conclusion, Rktik has many similarities to existing social platforms. Establishedconcepts and functionality such as user profiles, private messaging, media attachmentsand others are extended with a novel conceptualization of personal and group iden-tity. These new features extend user’s capabilities in shaping their privacy and identity.They also may serve as a catalyst to processes defining group’s online identity. Face-book also offers extended group features but is not considering groups as an identitythat can publish content itself.

12 File sharing may be prohibited by the email list operator.

Page 16: Rktik - A Social Network for Groups
Page 17: Rktik - A Social Network for Groups

2C O N C E P T U A L

2.1 overview

Rktik is an online community where users share text, links and other media pseudony-mously in the context of topic-oriented groups and personal blogs. Contents are sortedand filtered based both on recency as well as a voting and subscription system.

This chapter will explain the user-facing functionality of the Rktik website on aconceptual level. First, general concepts are explained, introducing readers to the me-chanics of using Rktik. Subsequent sections give detailed information on how Rktikhandles content, identity and context respectively.

2.1.1 Terminology

This section gives a brief overview of terminology used in Rktik. Please see the referredsubsequent sections for more in-depth descriptions.1

Users are individual persons using the site. They may register by creating a useraccount and one or more associated personas. Hereby, they are able to create content onthe site. For details, see Section User Accounts.

All content submissions of users are attributed to their active persona, which is ascreen name that identifies them across the site. A user may create any number ofpersonas to shape their privacy, but only one of them can be active at a time.

Thoughts are short pieces of text submitted by personas and represent the smallestunit of content. For details, see Section Overview: Thoughts.

Thoughts can link to any number of percepts, which are attachments containing ei-ther more text or a hyperlink to an external resource. They are displayed alongside thethought. For details, see Section Attaching Media: Percepts.

Personas can vote on thoughts to make them more visible to other users. Everythought has a numerical hotness value, which decreases with time after posting andincreases with every vote gained. This value is used for sorting many thought listings.For details, see Section Distributing Attention: Voting and Hotness.

Mindsets are collections of thoughts. Any thought that is not a reply to anotherthought must be contained in a mindset. Every persona has a private and a publicmindset (Mindspace and blog respectively). For details, see Section Context.

Movements are groups related to a specific topic. Each has a private mindset formembers and a public mindset (blog).

1 See Figure 10 for a diagram illustrating these concepts.

9

Page 18: Rktik - A Social Network for Groups

10 conceptual

Any persona can create new movements and follow the blog of any movement orother persona. For details, see Section Movements.

2.1.2 Frontpage

Rktik’s frontpage is located at the root URL and presents users with a stream ofthoughts from their movements and followed blogs. It is similar to the Facebook NewsFeed and the Reddit frontpage in that the stream is sorted based both on the recency of asubmission and the number of votes it has received (see Section Distributing Attention:Voting and Hotness).

As unregistered users do not have any subscriptions, they are shown thoughts fromtop movements, which are the seven movements with the highest member count.

On the right-hand side of the thought stream, the frontpage also contains these otherelements:

• Frontpage graph visualization: A visual representation of all thoughts and authorson the page as a graph (see Section Frontpage Graph Visualization).

• Top Thought: When a user is logged in, this contains a short list of thoughts fromtop movements they are not following with their active persona. This allows usersto notice particularly popular submissions from contexts they would not seeotherwise.

• Discover Movements: A listing of top movements the active persona is not following.• Recent Thoughts: The most recent publicly visible thoughts submitted throughout

the whole site.

2.1.2.1 Frontpage Graph Visualization

The frontpage contains a visual representation of its contents in the form of a graph.This layout communicates the flow of information from a persona’s subscriptions totheir frontpage. It also shows some additional thoughts from these subscriptions, thatare not hot enough to be included in the frontpage. The following will describe thelayout and meaning of the graph’s elements.

The graph represents the frontpage as a big red node in the center, identities whichare followed by the active persona (content sources) as medium-sized colored nodesand thoughts as small white nodes.

Thoughts are connected to the center with a dotted edge if they are currently part ofthe frontpage feed. Thoughts are also always connected to their author’s identity witha further dotted edge. Some of the identities that are followed by the active personamay have contributed no thoughts to the current frontpage. In this case, they areconnected to the center with a faint dashed edge. Nodes representing thoughts have apulsating animation with a frequency correlated to their hotness and capped at 5 Hz.

Page 19: Rktik - A Social Network for Groups

2.1 overview 11

Figure 1: Frontpage graph visualization

In summary, the frontpage contents surround the center node as a ring of whitenodes, pulsating faster or slower according to their position in the stream. They areconnected to a second ring of nodes, which consists of movements and personas whosubmitted the thoughts. Other content sources and thoughts are located a bit furtheraway to show that they are also eligible for inclusion in the frontpage.

2.1.3 Notifications

Notifications catch the user’s attention in order to present information that is person-ally relevant. They are displayed in a drop down menu in the top left corner of everypage and some of them are also sent as email notifications.2

Figure 2: Notification menu showing one unread notification about a received private message

There are four notification types:• Reply: Sent when another user replies to one of the active user’s thoughts.

2 A user may opt out of receiving emails about notifications of a specific type. See Section User Accounts.

Page 20: Rktik - A Social Network for Groups

12 conceptual

• Mention: Sent when someone uses the @<username> syntax in a thought to notifya persona directly.

• Dialogue: Sent when a new thought is added in a private conversation.• Follower: Sent when a persona’s Blog gains new followers.

See Section Notification for implementation details.

2.2 content

This section describes how Rktik conceptualizes content submitted by users, indepen-dent of the context it appears in. See section Context for a description of the differentways in which content is presented. Figure 3 gives a graphical overview of the con-cepts presented. First, a description of thoughts, the smallest unit of content, is given.Then, Subsection Reposts describes how users can share content within Rktik. Follow-ing that, capabilities to add attachments to thoughts are detailed. Finally, votes areintroduced, which let users rate content.

Figure 3: Relation of content-related concepts

2.2.1 Overview: Thoughts

Thoughts are the basic building block for content in Rktik and roughly equivalent to apost on Facebook or submission on Reddit. They consist of a short text, limited to 300

characters, and any number of percepts (attachments). Thoughts are displayed 1) on

Page 21: Rktik - A Social Network for Groups

2.2 content 13

the frontpage, 2) as part of blogs and Mindspaces, 3) on individual thought pages or4) as part of a chat conversation (see Section Context).

The restriction on title length has been set for two reasons:1. Page layouts can be simpler. Longer titles make the usage of separate display

styles for long and short titles necessary. Implementing these increases develop-ment and maintenance time.

2. Short titles require users to be concise when formulating thoughts. In turn, theymake it easier for other users to read and understand titles.

Thoughts can be created using the create thought page or the inline thought creator.All mindsets in which the active persona has editing rights contain a link to the createthought page. The inline thought creator is embedded in comments sections and aspart of the chat widget. It allows posting text content up to the length of a thought’stitle (300 characters), but lets users switch to the create thought page without losingtheir input if they wish to continue typing. The create thought page provides separateinput fields for title and long-form text attachments.

Thoughts have a publishing state, which determines whether they are visible on thesite. Authors may always change the publishing state of their own thoughts. Depend-ing on context, other users may also have these rights (see Section Contextual RightsManagement for details).

2.2.2 Reposts

Thoughts can be reposted, which creates a copy of the original thought in a differentmindset. The repost is then attributed to the persona who created it. Reposts are alwayscreated as comments on their original, thereby notifying the original author. Users canalways see the original thought from which a repost was created in the context area ofthe repost’s page (see Section Context).

2.2.3 Attaching Media: Percepts

Thoughts may have any number of attachments to enrich their content. These are eitherrendered as part of the Rktik website or as links to other websites.

The following attachment kinds are supported:• Link: This type can be attached by embedding a URL inside the thought title or

long-form text.Links to pictures are rendered inline with the thought. Clicking the picturedisplays it enlarged in a modal gallery view. If multiple links to pictures arelinked to a single thought, the modal view allows browsing through the picturegallery using keyboard and onscreen controls. The display size of pictures isalso adapted to the size and number of image attachments (see Section HTMLTemplates).

Page 22: Rktik - A Social Network for Groups

14 conceptual

Links that point to the soundcloud.com and youtube.com domain will be renderedusing the respective embeddable HTML widgets to allow playing music andvideos without leaving the Rktik website.

• Long-form text: As thought titles are quite limited at 300 characters, the long-formtext attachment allows adding more text content. This text may be formattedusing Markdown syntax (see Gruber, 2004), which provides simple markup forbasic text formatting such as headlines, enumerations, bold and italic text.

• Mention: Mentions let authors refer other users in their submission by using the@<username> syntax. This creates a link to the mentioned user in the thoughtand sends a notification to them.

• Tag: Prefixing any word in a text submission with the ‘#’ symbol adds this termas a tag label to the thought. The tag links to a list of all other thoughts with thesame tag, thereby allowing users to link content in different areas of Rktik.

2.2.4 Distributing Attention: Voting and Hotness

Personas may vote on thoughts, thereby expressing approval of their content. Thenumber of votes is displayed next to every thought. Creating content submissions mayrequire significant time investment from users. Votes enable their engagement whenthis is too much effort. Therefore, votes may create a sense of participation even forcasual users by letting them voice their opinion without writing text submissions.

Apart from being a visible signal about the amount of approval among users, votesare also used for sorting thought listings. Depending on context, the order of listingsis either chronological (chat), reverse chronological (blog) or by their thought’s hotnessvalue, which is a combined measure of recency and number of votes (see SectionThought).

As many listings are sorted by hotness, thoughts on the top of them also tend toreceive the most attention from Rktik’s users. The total amount of attention received onall of an identity’s thoughts is estimated in their attention value, which is displayed onall persona’s pages and movement Mindspaces. It is calculated by scaling the summedhotness of all of an identity’s thoughts with a constant factor. Displaying this valuemay encourage users to submit content that will receive many votes.

2.3 identity

Popular social media sites including Google+ and Facebook have tried to push usersinto publishing content on their services using a real name. The practice proved to becontroversial with many users protesting the restrictions, and prevented people fromdecoupling their online and offline activities (Boyd, 2012).

However, even though a pseudonymous naming system prevents directly linkingoffline and online identity, such a link can be established by other means: Online

Page 23: Rktik - A Social Network for Groups

2.3 identity 15

submissions may identify their author based on the uniqueness of the content alone,or link to other online contents that allow such identification.

Rktik introduces new tools that allow users to shape their privacy. Every user maycreate multiple online identities and use them to separate areas of their online activity.Users may also join their identities by publishing under the name of a movementand thereby further obfuscate connections to their offline identity. See Figure 4 for agraphical overview. The following section will explain these concepts in detail.

Figure 4: Relation of identity-related concepts

2.3.1 User Accounts

Any user of Rktik can register a personal user account which allows them to createcontent and vote on submissions. Creating an account requires a valid email address,a password and a name and color value for the user’s first persona. The color value isused for decorative purposes in the site’s design.

The account feature serves two main purposes:1. Authorizing a user’s identity using their password and email-address. Autho-

rized users may act on the site as one of the personas connected to the useraccount.

2. Obtaining a valid email address, so that users can be sent notifications and othermessages related to their activity on the site.

User accounts also store the user’s email preferences, which allow them to disableemails of specific kind (see Section Notifications). In general, emails should be sent aslittle as possible as users may perceive them as spam if they carry insufficient personalrelevance or value.

Page 24: Rktik - A Social Network for Groups

16 conceptual

2.3.2 Personas

The personal identity of a user is partially decoupled from their physical identity:While users may choose to use their real name, they can also use one or more pseudonyms.

Some online communities allow choosing an arbitrary name for user identities,while others require their users to provide their real name (see Section State of theArt). Rktik goes a step further by not only allowing arbitrary handle names but alsoarbitrary numbers of handles, which are called personas.

Figure 5: The switch menu lets users activate or create other personas

New users create their first persona on initial signup by giving it a name and as-signing a color to mark its submissions. Following completed signup, users can createmore personas using the switch menu in the upper right corner of every screen (seeFigure 5). They can also choose to create a new persona when joining a movement.Therefore, they can keep their membership in that movement separate from activitiesin other parts of the site.

Other users cannot tell whether any two personas are linked to the same user ac-count.

This functionality affords users of Rktik more freedom in managing their onlineidentity than those of comparable social platforms. These freedoms may be used toact out different social roles or to voice unpopular opinions without fear of backlashagainst a user’s offline identity. The notion that there is not necessarily a 1:1 map-ping between offline and online identity is further established through the concepts ofcollective identity and agency as described in Section Collective Identity and Agency.

2.3.3 Movements

Movements let groups of users exchange their thoughts about a shared interest. Anyuser may create new movements by specifying a name, optional mission statementand whether the movement should be private (see Section Private Movements below).

Users access a movement by visiting either its blog or the Mindspace, which alsoincludes a chat room. Members can post thoughts to the Mindspace by using the inline

Page 25: Rktik - A Social Network for Groups

2.3 identity 17

create thought interface or posting to the movement chat. Mindspace contents are sortedby their hotness value (see Section Distributing Attention: Voting and Hotness).

2.3.3.1 Promoting Content

Movements automatically repost thoughts on their blog once they have reached acertain number of votes. The number of missing votes for promotion is indicated by aprogress bar, displayed alongside each thought in the Mindspace. This threshold valuedepends on the number of group members. Please see Section Movement for detailson its implementation.

Movements are similar to Facebook Groups, Reddit’s Subreddit feature and Emailnewsgroups. All of them distinguish between private and public groups as Rktik does;however, they do not allow group members to collectively decide on publishing con-tent or to attribute authorship to the group’s collective identity.

2.3.3.2 Private Movements

When creating a new movement, a user may choose to make it private, which hides themovement Mindspace from non-members and only allows users with a valid invitationcode to enter the movement.

Movement members can send invitation codes by either entering the email addressesof invitees or by copying a URL with an embedded invitation code and sending thisto the invitee (e.g. using a messenger application).

The blog page of private movements links to the movement founder’s page, so thatusers interested in joining may contact them to ask for an invitation.

2.3.3.3 Collective Identity and Agency

Groups in online social networks communicate their identity through the contents theypublish and markers in the group’s online representation (group name, picture, colorscheme). Rktik furthers this concept by communicating not just a movement’s identitybut also its agency. The sense that a movement can think and act is established through1) terminology in the user interface that suggests a shared mind and 2) features thatlet members use this shared mind to act collectively.

Language used in the context of movements implies that members have a sharedmind: A movement’s space for internal discussion is called Mindspace and users placecontents in it by creating thoughts. This terminology implies that members control ashared mental space that they use to exchange thoughts. This notion is even strongerin private movements, where only members can read thoughts in the Mindspace.

A movement’s agency is implied in the functionality of the movement blog. Its con-tents are not decided on by a designated member of the movement, but collectively byvoting in the Mindspace. Resulting decisions are then attributed to the movement as

Page 26: Rktik - A Social Network for Groups

18 conceptual

a whole. See Section Movement Agency for possibilities of further development of theconcept of movement agency.

Establishing collective identity and agency guards user’s privacy by obfuscatingtheir personal identity and may also strengthen cohesion between movement members,which may lead to more collaborative behavior in movements.

2.4 context

Every thought is linked to the context in which it was created. This can either bethe mindset in which a thought is submitted or another thought, in the case of replies.Reposts have both kinds of contexts as they are both created as replies on their originalthought and placed directly in a mindset, thereby linking discussion in two separateareas of Rktik.

Mindsets are collections of thoughts, owned by identities. There are three differentkinds of mindsets for 1) internal thoughts of an identity (Mindspace), 2) its publishedthoughts (blog), and 3) private conversation (dialogue). Each of them is rendered witha particular layout and functionality.

The remainder of this section shows how communication happens in the context ofa single thought, as well as in mindsets. Then, the differences between the three kindsof mindsets are explained through their requirements, tasks and conceptual design.See Figure 7 for a graphical overview.

2.4.1 Individual Thoughts

Every thought in Rktik has its own page that collects all information related to thethought. This includes its text content and percepts as well as the thought’s context,metadata and replies. Replies also include reposts of the thought into other contexts(see Section Promoting Content).

Displaying replies to a thought in a non-hierarchical/flat listing can make it harderfor readers to follow the exchange as replies regarding different aspects of the originalthought may be interweaved in the listing. Rktik solves this problem by using a hierar-chical display: Direct replies to the original thought are aligned on the left-hand sideof the screen with subsequent replies indented to the right. Further, every subsequentsubtree of the discussion is sorted by hotness (see Figure 8).

For performance reasons, the reaction tree depth is limited to three levels. If a re-action is located in a mindset different from that of the original thought, reactionslocated in the other context are also included up to a total depth of three levels.

If the original thought was created as a reply itself, the page also contains its parentthoughts. The thought’s author may define from 0-10 levels, how deep the reply chainis recursed upwards for this purpose by setting the context-depth setting on the right

Page 27: Rktik - A Social Network for Groups

2.4 context 19

Figure 6: Reposts have two contexts, marked red in this screenshot of a repost’s page: 1) Theoriginal thought, created in Movies Mindspace, to which this one is a reply and 2)Movies blog, the Mindspace in which this repost was placed.

Page 28: Rktik - A Social Network for Groups

20 conceptual

Figure 7: Relation of context-related concepts

Mindset Creating Updating DeletingPersonal Mindspace Owner

Personal Blog Owner

Movement Mindspace Members Author, admin

Movement Blog Automatic Admin

Dialogue Members Author

Table 2: Rights Management for Mindsets

side of a thought’s page. Setting it to zero hides the thought’s context from other usersand removes it from the discussion pages of these ancestors (see Figure 6).

2.4.2 Contextual Rights Management

Depending on their context, a different set of identities is authorized to create, edit anddelete thoughts. See Table 2 for detailed information about which users are authorizedfor which actions.

Page 29: Rktik - A Social Network for Groups

2.4 context 21

Figure 8: Comment tree with a depth of three replies

Page 30: Rktik - A Social Network for Groups

22 conceptual

2.4.3 Mindspaces

Mindspaces are the first of three kinds of mindsets. They collect internal thoughts ofan identity as opposed to thoughts published on a blog which is intended for a publicaudience. Personas and movements are both identities in Rktik and therefore havetheir own Mindspaces. The differences between personal and collective Mindspacesare described in what follows.

Persona MindspaceEvery persona has access to their private Mindspace in which only they can read

and write. This makes it a space for collecting thoughts before deciding on whether ornot, or in which context, to publish them. The Mindspace of a persona is also referredto as the persona’s notebook to make it easier for new users to understand how theycan use this feature.

Apart from creating thoughts directly in this mindset, users may also use the repostinterface (see Section Reposts) to copy thoughts from anywhere on the site into theirnotebook.

Movement Mindspace

Figure 9: Movement Mindspace showing thoughts sorted by hotness on the left and the move-ment chat on the right

The movement Mindspace is the primary interface for movement members (seeFigure 9). This space is facilitating discussion and exchange between them and serving

Page 31: Rktik - A Social Network for Groups

2.4 context 23

as a staging area for content that might be posted to the movement’s blog. It shouldtherefore both provide an overview of the most interesting content recently postedand provide members with a way to communicate directly and immediately. To fulfillthese requirements, the layout displays thoughts both as a listing sorted by hotness onthe left as well as using a chat widget on the right.

While the chat is an automatically updating view of the most recent thoughts, thelisting changes more slowly. As the hotness ranking is based on recency and numberof votes, it is akin to a rolling top-list of the currently most interesting thoughts. Thelisting view also excludes all thoughts with zero votes to exclude negligible chat mes-sages These thoughts can collect more votes in the listing view until they reach thethreshold for promotion to the movement’s blog (see Section Promoting Content).

2.4.3.1 Chat

The chat should provide members with a sense of direct and immediate participationin the movement. It provides an automatically updating, chronological listing of allevents related to the movement, including all thoughts submitted to the movementMindspace and thumbnails of media attachments.

This allows for a different mode of communication from the listing view and threadeddiscussion. The immediate transmission of messages allows the use of language witha conversational tone and creates the sense of a more direct exchange between partici-pants.

Replies to any thought in the movement Mindspace are also displayed in the chat.They are marked as replies and provide a hyperlink to their context. This allows mem-bers watching the chat to directly start participating in these discussions.

An inline form UI below the chat message listing allows users to send thoughts tothe Mindspace/chat. Submitting the form clears the input without reloading the page,so that the user can enter another message immediately. Above the input, a help text in-forms the user about the privacy of messages entered, which is dependent on whetherthe corresponding movement is private or not (see Section Private Movements).

2.4.4 Blogs

Blogs are mindsets for sharing thoughts with a wider audience and are sorted inreverse chronological order. Any persona can follow any blog, which places the blog’scontents in the pool of thoughts eligible for that persona’s frontpage.

Personas can directly post new thoughts to their personal blog, while movementmembers can only indirectly place content in their blog by voting (see Section Promot-ing Content).

Page 32: Rktik - A Social Network for Groups

24 conceptual

2.4.5 Dialogue

While Mindspaces allow exchange between many users, and blogs allow broadcastingto many users, the dialogue mindset models a conversation with just two participants.Users can start such a private conversation by visiting another persona’s profile page.Messages in it can be reposted freely between a dialogue and any other mindset.

Apart from the different privacy setting, a dialogue provides the same affordancesand is rendered using the same UI widget as the chat module in movement Mindspaces(see Section Chat).

Table 3: Context in Rktik

Context Visible for

Blog EveryoneMindspace (persona) Only authorMindspace (private movement) MembersMindspace (public movement) EveryoneDialogue ParticipantsReply Determined by the original thought

Page 33: Rktik - A Social Network for Groups

3I M P L E M E N TAT I O N A N D O P E R AT I O N

3.1 overview

This chapter contains technical information about the implementation and operationof the Rktik service.

The chapter starts with a section on the shared data model Nucleus. Following is asection on the Glia web server. Finally, it gives descriptions of performance improve-ments and the details of deployment and operation of Rktik in a hosted environment.

Portions of this chapter that refer to source code either point at the relevant filepath, relative to the Glia or Nucleus project root folders, or use Python’s dot notation,where glia.web.helpers refers to a file helpers.py in the folder glia/web/. Javascriptdefinitions can be found in the file glia/static/js/main.js contained in the Gliaproject unless specified otherwise. The source code for Rktik is available at https://github.com/ciex/glia and https://github.com/ciex/nucleus.

3.2 shared data model : nucleus

The Nucleus package1 provides data persistence2 and defines methods for data pro-cessing directly related to the data models. It is implemented as a Python package thatis imported from the main application Glia.

Nucleus uses the SQLAlchemy Object Relational Mapper (ORM)34 with the Flaskextension Flask-SQLAlchemy5 to connect model definitions to a persistent databasebackend. The package furthermore provides a direct database connection, used inGlia to bypass the ORM, as well as a connection to the in-memory cache Memcached.67

The Nucleus package was originally created because Rktik’s predecessor Soumawas planned as a semi-decentralized service: Users could have chosen between ac-cessing Rktik with a native client application that uses a centralized server for the

1 Git project with source code available at https://github.com/ciex/nucleus2 Data persistence is achieved when interrupting the application’s process, e.g. by restarting the Rktik

server, does not result in loss of data.3 An object relational mapper is used in object-oriented programming languages to translate implicitly

between incompatible data structures, such as those used within the Python programming language anda database management system.

4 https://pypi.python.org/pypi/SQLAlchemy/0.9.25 https://pypi.python.org/pypi/Flask-SQLAlchemy/1.06 Memcached uses a hash-table, stored in one or more machine’s RAM, to provide an extensible and fast

system for key-value lookup.7 http://memcached.org/

25

Page 34: Rktik - A Social Network for Groups

26 implementation and operation

transfer of (encrypted) data and solely using Rktik via its website, without installingan application on their computers. Due to this original plan, model definitions weredecoupled from the rest of the application to allow for the easy implementation ofclient and server applications using this codebase. An extension of Rktik into a semi-decentralized service is outlined in Section External Clients.

The following subsections will describe the components of the Nucleus package,namely the Serializable module and ORM models. The last subsection will give generalinformation about database development using the SQLAlchemy ORM.

3.2.1 Serializable

The Serializable module primarily provides serialization capabilities to ORM modelsthat inherit from it. This functionality is not in the scope of this thesis, but part ofthe planned P2P extension (see Section External Clients). As the module also enablesaccess rights management, it is included in the codebase submitted along with thisthesis and the relevant functionality is outlined in the following.

Serializable instances provide a method authorize that validates whether a givenuser may execute a specific action on it. An action may be creating, updating or delet-ing specific data stored in the instance, such as a persona’s username or a thought’stitle. Every model that inherits from Serializable can define its own handling ofuser rights by overriding this method. See Section Contextual Rights Management fordetailed information on which users are allowed to make changes to which objects.

3.2.2 Nucleus Models

The module nucleus.models contains class definitions of all ORM models. See Figure10 for an overview of the models. This section gives an overview of their propertiesand responsibilities with respect to the functionality described in the conceptual chap-ter. Additional capabilities that are not directly related to features described in PartConceptual are omitted for brevity.

3.2.2.1 User

The User model represents a registered user. It has relations to personas of this userand stores metadata such as the user ID, account creation date, email and passwordhash. The User class can also verify user’s email addresses and store the validationstate of the user account.

Page 35: Rktik - A Social Network for Groups

3.2 shared data model : nucleus 27

Figure 10: Class diagram of important classes and relations in Rktik as described in SectionNucleus Models. Some attributes and operations have been omitted for simplicity.

Page 36: Rktik - A Social Network for Groups

28 implementation and operation

3.2.2.2 Identity

The Identity class is a superclass for Persona and Movement. Apart from basic infor-mation such as username, user color, creation and modification timestamps, the modelhas relations to the blog and Mindspace associated with each instance.

3.2.2.3 Persona

The Persona class represents personal identities of users. Each User instance may beconnected to many Persona instances.Persona instances provide methods for toggling their membership in movements,

as well as following and unfollowing blogs. They also offer cached access to someinformation related to personas, as described in Section Improving Performance.

3.2.2.4 Movement

The Movement class inherits from the Identity class just as Persona and thereby pro-vides all its attributes and methods. Its instances also store the movement’s mission,whether the movement is private and provide relations to the movement’s admin(founder) and to movement members via the MovementMemberAssociation class.

When votes are cast in a movement Mindspace, the movement’s promotion_check

method is called. This method reposts the voted thought to the movement blog ifthe total number of votes passes a threshold. Given the number of members (c) thethreshold value (t) is defined as:

t =

(round( c

100 +0.8c + log1.65c) , for c > 0

1 , otherwise

For a small movement a low number of votes is required, thus creating lots of con-tent on the blog. Larger movements need more votes relative to their user count, sothat only the best thoughts are posted to the blog. As the threshold function is basedon intuition, it might be necessary to adjust it in the future. See Figures 11 and 12 forplots of the function.

Movement Member AssociationThe members relation is using the association object pattern to store additional meta-

data about the membership. This pattern uses an additional database table for repre-senting relations between two entity classes. In this table the following information isstored about every membership:

• active: Inactive memberships are used to represent former members and forinvitations.

• created, modified: Timestamps for creation and last modification of the mem-bership.

Page 37: Rktik - A Social Network for Groups

3.2 shared data model : nucleus 29

Figure 11: Plot of threshold function for c= 1 to 100

Figure 12: Plot of threshold function for c= 100 to 10,000

• role: The member’s role in the movement (currently one of “member” and “ad-min”).

• last_seen: Time when the persona was last present in the movement chat.• invitation_code: MovememtMemberAssociation instances that represent move-

ment invitations store an invitation code used to authenticate the invited user.

3.2.2.5 Mindset

This model represents a set of thoughts and is a superclass of Mindspace, Blog andDialogue.

• Mindspace models internal thoughts of an identity.• Blog models a blog publication.• Dialogue models a conversation between two identities. The dialogue model

has an additional relation to personas representing the “other” of a conversa-tion. As the author and other attribute can be filled interchangeably, retrieval ofthe dialogue between two given personas is not possible with a simple lookupby. Therefore, a get_chat class method is provided that probes the two lookuppossibilities and returns a new dialogue instance if both are unsuccessful.

3.2.2.6 Thought

The Thought model represents content submissions. Each instance stores the title textand metadata of the thought. All other media related to the thought is contained inlinked Percept objects. Thoughts also store the context they were posted in, which iseither a parent thought or a mindset.

The thought class has a class method to generate instances of itself directly fromuser’s text input. This process includes:

• Detecting embedded URLs and validating whether they refer to a valid HTTPresource.

• Creating Percept objects for any detected attachments.

Page 38: Rktik - A Social Network for Groups

30 implementation and operation

• Relaying notifications triggered by the creation of new thought and percept in-stances.

• Invalidating caches touched by the new thought.Thoughts also have a relation to their votes and helper methods for accessing infor-

mation about these votes (e.g. whether a given user has voted or the total amount ofvotes). This also includes a method to return the hotness value of a thought.

Hotness is a numerical value that depends on the recency of a thought and thenumber of votes it has received. Accordingly, hotness values are higher for more recentthoughts or thoughts with more votes. Thoughts with equal numbers of votes areeffectively sorted in reverse chronological order, while each additional vote pushes thethought upward in the ordering.

Given the number of votes (v) and the number of hours since the thought wascreated (t), a thought’s hotness is defined as:

hot =v

(t + 2)1.5

This algorithm is adapted from the sorting algorithm used in the social bookmarkingsite Hacker News8 (see Salihefendic, 2010).

3.2.2.7 Upvote

The Upvote model inherits from Thought. Its instances represent votes cast by personas.This relation is represented by an Upvote instance referring to the voted thought as itsparent. The model is called “Upvote” instead of “Vote”, as the Souma project consid-ered implementing both positive and negative votes.

3.2.2.8 Percept

The Percept model represents attachments on thoughts. It is used as an abstract classwith following subclasses:

• LinkPercept, LinkedPicturePercept: Store a URL link, which is rendered inlinein case of the LinkedPicturePercept.

• TextPercept: Stores longer text.• MentionPercept: Stores a relation to the linked user and the text used to refer to

them (which might be different if the mentioned persona changes their usernameafter being mentioned)

• TagPercept: Store a relation to an instance of the Tag model (see Section Tag).Percepts are linked to a thought with the association object pattern. The PerceptAssociation

class stores the association’s author in addition to its thought and percept. The associ-ation’s author is usually identical with the thought author, but movement admins alsohave the right to edit thoughts posted to their movement’s blog.

8 https://news.ycombinator.com/

Page 39: Rktik - A Social Network for Groups

3.2 shared data model : nucleus 31

3.2.2.9 Tag

The Tag model represents labels attached to thoughts. Tags can be created by addingthe hash character ‘#’ as a prefix to any word in the thought title or text. Taggedthoughts do not have a direct relation to a tag instance, but use the TagPercept

model as an association object. This allows global renaming of tags without modifyingdatabase entries for all thoughts that have this tag.

3.2.2.10 Notification

Notifications represent direct messages to a user that are generated automaticallywhen events require their attention. The Notification base class stores metadata suchas the notification’s text, URL, whether it has been read and its recipient. Subclassesrepresent specific kinds of notifications:

• MentionNotification: Sent when a persona is mentioned using the @<persona>syntax.

• ReplyNotification: Sent when a persona receives a reply.• DialogueNotification: Sent for new messages in a private conversation between

two Personas.• FollowerNotification: Sent when a blog gains new followers.

3.2.3 Modeling Data with SQLAlchemy

SQLAlchemy allows the implicit specification of database schemas through definingthe Python classes that the database ought to model. It maps user-defined Pythonclasses to database tables and instances of these classes to rows in the tables. Changesto instances are synchronized with database contents and queries for retrieving datacan be formulated in an object oriented expression language. This has the followingadvantags: 1) developers can modify the database schema without having to learn aquery language specific to the connected database backend, 2) the database backendcan be swapped out with minimal changes to the models, and 3) all code related tothe ORM models resides in one place, thereby limiting code fragmentation.

Reducing the complexity of database access is appropriate for straightforward usecases but can lead to inefficiencies in more complex scenarios, such as those cre-ated by relations spanning multiple database tables. As SQLAlchemy does not nec-essarily translate a given command into the most effective query, many of them canbe optimized with some knowledge of how the underlying database is used. TheSQLAlchemy library provides an tools for implementing these optimizations.

Rktik uses the Alembic library9 to record schema changes and migrate the databaselayout. Schema migrations are automatically executed on the server by the deploymentscript (see Section Hosting and Deployment).

9 https://pypi.python.org/pypi/alembic/0.7.5.post2

Page 40: Rktik - A Social Network for Groups

32 implementation and operation

When model definitions are changed during production use, it is not sufficient torecreate the database using the new schema, as old data may have to be migrated.In this case migration scripts have to be manually written in accordances with thechanges. These are stored in the glia/migrations_extra directory for one-time execu-tion on the server.

3.3 web server : glia

The Glia web server is a Python package based on the Flask web framework andresponsible for:

• Serving HTTP requests by collecting and computing contents of the user inter-face.

• Serving asynchronous UI updates (see Section Asynchronous UI).• Va lidating, storing and modifying information submitted by users.• Automatically performing maintenance operations• Scheduling email delivery.

These tasks are handled by a number of modules listed in what follows. Please referto Figure 13 for a graphical overview.

• Views are functions mapped to URL patterns and compute their contents whenaccessed by a user.

• Websocket events and asynchronous views are special views used for asynchronouscommunication with a web browser.

• Forms validate restraints on structured user input.• HTML Templates are used to map data into a graphical layout to be rendered by

a browser.• Configuration files• Database migration scripts• Static files including images, CSS stylesheets, Javascript resources, etc.

Session ManagementSession management is responsible for storing information about which user is

logged in on which browser. Rktik uses the Flask-Login extension10 to provide mostof this functionality.

Users can login using their email and password, which will let Flask-Login store acookie in their browser recording the logged-in state.

10 https://pypi.python.org/pypi/Flask-Login/0.2.11

Page 41: Rktik - A Social Network for Groups

3.3 web server : glia 33

Figure 13: Schematic overview of Rktik’s most important components

Page 42: Rktik - A Social Network for Groups

34 implementation and operation

3.3.1 Web View and URL Routing

Views are functions that return HTML content given an HTTP request. They aremapped to URLs, which can be accessed by users through a web browser. The map-pings are established using routes, which are Python decorators defined by Flask Ifan HTTP request matches against the string pattern defined by a route, the request isserved the return value of the associated function. Some views are redirect views thatdo not return a web page but redirect to a different URL.

Views access HTML templates, form definitions, external web services and the Nu-cleus backend to compile all required data. Please see Section Views for a full list ofall implemented views.

3.3.2 HTML Templates

Templates allow separation of content and layout in the application backend andthereby lead to more readable code. Rktik uses the Jinja2 template engine11 includedwith Flask. Layout definitions are written in HTML and additional markup that de-fines where content is inserted. View functions collect all information necessary for agiven web page and then pass this information as parameters to a template.

Jinja2 provides almost all required functionality with missing features made avail-able through extensions: Rktik uses the humanize package12 for converting date andtime data into a human readable format.13 Additionally, a number of custom filtersare used in templates.

• The mentions filter is applied to a thought’s text. It uses information from itsmention percepts (see Section Nucleus Models) to replace occurrences of thepattern @\<persona\> with a link to the respective persona’s page

• The gallery_col_width filter is used to scale image attachments depending on theirnumber. The largest size is used when only one image is attached. A successivelysmaller image size is used up to four image attachments. If more than four im-ages are attached, they are split into rows fitting four images each. See Figure 14

for an example of image scaling.• The sort_hot filter is used to apply the hot ranking to lists of thoughts• The authorize filter replaces thought contents with a placeholder if the thought is

not visible to the active persona (see Section Serializable).

11 https://pypi.python.org/pypi/Jinja2/2.812 https://pypi.python.org/pypi/humanize/0.513 As an example, instead of displaying 2015-10-01T15:42:23.254966+00:00 as a thought’s creation time,

the relative form two hours ago is used.

Page 43: Rktik - A Social Network for Groups

3.3 web server : glia 35

Figure 14: The size of attached images is adapted to available space

Page 44: Rktik - A Social Network for Groups

36 implementation and operation

3.3.3 Asynchronous UI

Most of Rktik’s content is sent as a complete web page to the user’s browser. Whenan interaction requires only part of the website to be changed, site responsiveness isincreased by using asynchronous communication with the server. This functionality isimplemented using the jQuery Javascript library14 for one-off asynchronous updatesand the websockets browser technology for continuous streams of updates. This sectiondescribes the implementation of these two features.

The websockets technology provides a socket connection between the browser andthe Glia server that is open until the browser window is closed. All thoughts andvotes in a movement Mindspace are immediately relayed through websockets to allbrowser windows that also show part of the movement. Messages received on theclient side are inserted into the chat widget. If a browser window shows an individualthought’s page, new comments are inserted at the appropriate place in the hierarchicalcomments view.

This channel is also used for transmitting reposts and desktop notifications (see Sec-tion Notifications). Server side handlers for websockets are located in the glia.web.eventsmodule, while client side handlers are located in the static file glia/static/js/main.js.

Other asynchronous calls are handled using jQuery based javascript functions. Thisincludes:

• Loading more chat contents.15

• Changing a movement’s mission description• Changing a persona’s username• Changing the amount of context, previous thoughts in the reply-tree, displayed

on a thought page. Thoughts that are no replies only display their mindset ascontext.

• Following and unfollowing blogs• Toggling membership in a movement

The server side handlers for this functionality are located in the glia.web.async

module, while the client side handlers are located in the glia/static/js/main.js

script.

3.3.4 Notifications

Notifications are system messages for individual users. They inform them about repliesto their thoughts and other relevant messages. Users receive them as desktop notifica-tions and/or as email messages. Email messages provide the further advantage thatthey reach users who are not visiting the site regularly.

14 https://jquery.com/15 The chat window initially loads the most recent 50 messages. A button at the top of these triggers loading

another 50

Page 45: Rktik - A Social Network for Groups

3.4 improving performance 37

Figure 15: Desktop notification indicating a new reply on a user’s thought

Desktop notifications are displayed using the PNotify library16, which can insertnotifications as HTML elements in web pages or as operating system specific nativeUI elements outside the browser window17. When users first visit the Rktik website,they are prompted to allow displaying web notifications. HTML based notificationsare used as a fallback if this request is denied. Desktop notifications are relayed to thebrowser using Websockets. The javascript functions used to implement notificationsare located in the glia/static/js/main.js script.

Email notifications are sent using the SendGrid email delivery service18. Using thisservice ensures that users receive emails reliably. While an email implementation inte-grated with Rktik would be technically feasible, this approach may result in messagescaught in spam filters of users’ email providers. This functionality is implemented inthe glia.web.helpers module.

Users may opt out of email delivery entirely or set up specific rules for the kind ofemails they want to receive. These settings can be made in the notifications view thatis linked from the notifications drop-down and from the footer section of all emailssent by Rktik.

3.4 improving performance

User satisfaction is related to a web site’s performance (see NIELSEN, 2012). As thecomplex page layouts and hotness sorting used in Rktik require significant server re-

16 http://sciactive.github.io/pnotify/17 PNotify creates desktop notifications as specified in the W3C recommendation Web Notifications (see W3C,

n.d.)18 https://sendgrid.com/

Page 46: Rktik - A Social Network for Groups

38 implementation and operation

sources, keeping performance at a satisfactory level is hard. As the development pro-cess did not define performance as a primary objective (see Section Methodology), thenecessary adjustments are even more difficult to make. Still, it was possible to increaseperformance at the end of the development process by using Memcached to reusecomputed results and optimizing database queries.

CachingMemcached is an in-memory key value store that is used in Rktik to hold computed

results for fast access. Entries persist until their values are overwritten, their expirydate is reached or they are deleted when available memory is not sufficient for newentries. Rktik uses the Flask-Cache library to access Memcached.19 Caching is used ifresults 1) are changing slowly20 , 2) are expected to be reusable in the near future, and3) can be reliably invalidated once they change.

Cached data is invalidated by processes that change their contents. See SectionCached Information for a list of cached functions and the processes that trigger theirinvalidation. Entries are automatically invalidated after a set amount of time.

Database Query OptimizationThe SQLAlchemy library hides the complexity of accessing data stored across multi-

ple database tables. While this eases the development process significantly, it can leadto inefficient patterns of database usage. Specifically, the number of queries issued cangrow to be in a linear relation to the number of items retrieved. Often, such requestscan be combined into a single query or a low number of queries by using eager load-ing techniques offered by SQLAlchemy (SQLAlchemy Autors (n.d.)). Here, an SQLJOIN statement is issued to simultaneously load related data from the database. Rktikimplements eager loading for specific queries, using the SQLAlchemy joinedload op-tion, and for some model properties by specifying the option as a parameter in theirdefinition.

3.5 hosting and deployment

Rktik is running on servers provided by the Heroku platform-as-a-service21 (PAAS). Incontrast to traditional server environments, which need to be manually configured forthe services to be deployed, a PAAS offers tools that automate many of these tasks. Thisincludes deployment from a Git repository, automatic installation of dependencies, aweb interface for installation and semi-automatic configuration of third-party services(e.g. email delivery, Memcached, log analysis, etc.) as well as simple and fast scalingof server resources in the event of rising visitor traffic.

19 https://pypi.python.org/pypi/Flask-Cache/0.13.120 As an example, the frontpage graph structure is cached for one hour per persona as the frontpage changes

slowly and omissions in the graph are not considered critical.21 https://www.heroku.com

Page 47: Rktik - A Social Network for Groups

3.5 hosting and deployment 39

These capabilities allow developers to focus on programming instead of the time-consuming configuration and maintenance of a server environment. The downside ofusing Heroku is that their services come at a comparatively high price. This is miti-gated they are offering a free option for applications that require only little resources,as is the case for Rktik right now. However, if Rktik grows larger, it might becomenecessary to move to a different hosting environment that offers a better cost-benefitratio.

Rktik is installed in two separate Heroku environments for testing and productionuse. The development process consists of implementing a new feature on a local de-velopment machine, verifying compatibility with the Heroku setup in the testing en-vironment and only then deploying it to the production environment (see SectionMethodology). The production environment has been accessible to the general publicsince July 26th 2015.

Deployment is automated using the scripts push_testing.py and push_production.py

in the source code’s root folder. These scripts execute all tasks necessary for deploy-ment, which includes:

1. Verifying that all changes to the Nucleus repository are committed in Git2. Pushing the Nucleus repository to Github3. Checking that all changes to the Glia repository are committed in Git4. Pushing the Glia repository to the appropriate environment on Heroku. This step

triggers the Heroku environment to automatically install all required dependen-cies.22

5. Running database migration scripts in the remote environmentRktik uses environment variables to determine in which environment it is currently

running and to load an appropriate configuration. Configurations differ in the pass-words, secrets and external services they specify, as well as the internet hostname theyset up for Rktik. Sensitive information, such as passwords, is not stored in the sourcecode, but loaded either from access-controlled external files or environment variables.

The development and testing configurations also have higher verbosity of log mes-sages and provide interactive debugging in two ways: 1) a debugging console andinteractive traceback embedded in Flask’s response for failed requests and 2) the FlaskDebugToolbar23, which provides an interface for performance measurement, variableintrospection and other information as an optional web overlay for successful requests.

Logging messages above the debug severity level are forwarded to a channel in theSlack web service,24 which is not visible to the public. This allows monitoring of errorsfrom a mobile phone or any computer with an internet connection.

22 Dependencies are defined in the file requirements.txt in the Glia project root folder23 https://flask-debugtoolbar.readthedocs.org/en/latest/24 https://slack.com, Slack provides chat rooms which can be integrated with external web services

Page 48: Rktik - A Social Network for Groups
Page 49: Rktik - A Social Network for Groups

4E VA L U AT I O N A N D D I S C U S S I O N

This chapter critically reflects on how Rktik measures up to expectations set at theonset of its implementation and underlines these findings with quantitative usage met-rics. The first section gives an overview of achievements and problems in the currentimplementation. Following that, quantitative usage measurements give an overview ofthe distribution of user engagement. The next section gives suggestions for extendingfunctionality that ascribes and may create movement agency. Finally, the proposed P2Pextension of Rktik is outlined.

4.1 overview

The goals of completeness, feasibility and maintainability, as defined in Section Method-ology, have been achieved to a satisfactory degree by the implementation describedin this thesis. Development of the features necessary for publishing and discussing con-tent using personas and movements have been built, and an appropriate environmentfor the operation of Rktik has been configured for end-users. While these initial goalsare important, other aspects of Rktik have shown shortcomings in the course of de-velopment and testing. In the following, three areas of potential improvement arehighlighted and possible solutions are proposed:

1. Some of the concepts used in Rktik, such as the distinction between a privateMindspace and a public blog or the concept of movements, are hard to under-stand for new users. This problem should be approached by implementing aninteractive tutorial that explains core mechanics and concepts. This should beconceived for both newly registered and interested, but unregistered users. Thetutorial may also prompt users regarding their choices regarding desktop andemail notifications.

2. As described in Section Improving Performance, the site’s speed is still too lowfor web user’s expectations. This can be improved by setting up periodicallyrunning background processes that precompute database queries and store themin Memcached. Site performance could also be improved significantly by movingRktik to more powerful servers, which however increases operating costs.

3. Rktik features interesting content that is regularly updated. Users who signedup for an account but do not visit the site regularly may have an interest in thesecontents but never see it. They could benefit from a periodic email newsletterthat features the most interesting content on Rktik as measured by votes.

41

Page 50: Rktik - A Social Network for Groups

42 evaluation and discussion

4.2 usage metrics

Usage metrics have been collected anonymously using the Amplitude1 and GoogleAnalytics2 services. These are external services which receive usage data via shortJavascript scripts embedded in every served page. While Google Analytics tracks pagerequests, Amplitude tracks specific, manually defined events in a user’s interactionwith the site.

Google Analytics data is included since making rktik.com accessible to the publicon July 26, 2015 until October 2, 2015. Amplitude data is included from August 8,2015 until October 2, 2015. This difference exists because I did not know about theAmplitude service when Rktik was first released publicly.

Google Analytics and Amplitude collect extensive amounts of information. As acomplete analysis of the data would go beyond the scope of this thesis, four kinds ofmeasurement are highlighted: 1) The total number of usage sessions, 2) the numberof users per week, 3) the number of users who have used specific features in a givenweek, and 4) the number of thoughts and votes created. These metrics reflect the totalamount of usage as well as the relative popularity of specific features.

For the purpose of this evaluation, a user is defined as a web browser used to accessRktik. In contrast to the definition given in Section Terminology, this does not discrim-inate between users with a user account and anonymous users. While it is possiblethat a person uses more than one web browser to access Rktik, this is not reflectedin measurements for technical reasons. Usage assessment relies on Javascript scriptsembedded in the website. If a user blocks these scripts or disables all of Javascript,their usage is not recorded.

4.2.1 Usage sessions

The number of sessions was assessed using Google Analytics. A session is definedas a group of interactions between a user and the website that takes place within 30

minutes or until midnight (Google, n.d.). A total of 825 sessions were started, mostof which took place in the first weeks of operation (see Figure 16). The number ofsessions following the first two weeks of operation may have been higher if Rktikhad been promoted more extensively. However, promotion was postponed due to thecurrently high access times described in Section Improving Performance, which wouldincrease further with more users.

1 Amplitude website2 Google Analytics website

Page 51: Rktik - A Social Network for Groups

4.2 usage metrics 43

Figure 16: Number of sessions per day

4.2.2 Users per week

The number of users per week was assessed using Amplitude (see Figure 17). Thecount rises from two users in the first week of measurement to seven users in the thirdand fourth week. It takes a plunge to three users and then rises from week to week upto a maximum of 17 users in the 9th week of operation.

Figure 17: Number of weekly users

4.2.3 Usage of features

The number of users who have accessed specific features at least once in a givenweek was assessed using Amplitude. A count was recorded when a user triggeredthe user interface control associated with the measured action. In the following I list

Page 52: Rktik - A Social Network for Groups

44 evaluation and discussion

the assessed metrics, name the events used to measure them and describe resultingmeasurement data.

4.2.3.1 Creating a thought

Evaluated: 1) submitting the inline form for creating a thought 2) submitting the formon the dedicated create thought view

Figure 18: Number of users who created thoughts

The number of users who created thoughts in a given week varied between one andthree (see Figure 18). The maximum number of three users was first reached in thefourth week of measurement stayed at this level following a drop for two weeks. Onlya small amount of total users registered an account on Rktik. Out of those registeredusers, only a small amount actively created content.

4.2.3.2 Editing a thought

Evaluated: Submitting the form for editing a thought in the edit thought view.The number of users who edited thoughts in a given week varied between zero and

two (see Figure 19). Unexpectedly, this number is equal or just slightly lower than thenumber of users who created thoughts in a given week. This may mean that mostusers who create thoughts also edit them.

4.2.3.3 Clicking the graph visualization

Evaluated: Completed mouse click on the frontpage graph visualization.

Page 53: Rktik - A Social Network for Groups

4.2 usage metrics 45

Figure 19: Number of users who edited thoughts

Figure 20: Number of users who clicked the frontpage graph visualization

Page 54: Rktik - A Social Network for Groups

46 evaluation and discussion

The number of users who clicked on the frontpage graph visualization in a givenweek varied between a minimum of zero users in the first two weeks and a maximumof three users in the fourth week of measurement (see Figure 20). As the number ofclicks did not return to the maximum of three users, it may be assumed that userstried this feature only once and did not return to it later.

4.2.3.4 Follow or unfollow a blog

Evaluated: Click on the follow or unfollow buttons located in movement or personalblogs and in movement Mindspaces.

Figure 21: Number of users who followed or unfollowed blogs

The number of users who follow or unfollow blogs was measured between zero andtwo users over the course of measurement (see Figure 21). This number is unexpectedlylow in relation to the total number of active users, especially towards the end of themeasurement. This may indicate that users do not understand the purpose of thisfeature well enough. Educating users about controlling the contents of their frontpageby following or unfollowing blogs may lead to a better user experience.

4.2.3.5 Toggle membership in a movement

Evaluated: Click on the Join movement or Leave movement buttons located in movementblogs and movement Mindspaces.

The number of users who toggled their membership in movements was either zeroor one in the first three weeks, reached a maximum of three users in the fourth weekand varied between one and two users for the remainder of the measurement (seeFigure 22). Similar to the number of users who follow or unfollow blogs, this number is

Page 55: Rktik - A Social Network for Groups

4.2 usage metrics 47

Figure 22: Number of users who toggled their membership status

unexpectedly low and suggests that users do not understand the benefits of controllingtheir membership in movements well enough.

4.2.3.6 Accessing the notebook view

Evaluated: Loading the notebook viewThe number of users who viewed their notebook was zero in the first week and

varied between one and three users for the remainder of the measurement (see Figure23). The feature was not used in the first week because it was only activated in the sec-ond week of measurement. Engagement may increase if the feature is better integratedwith other features of the site. Right now, the flow of data in and out of the notebookis achieved via the repost functionality. This mechanism may be poorly understood byusers, which could be helped by a more comprehensive tutorial for new users.

4.2.3.7 Toggling a vote

Evaluated: Completed mouse click on a vote buttonThe number of users who cast votes rose from one in the first week to four in the

third week and remained at this level except for the 5th and 6th weeks, where two andfive users engaged with the feature respectively (see Figure 24). This feature was themost popular in this comparison, which confirms its nature as a low-barrier way ofengaging with content in Rktik.

The evaluation of user metrics shows how user engagement varies between features.Although the low number of users limits the explanatory power of these measure-ments, some interesting observations include the fact that a high number of users edit

Page 56: Rktik - A Social Network for Groups

48 evaluation and discussion

Figure 23: Number of users who loaded the notebook view

Figure 24: Number of users who cast votes

Page 57: Rktik - A Social Network for Groups

4.3 movement agency 49

their posts and that very few users change their blog subscriptions or membership inmovements. The latter fact highlights the need for a tutorial that will guide new usersthrough the features of the website. The continued observation of these measurementswill allow a focussed development of Rktik in the future.

4.3 movement agency

Rktik communicates to its users that movements have agency. This is established byattributing actions taken by their members to movements, once these actions are con-firmed by a certain number of members. As described in Section Movements, thisprocess guards members’ privacy and may establish stronger cohesion between move-ment members.

While this concept may be applicable to a wide range of actions, Rktik’s currentimplementation only supports attributing authorship of a thought to a movement (seeSection Promoting Content). In this section I will present three options for other actionsthat may be attributed to a movement’s agency.

Currently the building of consensus is indicated by progress bars in the mindspace.Planning and voting of a variety of actions will require a unified interface for all ofthem. It should allow members to identify the proposed action, suggest changes, andvote on its implementation. It may also feature a veto option with a lower threshold.This control should be designed to simplify the process, especially for new users. In-ternally, action proposals may be stored as a new kind of attachment.

EventsA movement member may propose an event in the movement Mindspace. An event

consists of a title, location, date, time and privacy setting (visible only for membersor for all users). Other members can discuss the events and propose changes to bemade by the author in order to gain their consensus, and thus the necessary votes formaking the event official. Once voting shows that consensus is reached, the movementdisplays the event prominently in its Mindspace or blog, depending on the event’sprivacy settings. The final event posting is attributed to the movement and not itsoriginal author. This mechanic would allow movement members to organize collectiveaction outside of Rktik’s online context.

Public chatA movement’s blog may contain a chat module, which non-members can use to

converse with the movement as a whole. Messages entered in this chat would bedisplayed in the movement Mindspace for members to see. Members can then proposeanswers and other members can confirm these by voting on them. The non-memberwho posted the original message into the movement chat would then be shown theanswer attributed to the movement as a whole.

Creating thoughts in other parts of the site

Page 58: Rktik - A Social Network for Groups

50 evaluation and discussion

Members may propose a thought to be posted with attribution to the movementin another part of Rktik. This could be a personal message to a persona, a reply toany thought not in the movement itself, or a message in the public chat of anothermovement (as described above). Changes to the proposed thought may be discussedby members beforehand as described for events and public chat .

4.4 external clients

Rktik is the successor to Souma (Ahrend et al., 2015, pp. 95–108), which is a prototypefor a decentralized social network as described in Section Problem: Privacy and Iden-tity. While Rktik is not a decentralized system yet, its design allows an extension withthis functionality. Such would entail two parts: 1) A publicly accessible API for Rktik’sNucleus backend, and 2) a local client application that connects to this API. Using alocal client makes possible a new usage pattern, in which a private movement’s inter-nal data is only stored in encrypted form on the server. Encrypted information aboutmembers’ activity would be distributed among them via the API. Information wouldonly be made available in unencrypted form on the rktik.com website once membershave decided on a collective action. In this section I will outline the components neces-sary to build this extension based on the design implemented by Souma (see Ahrendet al., 2015, pp. 95–108).

HTTP APIAn API is an interface between two separate pieces of software. APIs based on the

HTTP protocol and the JSON data format have emerged as best practice in modernweb infrastructure. The API will serialize ORM models into JSON representations thatare encrypted, signed and wrapped in a second layer JSON representation for transfer.

The API will be designed primarily for a client that is installed on a user’s computer,but it may also be used for third party services built on data published by Rktik. Usagescenarios include clients for mobile devices or third-party websites that interact withRktik.

Local client applicationAn external client uses the aforementioned API to exchange data with Rktik’s server-

based Nucleus backend, and provides its own user interface on the user’s local ma-chine. The implementation of this user interface may reuse most of the code from theGlia web server to locally serve a version of the site. Differences in implementationwould be expected mostly from code to access the API, and performance optimiza-tions for personal computers.

While such an implementation of an external client would not technically constitutepeer to peer data transfer, as data is still transferred using a server, it would bringall of its advantages with it: End-to-end-encryption of data ensures that the containedinformation is only available at the endpoints of communications. At the same time, theserver-based infrastructure would 1) ensure that data is available, even when no local

Page 59: Rktik - A Social Network for Groups

4.5 conclusion 51

machines are online, and 2) increase synchronization speeds significantly by profitingoff the superior connection speeds available in data centers.

4.5 conclusion

This thesis presents a new conceptualization of individual user and collective iden-tity in online social platforms and its implementation in Rktik, a new social networkfor groups. This is achieved by refactoring and extending the Souma prototype fora peer-to-peer social network. Added features include a redesigned user interface,Websockets-based chat module, automatic publishing in groups, threaded discussionpages, email and desktop notifications and many more. Rktik is configured and opti-mized to run as a web application in the Heroku PAAS. The software is functional andaccessible to the public. While parts of the interface are not obvious to understand fornew users and performance is not satisfactory, possible solutions to these problemshave been presented. The platform may be further extended by making new collectiveactions available in groups and implementing the proposed peer-to-peer client.

Page 60: Rktik - A Social Network for Groups
Page 61: Rktik - A Social Network for Groups

B I B L I O G R A P H Y

53

Page 62: Rktik - A Social Network for Groups
Page 63: Rktik - A Social Network for Groups

B I B L I O G R A P H Y

Ahrend, V., Berov, L., Eilbacher, G., Gracias, F., Hartmann, K., Ho Dac, N.-T., . . .Pritzkau, A. (2015). From a humanistic reconstruction of social networks to Souma. (L. Berov,A. Jamneshan, & L. Wjatscheslaw, Eds.). Unpublished manuscript. Osnabrueck.

Boyd, D. (2012). The politics of “real names”. Communications of the ACM, 55(8), 29.doi:10.1145/2240236.2240247

Crocker, D. (1982). Standard for the format of ARPA Internet text messages. Retrievedfrom https://tools.ietf.org

Driessen, V. (2010). A successful Git branching model. Retrieved from http://nvie.com/posts/a-successful-git-branching-model/

Facebook. (n.d.-a). Can I have more than one username for my Page or profile? Re-trieved from https://www.facebook.com/help/154889281245103

Facebook. (n.d.-b). Facebook Company Info. Retrieved from http://newsroom.fb.com/company-info/

Google. (n.d.). How a Session is defined in Analytics. Retrieved from https://support.google.com/analytics/answer/2731565?hl=en

Gruber, J. (2004). Markdown. Retrieved from http://daringfireball.net/projects/markdown/

Nielsen, J. (2012). User Satisfaction vs. Performance Metrics. Retrieved from http://www.nngroup.com/articles/satisfaction-vs-performance-metrics/

Radicati, S., & Hoang, Q. (2011). Email statistics report, 2011-2015. Retrieved May,44(0), 0–3. Retrieved from http://scholar.google.com/scholar?hl=en&btnG=Search&q=intitle:Email+Statistics+Report+,+2011-2015#0

Reddit. (n.d.-a). About reddit. Retrieved from https://www.reddit.com/about/

Reddit. (n.d.-b). Reddit FAQ: Is it okay to create multiple accounts? Retrieved fromhttps://www.reddit.com/wiki/faq#wiki_is_it_okay_to_create_multiple_accounts.3F

Salihefendic, A. (2010). How Hacker News ranking algorithm works. Retrieved fromhttp://amix.dk/blog/post/19574

SQLAlchemy Autors. (n.d.). Relationship Loading Techniques. Retrieved from http://docs.sqlalchemy.org/en/rel_0_8/orm/loading.html

W3C. (n.d.). Web Notifications (W3C Proposed Recommendation). Retrieved fromhttp://www.w3.org/TR/2015/PR-notifications-20150910/

55

Page 64: Rktik - A Social Network for Groups
Page 65: Rktik - A Social Network for Groups

A P P E N D I X

57

Page 66: Rktik - A Social Network for Groups
Page 67: Rktik - A Social Network for Groups

bibliography 59

.1 views

The following section lists all views available in Glia.• index: Frontpage at (http://rktik.com/)

Personas• create_persona Form for adding a new persona• notebook Private area for storing notes and reposting thoughts for oneself• notifications Listing of notifications for active persona and email preferences for

logged in user account• persona Basic information about a single persona and listing of all movements

they are a member of. This view includes a chat widget when it does not repre-sent the active persona.

• persona_blog Personal blog of a personaThoughts• create_thought Dedicated page for creating new thoughts. This view also allows

entering long text attachments in contrast to the inline thought creator.• edit_thought Similar interface to the create_thought view that allows removing

and editing attachments as well as the thought’s title.• delete_thought Confirmation dialog for removing thoughts.• thought View for a single thought that includes its context, attachments, com-

ments and metadata.Movements• movement Redirect view that sends members to a movement’s Mindspace and

non-members to the movement blog.• movement_blog Main listing for a movement blog that presents a reverse chrono-

logical, paginated view of thoughts in the blog.• movement_Mindspace View for movement Mindspace contents as well as move-

ment chat and metadata.• invite_members Form for obtaining invitation links and sending email invita-

tions• movement_list Listing of all movements on Rktik

User account related• activate_persona Redirect view that activates a different persona linked to the

logged in user account• signup Form for creating a new user account• signup_validation Redirect view for validating a user’s email address• login Login form for user accounts.• logout Redirect view that logs out the current user account

Helpers• help Access help pages stored in templates/help_*.html files• tag Listing of thoughts marked with a specific hashtag

Page 68: Rktik - A Social Network for Groups

60 bibliography

Before requestThese special views are given the before_request decorator, which causes them to

be executed every time a user visits a page.• account_notifications Inserts a notification into the page if the logged in user

has not validated their email address.• mark_notifications_read Marks all notifications as read that link to the current

page.

.2 cached information

This section lists values cached with Memcached as described in Section 3.4. Cacheentries use the method’s name and parameters as a cache key if not specified otherwise.Methods which invalidate cached values are given in brackets.

.2.1 Model Methods

• Persona.attention

• Persona.conversation_list

(invalidated by Thought.create_from_input)• Persona.frontpage_sources

(invalidated by Persona.toggle_following, Persona.toggle_movement_membership)• Persona.movements

(invalidated by Persona.toggle_movement_membership)• Persona.repost_mindsets

(invalidated by Persona.toggle_movement_membership)• Persona.suggested_movements

• Movement.attention

• Movement.member_count

(invalidated by Persona.toggle_movement_membership)• Movement.Mindspace_top_thought

(invalidated by Thought.toggle_upvote)• Movement.top_movements

• Thought.top_thought

(invalidated by Thought.create_from_input)• Thought.upvote_count

(invalidated by Thought.toggle_upvote)• Thought.iframe_url

Page 69: Rktik - A Social Network for Groups

bibliography 61

.2.2 Other Cached Values

• Nucleus.helpers.recent_thoughts

(invalidated by Thought.create_from_input)• Percept template macro in glia/templates/macros/percept.html

• Frontpage graph visualization in glia.web.helpers.generate_graph

• Glia.async.async_chat (Cache key depends on logged in user and request path)