Lab5-soa (deadline 2021-12-17)

Related tags

App lab5-soa
Overview

Web Engineering 2021-2022 / SOA

In this assignment your PR must only modify the README.md file. Please, go to the Wiki in order to get the instructions for this assignment.

Apache Camel

Camel is an Open Source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data. This is a common SOA scenario. The snippet below:

  • Search tweets in Twitter and returns to the web client
  • Dump to disk at least one of tweets retrieved encoded in JSON in the folder log/{year}/{month}/{day}
  • Compute metrics (available at /actuator/metrics/per-keyword-messages?tag=keyword:${value}, values available at http://localhost:8080/actuator/metrics/per-keyword-messages)
from(DIRECT_ROUTE)
    .toD("twitter-search:\${header.keywords}") // Twitter search, returns a list of Tweets
    .wireTap(LOG_ROUTE) // Copy the list of tweets to the LOG_ROUTE, which is processed by its own thread  
    .wireTap(COUNT_ROUTE) // Copy the list of tweets to the COUNT_ROUTE, which is processed by its own thread
    // returns a list of tweets to the DIRECT_ROUTE caller

from(LOG_ROUTE)
    .marshal().json(JsonLibrary.Gson) // Encode the list of tweets as JSON
    .to("file://log?fileName=\${date:now:yyyy/MM/dd/HH-mm-ss.SSS}.json") // Write the JSON to a file

from(COUNT_ROUTE)
    .split(body()) // Split the list in single Tweets
    .process { exchange -> // Process a single Tweet
        val keyword = exchange.getIn().getHeader("keywords") 
        if (keyword is String) {
            keyword.split(" ").map {
                perKeywordMessages.increment(it)
            }
        }
    }

Primary goal

The objective is to extend the query interface to support the command max:n, where n is a number. max sets a limit in the number of retrieved tweets. That is cool max:10 must return at most 10 tweets. There are several ways to do it. You can use the parameter q or create additional parameters. There is a restriction. You must explicitly tell the API Twitter to enforce such a limit. Read the documentation of the Twitter Search component of Apache Camel to discover how.

You need to apply for a free Twitter developer account.

Do not add application.properties with the Twitter tokens to your git!

Note: the Twitter Search endpoint is configured using URI syntax twitter-search:{string}[?param=value[&param=value]*]

Secondary goals ( 🎁 )

Proposed:

The link provides one of the possible approaches. You can use a different one.

The possibilities of Camel are endless; you can propose your idea for a 🎁 .

Manifest your intention first by a PR updating this README.md with your goal. If you desist of your goal, release it by a PR so other fellow can try it.

User name NIA Status Improvement Score
UNIZAR-30246-WebEngineering 30246 Build Status instructions
You might also like...
Advent of Code 2021, using Kotlin

Advent of Code 2021, using Kotlin See https://adventofcode.com/2021, https://kotlinlang.org/. See also "the official GitHub template" by JetBrains. Ge

Advent of Code project 2021!

aoc-2021 Welcome to the Advent of Code1 Kotlin project created by goddabuzz using the Advent of Code Kotlin Template delivered by JetBrains. In this r

Matt Kuhn 2021, Implemented in Kotlin

Advent of Code Matt Kuhn 2021, Implemented in Kotlin

Advent of Code 2021 in Kotlin Multiplatform!

Advent of Code 2021 in Kotlin Multiplatform Structure Each day comes with two parts for you to solve. You'll find a ready-to go and test templates to

🎅 Marry XMas 🎄 Kotlin solutions for my Advent of Code 2021 🤶

Advent of Code 2021 🎄 val aMessageFromMe = """ _____________,--, | | | | | | |/ .-.\ HANG IN THERE |_|_|_|_|_|_/ / `. SAN

My 2021 Advent of Code Repo - Kotlin this year!

🎄 Advent of Code 2021 This year I'll be solving the advent problems using Kotlin! 🥂 If you're interested in trying out Kotlin for AoC this year or e

My solutions for the Advent of Code 2021. See the link for a playlist with recordings of me solving each puzzle.

Advent of Code 2021 My solutions for the Advent of Code 2021 solved with Kotlin. What is the Advent of Code? Advent of Code is an online event created

Proyecto del Track Covadonga para el Hackathon Orizaba 2021
Proyecto del Track Covadonga para el Hackathon Orizaba 2021

Hospital_Covadonga Proyecto del Track Covadonga para el Hackathon Orizaba 2021 Aplicación móvil creada en lenguaje Kotlin Descripción general Aplicaci

Advent of Code 2021, in Kotlin

advent-of-code-kotlin-2021 Welcome to the Advent of Code1 Kotlin project created by mbifulco using the Advent of Code Kotlin Template delivered by Jet

Owner
30246 Ingeniería Web (UNIZAR)
Prácticas de la asignatura 30246 Ingeniería Web del Grado de Ingeniería Informática (Universidad de Zaragoza)
30246 Ingeniería Web (UNIZAR)
Chat is a sample project that presents a modern, 2021 approach to Android application development.

Chat for Android Chat is a sample project that presents a modern, 2021 approach to Android application development. Screenshots ??

Cenk Gun 10 Nov 6, 2022
2021 Rookies 세미나

와플스튜디오 19.5기 Rookies Repository 세미나 수강 목록 19.5 기 세미나는 다음 학기 개발 프로젝트 참여 가능한 Programmers 양성을 목표로 합니다. Frontend: React - JavaScript Backend: Django - Pyt

Wafflestudio 49 Dec 10, 2022
DevFest 2021 ComposeFest 코드랩 Repo 입니다

ComposeFest2021 안녕하세요 Compose 코드랩에 오신걸 환영합니다. 다음은 코드랩을 진행하기 위한 안내입니다. 진행 일정 2021년 11월 1일 ~ 30일 매주 월요일 코드랩 진행을 돕기 위한 주요 설명 영상을 공개합니다. ?? 영상 보러가기 Compos

GDG Korea Android 127 Nov 7, 2022
ZeAppp v3, created by Android enthusiasts joining the Droidcon 2021 in Berlin, coming to the GDG Booth and writing code, 15 minutes at a time

ZeThree App build at the GDG Community booth at Droidcon Berlin 2021. Come join the fun™. ZeWhat? Based on the previous success of the ZeAppp-app, thi

GDG Berlin Android 8 Sep 16, 2022
Koltin solutions for the 2021 edition of AoC

AdventOfCode2021 This is the code developed for Advent of Code 2021. My primary goals are: have fun learn something new about Kotlin don't spend more

Norbert Kiesel 0 Dec 1, 2021
My solutions for Advent of Code 2021 puzzles, mainly using Kotlin.

Advent of Code 2021 Featuring Kotlin What's that ? https://adventofcode.com/2021/about Advent of Code is an Advent calendar of small programming puzzl

Petrole 0 Dec 2, 2021
My solutions for Advent of Code 2021, written in Kotlin!

Advent-of-Code-2021 Welcome to the Advent of Code1 Kotlin project created by thijsboehme using the Advent of Code Kotlin Template delivered by JetBrai

Thijs Boehme 0 Dec 15, 2021
Kotlin fun with Advent of Code 2021

aoc-kotlin Welcome to the Advent of Code1 Kotlin project created by dayanruben using the Advent of Code Kotlin Template delivered by JetBrains. In thi

Dayan Ruben Gonzalez 32 Dec 15, 2022
Advent of Code 2021 implementations in Kotlin

advent-of-code-in-kotlin-2021 Welcome to the Advent of Code1 Kotlin project created by acrane13 using the Advent of Code Kotlin Template delivered by

null 0 Dec 20, 2021
Advent of Code 2021: Solutions in Kotlin

Advent of Code 2021 Solutions in Kotlin This repo is my personal attempt at solving the Advent of Code 2021 set of problems with the Kotlin programmin

Todd Ginsberg 33 Nov 28, 2022