Vous êtes sur la page 1sur 8

The CattleShed

Shantanu Yadav, Shiroy Mehta


Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar

200701146@daiict.ac.in
200701073@daiict.ac.in
Supervisor
Prof Sanjay Chaudhary

Abstract – The existing system of livestock management system in Less Cost


India, its vital data collection is both labour intensive and More reliability
requires a lot of time to analyze and process the information.
These processes are usually slow and error prone, which More security
introduces latency preventing real-time data accessibility. Such More scalability
issues restrain the clinical diagnostics and monitoring
capabilities of the farmers livestock. We present the design and
implementation of a Web Application called the ‘CattleShed’. Outsource Online
This application is based on concepts of Cloud Computing and Offline Processes Storage
wireless sensor networks. This application is built over virtual-
Access
clustered resources, including Platform-as-a-service (Paas) cloud
systems such as PHPfog. CattleShed provides a framework with Online
Cloud Platforms
which information can be shared between farmers and admin. Collaboration
The project also aims at preparing an identification plan and Computing Online
tracking/monitoring system for livestock using RF tags. The 3rd Party Office
information becomes available in the ‘cloud’ from where it can Integration Online Shared
be processed by experts and distributed clients. Through the
application we intend to boost livestock life and productivity by Resources Calenders
analyzing the information and sending necessary alerts via SMS,
whenever necessary to the farmer of the respective livestock and
Fig 1
thereby obtaining data and history of animals and their
activities. This ensures cost-effectiveness and simple integration.
Using this application we also intend to analyze the existing Characteristics of Cloud Computing
systems and show why cloud computing could be the answer to
real time data processing because of its highly scalable nature . Cloud Computing is broken into three segments (Fig 2):

Keywords– Cloud Computing, PaaS, RFID, Sensor Networks, Application


PHP Fog. Platform
Infrastructure.

I. INTRODUCTION Each part serves a different purpose and offers different


Cloud Computing is a term coined for a recent trend toward products. Application (SaaS): Software-as-a-service is a way
service-oriented cluster computing. It is based on the concept of delivering applications over the Internet-as a service.
of delivering services in an on-demand environment. It can be Instead of installing and maintaining software, you simply
defined as the process of providing computers with servers to access it via the Internet using your web browser. SaaS
process information on a remote location to a variety of clients applications are sometimes called Web-based software (e.g. -
[1]. Cloud computing (Fig 1) simplifies the use of large-scale SalesForce.com [2], which provides customer relationship,
distributed systems through transparent and adaptive resource management software as an on-demand service). Platform
management. It provides simplification and automation for the (PaaS): Platform-as-a-service is sometimes referred to simply
configuration and deployment. When we use any application as web services in the cloud. It delivers a platform from which
that runs on the cloud – all we need to do it is: login, to work rather than an application to work with (e.g. - Google
customize it and start using it. All the changes at the backend App Engine, which provides an interface through which
are made by the cloud service provider. Some of the benefits restricted, network-accessible, applications written in high
of using such technology are: level languages can be constructed). Infrastructure (IaaS):
Infrastructure-as-a-Service describes a facility for
provisioning virtualized operating system instances , storage SMS Scripts
abstractions , and network capacity under contract from a SMS Gateway
service provider( e.g. - Amazon Web Services (AWS) is the
most popular IaaS-style computational cloud).
MySql 5.1
ODBC MySql
Driver Database
Our System

SaaS Fig 3

Architecture of SMS Gateway

PaaS II. PROJECT DEFINITION


