Implement the code necessary to transfer data from the store

Assignment Help Computer Engineering
Reference no: EM131702772

Assignment

Setup

• Copy the project CO7X17.miniproject1 under partI in the local copy of your private repository.
• Import the project into your workspace using Gradle Buildship 2.

Migration process setup

There are several clients for the Twitter API that allow us to query data on Twitter. We are going to make calls to the REST API directly via twurl copying data in bulk once.

The data migration process is achieved by executing from a shell terminal the command ./twitterMigrate.sh. The script will show a URL which should be pasted on to a browser and the PIN obtained should be pasted on the terminal. Once authorization is successful, friends and follower's tweets will be filtered and copied onto your MongoDB database on mLab (once you finish exercise 1).

Exercise 1: fetching data from Twitter

In class miniproject1.mongoDb.BulkTransfer, implement the code necessary to transfer data from the stored JSON files in your MongoDB instance on mLab. The database should contain two collections of documents:

• friends: containing information about friends and their tweets.
• followers: containing information about followers and their tweets.

Take into account the following requirements:

• Denormalization is going to be applied and a user may be stored in both collections and, therefore, their tweets will also be stored twice.
• Each user (friend or follower) must contain its tweets in a new field tweet.
• Store the following information about friends and followers
• id_str,
• name,
• description,
• favorites_count,
• followers_count,
• friends_count,
• language,
• location,
• screen_name,
• url,
• utc_offset

• Store the following information about tweets

• id_str,
• created_at,
• entities,
• favorite_count,
• favorited,
• user.id_str,
• in_reply_to_screen_name,
• in_reply_to_status_id,
• in_reply_to_user_id,
• language_code,
• retweet_count,
• retweeted,
• source,
• text

To fetch JSON documents from Twitter for testing your scripts without pushing them to your MongoDB instance, comment the line ./gradlewmigrateToMongoDb in the shell script twitterMigrate.sh using #, that is:

# ./gradlewmigrateToMongoDb

Exercise 2: followers report

In the controller IndexController, add code to the handler method followers in order to list all your follower that have tweets that mention martinfowler, i.e. screen_name=='martinfowler' for an entity user_mentions in a tweet published by your follower.

The controller must get the information from the data on your MongoDB instance on mLab, and not from the JSON files directly.

Exercise 3: friends report

In the controller IndexController, add code to the handler method friends in order to mine some intelligence about your Twitter account:

For each friend, add an object FriendDto into the list friends with the following information:

• name: your friend name

• description: your friend description

• noTweets: their number of tweets (up to 10)

• noRetweets: the overall number of retweets (aggregated retweet count for all tweets) for their selected tweets (those fetched from twurl or in the sample files)

• noActiveTweets: the number of tweets that have caused discussion (whose whose retweet count is greater than 100) for their selected tweets (those fetched from twurl or in the sample files)

The controller must get the information from the data on your MongoDB instance on mLab, and not from the JSON files directly.

Reference no: EM131702772

Questions Cloud

Case scenario-planning for the chevy volt : General Motors is a company in deep trouble. As car sales in North America collapsed in 2008, GM, which had already lost money in 2007.
Define simple attributes versus composite attributes : Define Simple attributes versus Composite attributes. Design an Entity Relationship (ER) Model to represent the above requirements.
What are the implications of price wars for a company : Under what environmental conditions are price wars most likely to occur in an industry? What are the implications of price wars for a company?
Identify the number and size distribution of companies : Discuss Porter's five forces model with reference to what you know about the United States steel industry (see the Opening Case).
Implement the code necessary to transfer data from the store : In class miniproject1.mongoDb.BulkTransfer, implement the code necessary to transfer data from the stored JSON files in your MongoDB instance on mLab.
What is the company strategy : What is the company strategy? What were the company's goals and were they successful in achieving those goals?
Assess the impact of macro environmental factors : Assess the impact of macro environmental factors on the likely level of enrollment at your university over the next decade.
Prepare all necessary journal entries : Assume Flint uses a periodic system. Prepare all necessary journal entries, including the end-of-month closing entry to record cost of goods sold
Discuss working with the economic order quantity : Demand for the Executive DeskPro Computer at Buy More is 1,000 units per month. Buy More incurs a fixed order placement, transportation

Reviews

Write a Review

Computer Engineering Questions & Answers

  How many conductors will be required

If an address bus needs to be able to address eight devices, how many conductors will be required? What if each of those devices also needs to be able to talk back to the I/O control device?

  What is the major advantage of a plc system

RELAY LADDER LOGIC is a high-level graphic computer language. What is the major advantage of a PLC system over the traditional hardwired control system?

  Analyse information security vulnerabilities

Analyse information security vulnerabilities and threats and determine appropriate controls that can be applied to mitigate the potential risks - explain why continual improvement is necessary to maintain reasonably secure information systems and IT..

  Management tools for microsoft windows server

Based on the Kercher (2009) article, how can management tools for Microsoft Windows Server 2008 automate user account administration

  What are disadvantages of implementing a payroll application

What are the advantages and disadvantages of implementing a payroll application as compared to implementing it using client-server architecture on a private network without Web browsers and servers?

  Create a program to perform the simulation

Each time a square is touched, the count for that square is incremented. Thus, a non-zero entry in the array shows the number of times bug has landed on the corresponding square. When every square has been touched at least once, the simulation is ..

  Create pseudo code that explains how to start the computer

Create pseudo code that explains how to start the computer at your computer lab and open a file in the word processor. Exchange your pseudo code with a classmate and follow the instructions exactly as they appear.

  What is the significance of cayman island

What is the significance of Cayman Island? Did it affect your conclusion? Would this controversy have arisen if TBT had been using AES rather than 3DES?

  What can be done to completely erase data

IT 357 - Data Recovery - What happens when a drive is formatted using default operating system formatting tools? Your answer should discuss what happens in terms of the actual activity at the disk level.

  Why you believe your solution would solve two mens problem

Consider this scenario: Mr. Brown and Mr. Green have argued several times about which one of them has the slowest horse. They have swapped stories, each telling of the races his horse has lost, but each man also has failed to convince the other th..

  Wap to calculate the original pixel colors

Using Eq.and the transform values from the preceding exercise, write a pro-gram to calculate the original (restored) 32 pixel colors.

  In order to provide a convenient self-service solution for

in order to provide a convenient self-service solution for students to access personal and course-related material

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd