GithubHelp home page GithubHelp logo

lab5-soa's Introduction

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 (:gift:)

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
Diego Marco 755232 Build Status Solution
Alejandro Magallón 779354 Build Status Solution
Óscar Pueyo 780378 Build Status Solution
María Peña 780448 Build Status Solution
Tomás Pelayo 779691 Build Status Solution
Jorge Laguna 735550 Build Status Throttle the route to avoid be banned by Twitter 🎁
María Peña 780448 Build Status Solution
Andoni Salcedo 785649 Build Status Solution
Alejandro Artal 775929 Build Status Solution
Jaime Conchello 776012 Build Status Solution
Fernando Serrano 774840 Build Status Solution Rest EndPoint 🎁
José Marín 778148 Build Status Solution
Mateo Vallejo 780029 Build Status Solution
Diego García Muro 767870 Build Status Solution
Pablo Jordán 757166 Build Status Solution
Sergio Benítez Mombiela 755787 Build Status Solution
Isaac Velasco 758986 Build Status Solution
Héctor Bara 779354 Build Status Solution
Rubén Subías 759406 Build Status Solution
Germán Garcés 757024 Build Status Solution
Alvaro Echavarri 737400 Build Status Solution
Marta Morales Sabroso 780454 Build Status Solution
Binhui Chen Zhou 779799 Build Status Solution
Jorge Serrano 776453 Build Status Solution
Guillermo Cánovas 755848 Build Status Solution
Ángela Rojo Sediles 774335 Build Status Solution
Carlos Navarro 780180 Build Status Solution

lab5-soa's People

Contributors

779799 avatar 780454-unizar avatar aechavarris avatar alecron avatar alejandro-artal avatar andonisalcedo avatar angela-rs avatar dmarcob avatar dolansete avatar feer93 avatar fjlopez avatar fntkg avatar gelpa99 avatar guillecanovas avatar jaimecb avatar jmarindiez avatar lulay7 avatar mpenalm avatar opueyociutad avatar pablojordan24 avatar pkmniako avatar r3ngfx avatar sergiobenitez755787 avatar thdgm avatar tomenos18 avatar topopelon avatar zgzserrano avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.