The project „CattleShed‟ aims at automating the process of
data collection and data processing in the agricultural sector
and simultaneously making an ICT contribution towards the
agriculture field with the use of the technology of Cloud
IaaS Computing. We plan to develop a database SMS enabled
farmer/service provider tracking/messaging software. The data
obtained can then be used to monitor the health trends within
cattle populations and after being notified by our alerting
Fig 2
system, steps can be taken by concerned authorities. At key
thresholds the system will be programmed to provide a
Structure of the cloud
warning alert/recommendation to farmers who can then take
appropriate actions before livestock die and/or infect others
PHP Fog is a reliable cloud platform built for PHP application. around .Through the application we intend to boost livestock
It is a computing platform/framework that can host web life and productivity by analysing the information and sending
applications and offer them a faster, flexible scalability for necessary alerts via SMS to the farmer of the respective
easier deployment on the cloud. It enables users to write livestock and thereby obtaining data and history of livestock
applications in PHP and to deploy them on PHP Fog‟s robust and its activities.
hosting platform consisting of vast computing resources. PHP
Fog provides simple one-click installations of some of the
most popular PHP applications, frameworks like django, Zend III. RELATED WORK / LITERATURE SURVEY
etc and cms‟s like joomla to help build the application for the Since the project is based on the largely unorganized sector of
user. The deployed applications gain access to a high quality, agriculture, it required a lot of background reading- journals,
professionally maintained, and extremely scalable software discussions with industry people, and a number of hours were
infrastructure. With PHP Fog, there are no servers to maintain: spent on the web/internet- to gather information about the way
You just upload your application, and it's ready to serve the in which the current system of data collection and data mining
users. If you wanted to upscale your application all you would is done and used thereafter. The current scenario is explained
have to do is change your terms and conditions with PHP Fog in Fig 3, which depicts how the entire process works on
and they will provide you with the exact requirements you manual basis/notes. The interactions are shown below:
need. No server deployment hassles, just a one-click plan
change, enabling the user to upscale or downscale as his work
requires.

OZEKI NG SMS Gateway (Fig 3) is a utility that enables the


user to easily send and receive text "Short Messages" over
GSM cellular telephone networks from your local PC or
through the network [5].

Fig 4
Current Scenario[1]
Other projects in this area of great importance include an „e- In the design as shown above: It provides the logical database
dairy‟ project which helps the farmer to identify a milking design for our application. Its main part is the centre placed
animal .This application is currently developed and deployed Cloud Server which acts as a local server but in fact is a
in Sri Lanka and other developing nations. There are lots of cluster of servers where virtualized resources are provided as
proposed solutions by NDDB. a service over the internet. It is connected to all the other
elements of the design diagram consisting of: The „RF tower/
Other ranch management softwares like CattleMax Cs which Remote Server‟ which gets inputs from the sensors – the RF
are used for farm management are being deployed on farms tags , the RF Server Database and from where periodic one
and ranches in countries around the world. However all these way wireless transfer of data takes place between the two
ranch management softwares are programmed in Microsoft entities. The second entity connected to the cloud is the
Access and hence there is a need for a certain level of „Client site website‟ which communicates and transfers data
infrastructure at the farm where it is to be deployed. Farmers two and forth. The third entity connected is the „Ozeki SMS
all over India have just started using mobile phones; hence the gateway‟, connected through the MYSQL ODBC connector is
question of owning a computer and using ranch management used to send Alerts and messages to farmers regarding their
software does not arise. With The CattleShed all the farmer livestock. The last element/entity is the server running the
needs to do is signup once and wherever he is he shall get all scripts, which works on data in the local server –The cloud to
the data he needs about his cattle on his mobile phone. develop the application.

Database Design:

IV. LOGICAL DATABASE DESIGN Please refer Fig 1 of Appendix-A for the ER Diagram.

The Database consists of 4 main tables‟ i.e, farmer, cattle,


Proof-of-concept Logical Design:
rftag and ozekimessageout. They contain the fields that are
shown in the ER diagram. The farmerid is the primary key for
The purpose of this tool is to help outline the technical design both cattle and farmer. Rfid is the primary key for rftag and
of our application „CattleShed‟ and also try and provide an cattle. With the help of this ER diagram we determine the
overview into the implementation of the project. It guides and purpose of our database. All the data about the farmer, cattle
supports the developers in better implementation of the and the cattle RF tag is stored in different tables with their
application. The following diagram was used as the overall relationships mapped which enabled us to write flexible
system design: queries which can be modified later on. With the help of the
primary keys we were able to link the farmer to their
respective cattle and cattle with their respective rfid‟s which
Database of helped us to link the farmer with his respective cattle and alert
RF Server Periodic the farmer in question.
Data MYSQL ODBC 5.1
Transfer connector
V. CHALLENGES AND ISSUES

