Font Size: a A A

The Design And Implementation Of Common Logic Layer’s REST API For Virtual Community

Posted on:2013-10-24Degree:MasterType:Thesis
Country:ChinaCandidate:F ShenFull Text:PDF
GTID:2248330371988130Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With rapid amplification of the scale of the website business after connecting SNS, the non-integrated and fragmented codes environment breads redundant and inconsistent data so that business maintenance will lead to information quality problems. Because of lack of flexibility, the data prevents agility while responding to changing business requirements constantly. And it’s costly to administer and maintain the redundant logic layer. So, we need to solve the service integration and sepeation problem.This article firstly research on the current open APIs for user relationships and twitter actions from facebook, twitter and sina weibo, such as users, friends, statuses, twitter and others. We propose to develop common layer’s API based on simple and lightweight REST architecture. The main job is to integrate the redundant business and to provide uniform interfaces based on existing databases and lagic codes for top layer invoking.Then we analyse and design the overall architecture of common layer. We use the existing interfaces provided by ORM library to access database, deploy NoSQL databases cluster to do high-performance reading, writing and caching for helping tranditional database, parse the HTTP request parameters and make use of Non-Blocking Async MQ to complete the secondary task, and then package the features above in shared layer critical10component. After solving the10issues, we summarise the frequent calls from the top layer, design resources and classify them with URI, design the addressable, stateless resource-oriented applications which can be connected and with a unified interface. Meanwhile, the related tasks are designed to complete the auxiliary request of the important task.Finally, all current REST APIs are perfromed based on the REST-style MVC pattern, and can be verified using CURL. Current APIs are divided into following modules:user, users, twitter and twitters. We provide the individual and collective APIs separately for interacting with top layer’s requests more conveniently. It should be noted that not all resources are provided with all GET/POST/PUT/DELETE methods.The interfaces provided by this article for unified access to resouces related to users, twitters already took place of original logic codes in top layer, reduced the drag of maintaining business layer for other programmers, reduced inconsistency and redundancy, improved the speed of the team agility, thereby helping to improve the user experience.
Keywords/Search Tags:RESTful API, ROA, ORM, NoSQL, Redis, MVC, Pinterest
PDF Full Text Request
Related items