Hey thereπŸ‘‹,

it’s been a while since my last post - which doesn’t mean, I’ve been lazy. I’ve constantly worked on my Master’s Thesis and I’m almost done, but now I really wanted to share what I recently did: understanding Twitter users’ behavior by spying on them.

In fact, one shouldn’t call it spying if the victim wants it that way - or should one (# socialmedia)? Nonetheless, some people were crazy enough to help me by installing a browser extension or an Android app, respectively. And in this series I want to show you the infrastructure I used to collect and analyze the data they produced.

So let’s start with an overview: Architecture

As you might see, I used AWS to deploy some of the components: I’ve created a Lambda function, which serves a REST API through an API Gateway and is based on Ktor Kotlin server framework. On invocation, incoming events are stored in an ElasticSearch instance also provided by AWS. Best of all: all of this is covered by the AWS Free Tier, so there is no cost.

To analyse the data, I again used Kotlin and combined 3 incredibly helpful tools: clikt, es-kotlin-client and plotly.kt. But more about that later.

You might know that tracking clicks in a browser is no big deal - but how the heck is that supposed to work in an Android app? Sorry, but again you’ll have to be patient 🀫 - that’s part of the next article in this series.

For those who don’t want to wait for the solution: check out the source code of the whole infrastructure here.

Hope you’ll stay tuned. ✌️

This post is also available on DEV.