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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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