2.15 Couchbase Sync Gateway
Total Page:16
File Type:pdf, Size:1020Kb
VISVESVARAYA TECHNOLOGICAL UNIVERSITY “Jnana Sangama”, Belgaum – 590 014 A PROJECT REPORT ON “SOYA ASSIST” Submitted in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING IN COMPUTER SCIENCE AND ENGINEERING BY PRUTHVI DIWAKAR HEGDE (1NH11CS079) RASEENA A (1NH11CS090) SAMYUKTHA SUBRAMANIAN (1NH11CS100) SHRUTHI S (1NH11CS109) Under the guidance of Mr. Puneet S Palagi (Assistant Professor, Dept. of CSE, NHCE) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING NEW HORIZON COLLEGE OF ENGINEERING (ISO-9001:2000 certified, Accredited by NBA, Permanently affiliated to VTU) Outer Ring Road,Panathur Post, Near Marathalli, Bangalore – 560103 NEW HORIZON COLLEGE OF ENGINEERING (ISO-9001:2000 certified, Accredited by NBA, Permanently affiliated to VTU) Outer Ring Road, Panathur Post, Near Marathalli, Bangalore-560 103 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CERTIFICATE Certified that the project work entitled “SOYA ASSIST” carried out by PRUTHVI DIWAKAR HEGDE (1NH11CS079), RASEENA A (1NH11CS090), SAMYUKTHA SUBRAMANIAN (1NH11CS100), SHRUTHI S (1NH11CS109) and a bonafide student of NEW HORIZON COLLEGE OF ENGINEERING in partial fulfillment for the award of Bachelor Of Engineering/Bachelor Of Technology in Computer Science and Engineering of the Visvesvaraya Technological University, Belgaum during the year 2014 - 2015. It is certified that all corrections/suggestions indicated for Internal Assessment have been incorporated in the report deposited in the department library. The project report has been approved as it satisfies the academic requirements in respect of Project work prescribed for the said Degree. Name & Signature of Guide Name Signature of HOD Signature of Principal (Mr. Puneet .S .Palagi ) (Dr. Prashanth C.S.R.) (Dr. Manjunatha) External Viva Name of Examiner Signature with date 1. 2. ACKNOWLEDGEMENT The satisfaction and euphoria that accompany the successful completion of any task would be, but impossible without the mention of the people who made it possible, whose constant guidance and encouragement crowned our efforts with success. We thank the management, Mr. Mohan Manghnani, Chairman of NEW HORIZON EDUCTIONAL INSTITUTIONS for providing necessary infrastructure and creating good environment. We also record here the constant encouragement and facilities extended to us by Dr. Manjunatha, Principal, NHCE and Dr. Prashanth.C.S.R, Head of the Department of Computer Science and Engineering. We extend our sincere gratitude to them. We express our gratitude to Mr. Puneeet .S .Palagi, our project guide for constantly monitoring the development of the project and setting up precise deadlines. Their valuable suggestions were the motivating factors in completing the work. We would also like to express our gratitude to NHCE and to all our external guides at NHCE for their continuous guidance and motivation. Finally a note of thanks to the teaching and non-teaching staff of Computer Science and Engineering Department for their cooperation extended to us and our friends, who helped us directly or indirectly in the course of the project work. PRUTHVI DIWAKAR HEGDE (1NH11CS079) RASEENA A (1NH11CS090) SAMYUKTHA SUBRAMANIAN (1NH11CS100) SHRUTHI S (1NH11CS109) I ABSTRACT The necessity to help soya bean farmers cultivate their crop in an easy, flexible manner is increasing day by day. Soya Assist is an android application that provides easy access to various information regarding the cultivation of soya bean to the user. This application allows the farmers to create an account for identification. It basically requires the farmers to enter their information such as name, country, photograph, land information that includes the soil type, fertility etc. When the user is offline, the information entered by the user will be stored in the local database of the smart phone. Once the user is connected to the internet the data from the local database is transferred to the server. Data from the server is available to any users who have access to internet and have installed the application. The farmers can also add the best methods practiced by them to the application in terms of textual data, images or videos and that is available to other farmers who can implement it only after the approval of the authorizer who checks if the data uploaded contains valid information or no. The user is also provided with information regarding the different stages of the crop life cycle as well as the problems that he might have to face during the growth .This helps the cultivator to take preventive measures accordingly after analyzing his/her crops. The application also provides information regarding the enemies of the crop such as the aphids that feed on soya bean. It also provides assistance on the usage of insecticide or pesticides.Information regarding the weather forecast according to the place is also available in the application that helps the farmers to plan out their day to day work. II CONTENTS I ACKNOWLEDGEMENT I II ABSTRACT II 1. PREAMBLE 1.1. INTRODUCTION 1 1.2. PURPOSE 1 1.3. OBJECTIVE 2 1.4. TECHNOLOGY 2 2. LITERATURE SURVEY 2.1. AJAX 8 2.2. CSS 9 2.3. JRE 9 2.4. REST API 9 2.5. CURL 10 2.6. HTML 5 10 2.7. JAVASCRIPT 11 2.8. JQUERY 11 2.9. JDK 11 2.10. APACHE TOMCAT 12 2.11. PHONEGAP 12 2.12. ECLIPSE 12 2.13. ADT 13 2.14. JSON 13 2.15. NOSQL 13 2.16. COUCHBASE SERVER 13 2.17. SYNC GATEWAY 14 2.18. ANDROID SDK 24 III 3. REQUIREMENT ANALYSIS 3.1. FUNCTIONAL REQUIREMENTS 15 3.2. NON FUNCTIONAL REQUIREMENTS 16 3.3. SOFTWARE REQUIREMENTS 21 3.4. HARDWARE REQUIREMENTS 21 4. PROJECT OVERVIEW 4.1. INTRODUCTION 22 4.2. PLATFORM 25 4.3. WHY NOSQL? 27 4.4. FEATURES OF COUCHBASE SERVER 29 5. SYSTEM DESIGN 5.1 INTRODUCTION 36 5.2 GOALS 37 5.3 SEQUENCE DIAGRAMS 38 5.4 USE CASE DIAGRAM 39 5.5 ACTIVITY DIAGRAM 40 5.6 SYSTEM ARCHITECTURE 41 6. IMPLEMENTATION 6.1 DESIGN IMPLEMENTATION 58 7. SYSTEM TESTING 7.1 UNIT TESTING 61 7.2 INTEGRATION TESTING 61 7.3 VALIDATION TESTING 62 7.4 SYSTEM TESTING 63 IV 7.5 TESTING OF INITIALIZATION AND UI COMPONENTS 70 8. SNAPSHOTS 69 9. CONCLUSION AND FUTURE ENHANCEMENT 9.1 CONCLUSION 77 9.2 FUTURE ENHANCEMENT 77 10. BIBLIOGRAPHY 78 VI LIST OF FIGURES VI VII LIST OF TABLES VII V LIST OF FIGURES 1.1 ANDROID ARCHITECTURE 5 1.2 ANDROID ARCHITECTURE 7 2.1 HOW AJAX WORKS 8 4.1 ELASTIC SCALABILITY 30 4.2 CONSISTENT HIGH PERFORMANCE 31 4.3 ALWAYS AVAILABLE 32 4.4 FLEXIBLE GLOBAL DEPLOYMENT 33 4.5 REAL TIME BIG DATA 35 5.1 SEQUENCE DIAGRAM 38 5.2 USE CASE DIAGRAM 39 5.3 DATA FLOW DIAGRAM 40 5.4 COUCHBASE MOBILE 41 5.5 ROUGH ARCHITECTURE 56 5.6 XDCR 57 6.1 DESIGN IMPLEMENTATION 58 6.2 SYNC OUT 59 6.3 SYNC IN 59 6.4 WEATHER 60 7.1 TESTING PROCESS 62 VI LIST OF TABLES 7.1 TEST CASE 1 63 7.2 TEST CASE 2 64 7.3 TEST CASE 3 65 7.4 TEST CASE 4 66 7.5 TEST CASE 5 67 7.6 TEST CASE 6 68 VII SOYA ASSIST CHAPTER 1 PREAMBLE 1.1 INTRODUCTION SOYASSIST: An android application to help farmers to cultivate soya beans in an efficient way. The application allows the farmers to create an account for identification. This basically requires the farmers to enter their information such as name, country, photograph, land information that includes the soil type, fertility etc. When the user is offline, the information entered by the user will be stored in the local database of the smart phone. Once the user is connected to the internet the data from the local database is transferred to the server. Data from the server is available to any users who have access to internet and have installed the application. The farmers can also add the best methods practiced by them to the application in terms of textual data, images or videos and that is available to other farmers who can implement it. The app also advises the farmers about the natural enemies and how to get rid of them. Additionally it also gives a weather report and describes the soya life cycle stages for keeping the farmers informative about soya beans. 1.2 PURPOSE These mobile phone apps help farmers, land owners and animal owners to work faster and more accurately in the field - where your animals and crops need you. They help you to dispense with paperwork and spend more time raising your livestock with series of farming apps for Android. Dept of CSE, NHCE Page 1 SOYA ASSIST They save time on laborious record keeping and , save money on important forage and feed ,make more use of your time and resources .They also give you expert tips, tricks and increase your financial returns. Mobile phone app has made it easier for insurance agencies to collect reliable and timely data on crop yields, enabling them to offer lower premiums to farmers. The technology has also made it possible for insured farmers to receive quicker claim payments, providing them with much needed cash flow during the cropping season. 1.3 OBJECTIVE Through our application we provide a solution to farmers dealing with soya bean cultivation so that farmers can cultivate beans efficiently which could increase its production rate. Every farmer can connect with one another to understand the different practices carried out by them respectively and improve their knowledge about soya bean cultivation. 1.4 TECHNOLOGY Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android-SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.