Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92511467

Have any Question?


Related Questions in Computer Engineering

Explain that when an unauthorized individual gains access

Explain that when an unauthorized individual gains access to the information an organization trying to protect, that act is categorized as a deliberate act of espionage or trespass.

What are the three most significant aspects of threat which

What are the three most significant aspects of threat which will continue to evolve for the next 20 years?

In replit pythontext analyzer and modifier1 prompt the user

In repl.it Python: Text Analyzer and Modifier 1. Prompt the user to enter a string of their choosing. Output the string. Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only th ...

Annual demand and supply for the mylan company is given

Annual demand and supply for the Mylan company is given by: QD = 5,000 + 0.5 I + 0.2 A - 100P, and QS = -5000 + 100P where Q is the quantity per year, P is price, I is income per household, and A is advertising expenditu ...

A swimmer is an athlete any athlete who participated in the

A swimmer is an athlete. Any athlete, who participated in the 2016 Summer Olympics and won a gold medal, was joyful. Any athlete, who is the world top athlete or a selected well-trained athlete, participated in the 2016 ...

Systems analysis projectpersonal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

Hoping to lore more shoppers downtown he said he built a

Hoping to lore more shoppers downtown. He said he built a new public parking garage in central business district. The city plans to pay for the structure through parking fees. For a random sample of 44 weekdays, daily fe ...

Question as we have seen traditional and agile schedule

Question : As we have seen, traditional and Agile schedule developments are quite different. Agile project management was originally developed to do software development. Could a traditional process be successfully used ...

When a developer creates an app should they make it

When a developer creates an app, should they make it backwards compatible, so that the app can be handled by older versions of the operating system? Why or why not?

Please discuss the design principles that guide the authors

Please discuss the design principles that guide the authors of instruction sets in making the right balance. Provide examples of application of each of the three design principles while designing instruction sets.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As