Cloud
RF Tower / Server Data
Ozeki SMS
At the time of on-field implementation of the project, a real-
(Contains Transfer
Remote Server
Database and Gateway time challenge would be the capability of farmers in handling
all the code)
the services of the project. Some of the issues are:
Gets input from D
sensor Tra ata
ns Language barrier- Regional language is preferred in
Data fer
Transfer
Script Running
agro based applications.
Works on data in Establishing a network of computers with internet
Client side Cloud server
Website access in rural areas.
As it applies at grass root level, the e-learning
Fig. 5 process and capacity building of the farmers may not
be adequate enough.
Proof-of-concept Design
As RF Tags are still not used in India for the purpose
of livestock monitoring, it was very difficult to
visualize how to simulate such transactions from the
RF id information processing centre to our remote
database.
Planned Work vs. Achieved Work Google App Engine on Eclipse Helios 3.6 using the
GWT , we faced the repeated problem of Eclipse
During the tenure of the project, we faced some issues in the Helios 3.6 slowing down or crashing .
development of the code and deployment of the project.
Hence there was a slight variation in our project. Initially we Although there were tools like the GWT Designer
had planned to develop an extensive mobile application which
which is a GUI of the GWT for eclipse which
would provide a 2-way messaging service between the farmer
and the admin. The salient features were: enables the user to drag and drop fields and create
Monitoring/Tracking of cattle 24*7 with the use of tagging applications like Dreamweaver, it was very difficult
with sensors implanted in the livestock, Try and implement a to get used to such a tool as the code it generated was
national-animal ID system which would monitor the food very complex and the we were unable to obtain
supply as well as safeguard against infectious diseases, workstations with adequate resources to run such a
include an option of an online veterinary Hospital where high end development tool-kit.
farmer can request for appointments etc. All this was
supposed to be deployed on GAE (Google App Engine) and to
Because of all these issues we had to transfer our project
be coded using JAVA as the programming language and
Eclipse as the tool, using plugins like GWT (Google Web to the PHP Fog cloud which supported on click
Toolkit) and GWT Designer. However we faced certain issues deployment of PHP applications. We also had to limit the
which we have stated below: scope of our project and hence narrowed our project
develop a Single Automated Integrated System which
Toolkit/Language/Framework/Programming provides dynamic application Scalability and is specific
Language specific coding work needed to be done in to the health of livestock. The main features of our project
order to deploy the application on well known “The CattleShed” were : To provide intelligent daily
providers like Google App Engine, Azure, Amazon monitoring capabilities for farmer‟s livestock by sending
EC2 and Salesforce. For example : in order to deploy SMS regarding data obtained from RF tags, To provide
the application on the Google Cloud one could code vaccination schedule(via alerts) to farmer based on age of
only in Python or Java as the Google Cloud does not cattle, enable a virtual market space where farmer can
offer hosting facilities to applications written in other obtain DETAILS(only) about the buying and selling of
languages . Also very specific web development cattle. Also the data collection/retrieval part is automated
toolkits like GWT(Google web Development by providing an easy form to the farmer which requires
Toolkit) for coding in Java , very specific bare minimum knowledge of the computers.
frameworks like Zend, Django for coding in python
and API‟s like The Simple Cloud API have to be
used to create the application.
VI. IMPLEMENTATION STRATEGY
Although we did try to use language conversion tools
like the Quercus Engine which translates PHP code As we are unable to use RF tags, because of the lack of their
in to Java, they errors that occurred during the availability, we shall be simulating the whole procedure. The
deployment phase were beyond our comprehension. data from the RF Tags is transferred to a server through a
tower. Whenever the livestock which is tagged comes within a
We were unable to use the facilities on on-web distance of 15 miles or so of the tower , it extracts whatever
coding and deployment which are given by the Cloud data is there within the RF Tag and stores it in a database .We
Providers as they demanded a high speed internet have written a code that sends this data from the towers
connection. For example: Salesforce.com provides a remote server to the cloud‟s database through an internet
complete platform to the user to develop his connection . This data is then analyzed every 30 minutes for
application on the site and deploy it directly. any anomalies using the computing resources offered by the
cloud. A code snippet for one of the above functionalities i.e.
Due to lack of computing resources we were unable monitoring a cattle‟s respiration is below
to match up to the complex requirements of coding
for the Google Cloud as the plugins and toolkits
which are required for writing Cloud based if($respiration>60)
{
applications demand high end systems . For example $qry4="select*fromcattle where rfid='$rfid'";
: when we were developing the application for the $result4=mysql_query($qry4);
while($row4=mysql_fetch_array($result4))
{ MYSQL Database to the gateway. Apart from using RF tag
$farmerid1=$row4['farmerid'];
$qry15="select * from farmer where we have also developed an entire data retrieval mechanism in
farmerid='$farmerid1'"; the form of a website. Using this website the farmer will fill in
$result15=mysql_query($qry15);
$row15=mysql_fetch_array($result15); his own details and his cattle‟s details. We have developed a
$farmerid2=$row15['farmerid']; system which provides the farmer an sms alert for the
$mobilenumber=$row15['mobilenumber'];
$name=$row4['name']; vaccination cycle of the cattle hence the cattle will not miss
try any important vaccination and the farmer can know exactly
{
$gt = new Trans();
what vaccine to give his cattle and when. Apart from all this
$trans=$gt- we have also developed a virtual cattle market place where
>translate('en_to_hi',$temp3); cattle can be put on sale .we are not providing a platform for
echo $trans;
$qry61="insert into buying or selling, but we are providing contact details and
ozekimessageout those cattle which the farmer wants to sell. Using the search
(receiver,msg,status)values('
$mobilenumber','$trans','Send option the farmer can run a region specific, cattle specific
') "; search in the marketplace and get the details of the cattle
mysql_query("SET NAMES
'utf8'"); which he intends to buy and contact the owner of the farmer
$result61=mysql_query($qry61); with the farmer details that we are providing on our website.
}

Code Snippet for RF Tag Data Analysis Apart from this we are using RSS feeds provided by sites and
using these feeds to inform farmers through mobile alerts
Once the data is analyzed and if any problems are found with about hazards. We have coded the project primarily in PHP
any of the live stock then the farmer is notified about his and we might use the Joomla CMS for the project and we are
respective cattle through an sms alert which we are sending using PHP Fog as the cloud platform. Apart from hosting the
using the Ozeki NG gateway . site on a cloud we are also planning to host the website on the
existing system, VPS (virtual private server), which will help
us in the analysis between the existing system of VPS and
emerging system of the Cloud. If there is any problem on
deployment on PHP Fog then we shall put our resources on
deploying the application on the cloud which has been created
in DA-IICT. Also the data that we are obtaining from the RF
Tags is dummy data as we have been unable to obtain any
original RF tags. However this data has been generated after a
lot of background reading on how data is stored in the tags
and what data types are stored in the tags.

VII. COMPARATIVE ANALYSIS

We are providing a new dynamic infrastructure to the farmer


for managing livestock, but during the tenure of the project we
came across a variety of cloud service providers. We also did
an analysis between the existing system of VPS (Virtual
Private Server) and the Cloud Service Providers using our
application, to show why our application is better deployed on
the Cloud.
Fig. 7
Analysis of various Cloud Providers:
Sms which is sent to the farmer if cattle is having a respiration problem
The cloud platform sudden outburst into the IT industry is
The Ozeki NG gateway is connected to the database of the based on 3C‟s:
cloud by using a MYSQL ODBC service which connects the
Capability: It is a new technology offering users NA It offers on-demand scalability of
computing resources.
something new and different.
Convenience: It helps simplify the user experience. Controllable at our end Is a shared environment with little
control over the environment
Cost: It reduces cost greatly. /upgrades, etc.
Google App PHP Fog Force.com Amazon EC2
It will be a virtualized 'slice' of a The general cloud concept is of a
Engine
physical server. It will act much like system that is highly scalable and not
Technology PaaS PaaS(Platfo PaaS Provide it was its own server, with allocated dependent on one physical server, so
model (Platform as rm as a (Platform as Infrastructur RAM, Disk and CPU. However if it's redundant from hardware failure.
a Service) Service) a Service) e as a that physical server fails, then all the You won't experience downtime if
Service virtual servers on it will be offline one server goes down, while if a
Environment Python/Java PHP Force.com Based on until it's repaired. dedicated server goes down, and
application supported Virtual your VPS is hosted there, expect
servers. servers downtime.
Hosted Intended for Intended Enterprise Build, Does not have an automatic failover Has an automatic failover process.
application developers. for application migrate process. If the VPS fails, you have to So if physical server fails, your
environment Innovative applications framework. applications wait for it to get running again or virtual server can be reprovisioned
prebuilt built on Supports from other purchase another VPS. automatically on alternative
applications. PHP. large scale platforms. hardware.
Rapid host it on SaaS Familiar NA Massively huge up scaling and
deployment. cloud with Development development downscaling can be done as per the
easy one- . model. requirement of the user.
click Scales
deployment rapidly.
Capability User can use Works Simple drag Based on the
large pool of perfectly and drop capability of
Why “The CattleShed” is better off on the Cloud:
resources with option aids Amazon‟s –
provided by existing user to build Elastic There are 20 million livestock in Gujarat out of which around
Google PHP apps faster Compute 7 million is cattle. There are 1 million members in the milk
applications Cloud(EC2)
like-
cooperative society of Gujarat. Out of these 1 million
Joomla, members, there are around 1 lakh farmers who own around 20
Drupal cattle each. We are assuming that out of these farmers around
Convenience Provides Provides Faster and The user use 2000 are registered on our website. Thus the database would
hosting like a most suited web services hold the data of around 40000 cattle. We are running a daily
capability to dedicated for PHP interfaces to health monitoring system for each cattle that is registered. The
the user in server to based launch
specific each app application instances heartbeat, blood pressure, respiration rate, temperature and the
created by to be with varied location of each cattle is monitored on a 30 minute basis.
the user deployed OS Based on this data, there would be 5 queries being executed
Cost Pay per use Pay on per SLA based Monthly every 30 min on 40000 cattle. And apart from that there would
server basis cost subscription be 19.2 million records being added to the database every day.

VPS Hosting vs. Cloud Hosting: Currently the specification of the system that the application is
being tested on is 1.6 GHz INTEL R CPU, 512 MB RAM and
VPS HOSTING CLOUD HOSTING 40 GB SATA I disk. When the queries were carried out on
It is based on a single server which It is based on a cloud of servers. this system for mere 100 cattle every 5 seconds, and kept on
can create multiple containers for a whole day, the mysql database phpMyAdmin crashed.
It is a method of dividing a server It is a style of computing in which When we fired up the Database again, not a single entry could
such that each piece is allowed to act dynamically scalable and often be found because all the data got dumped. The disk on which
as a virtual dedicated server. virtualized resources are provided as
a service over the Internet.
the data was stored is a RAID disk and we were unable to
retrieve the data. After intensive data mining we saw that the
database crashed because of the number of queries being
Cheaper than the cloud but if your Cloud is more expensive, but more
VPS goes down so does you reliable. You won't experience executed on the system were too heavy for the system to
application or website downtime if one server goes down, sustain thus crashing the system. Although there was more
while if a dedicated server goes than 15 GB data free on the hard disk the data got dumped and
down, and your VPS is hosted there, could not be retrieved. Hence if the application was hosted on
expect downtime.
a VPS with the data that we are assuming then it the VPS
VPS gives you flexibility of using Cloud gives you benefit of using
would most definitely crash.
only one server through local storage scattered resources through many
servers & always keeps your website When the system crashed we figured out that we didn‟t need
up. more hard disk space. We didn‟t even need a very high speed
internet connection. All we needed was a fast processor (or
various fast processors acting as one i.e. a cloud) and more ACKNOWLEDGEMENT
RAM, which PHP Fog, Google App Engine provide free of
cost for the first 6 months of application deployment. Apart
We wish to acknowledge Professor Sanjay Chaudhary for the
from that if we wanted to upscale the application i.e. if more
initial concept of this project and for keeping us well informed
farmers were to register on our website than we expected, then
and on track for all this time , Mr. Ramesh Singh (NIC) for
all we would have to do is to change our plan, or pay extra for
help in understanding and analyzing the cloud , and Mr.
whatever resource out of Horsepower (Computing Power and
Vikash Kumar for his valuable inputs during the course of the
RAM), Disk Space or Bandwidth whichever was more
project.
important. There would be no downtime on our servers hence
the existing users on the system would not face any
inconvenience. And since we are running a health monitoring
system, no failures is one of the main focuses. The cloud REFERENCES
along with reliability provides scalability, is cost effective and
our application being a more query intensive application
would benefit more if it was hosted on a Cloud. [1] C. Rolim, F. Koch, C. Westphall et al, A Cloud Computing Solution for
Patient's Data Collection in Health Care Institutions, 2010 Second
International Conference on eHealth, Telemedicine, and Social Medicine
10.1109/eTELEMED.2010.19

VIII. CONTRIBUTIONS [2] M. Hori, E. Kawashima, T. Yamazaki, Application of Cloud computing


to Agriculture and Prospects in Other Fields, Fujitsu scientific and technical
journal. [Pages 90-95]
The team comprises of two members. It was a very combined
and concentrated effort by the tem to develop the application [3](2010) The PHP Fog website [Online], 25/04/2011
„CattleShed‟. The workload was shared throughout the project https://www.phpfog.com/
between the team members but more expertise in certain fields [4](2010)RF tag information website [Online], 18/04/2011
helped in great way – with Shiroy contributing extensively http://www.informationweek.com/news/global-
during the coding phase and Shantanu with the cio/showArticle.jhtml?articleID=17300330
documentation/designing. It was a joint effort to build the
[5] N. Chohan, C. Bunch, S. Pang, C. Krintz et al. Cloud Computing, Lecture
application in the best way possible with many constraints – Notes of the Institute for Computer Sciences, Social Informatics and
time, limited knowledge of the vast and encompassing field Telecommunications Engineering, 2010, Volume 34, 2, 57-70, DOI:
and the technological restrictions. 10.1007/978-3-642-12636-9_4

[6] (2008) SMS gateway provider website [Online], 04/04/2011


http://www.visualgsm.com/index.htm

IX. CONCLUSION AND FUTURE WORK [7] T. Matters, Cloud Computing and Healthcare, Global Science &
Technology Forum, Pages: 26-29
In short, our application would deliver an integrated [8](2009) E-lanka homepage on milking cows website [Online], 07/04/2011
telemedicine cum information service for farmers and their http://www.edairylanka.lk/
livestock. It would simultaneously automate the process from
data collection to information delivery as a cloud utility. There [9] (2011) VPS hosting comparison with Cloud, website [Online], 20/04/2011
http://www.bodhost.com/web-hosting/difference-between-vps-and-cloud-
are practical advantages in the implementation of the project server-hosting/
since it is cost-efficient, provides real-time data processing,
and is always available. It eliminates the error prone approach [10] J. Peng, X. zhang, Z. Lei et al., Comparison of Several Cloud
Computing Platforms, 2009 Second International Symposium on Information
of manual collection of data and thereby easing the
Science and Engineering 10.1109/ISISE.2009.94
deployment process. The code has also been written in a very
flexible manner and hence more features can be added to the [11] Jaatun, Martin Gilje; Zhao, Gansen; Rong, Chunming (Eds.), First
site at any time. We can add lot of features like predicting a International Conference, CloudCom 2009, Beijing, China, Lecture Notes in
Computer Science, Vol. 59311st Edition., 2009, XX, 707 p.
milking animal, add information about artificial insemination,
provide an actual platform to trade cattle and make a mobile [12](2010)Agriculture webpage on vaccination schedule for cattle [Online],
website which would assist farmers who have only mobile 16/03/2011
phones. Our application leverages other health related http://www.indg.in/agriculture/animalhusbandary/vaccination-schedule-for-
institutions to use services as SaaS. Thus, through “The dairy-cattle/
CattleShed” we realized our aim of using ICT tools for the [13](2011)Ranch Management Software [Online], 28/03/2011
betterment of the society by assisting farmers to monitor the http://www.cattlemax.com/
health of their cattle.
[14](2011)VPS vs. Cloud Forum [Online], 20/04/2011
http://forums.digitalpoint.com/showthread.php?t=1360015/
Appendix-A

Postal
address city
code

Mobile
number
state
age

country

name
Cattle
number
Farmerid

Password photo

Username
Farmer Owns

type breed age


Blood location
pressure price
weight
respiration
heartbeat rftag
horns
type
name
temperature auction
Mobile
number
photo
rfid

Rftag Has_tag Cattle

Receive
Send time reference
time
message
status

receiver
msgtype

Sender operator

id errormsg

Ozeki
message
out

Fig. 1
ER Diagram

Vous aimerez peut-être aussi