You are on page 1of 64

Tiace

Anuioiu softwaie anu client-seivei aichitectuie


Pioject iepoit

Ivan Antipov
BSc Computei Science
0niveisity College Lonuon

!"#$%&'(()&




This iepoit is submitteu as pait iequiiement foi the BSc Begiee in Computei Science
at 0niveisity College Lonuon. It is substantially the iesult of my own woik except
wheie explicitly inuicateu in the text.

The iepoit may be fieely copieu anu uistiibuteu pioviueu the souice is explicitly
acknowleugeu.
2
Abstiact
This iepoit will concein the uevelopment of *#+,-, a mobile platfoim uesigneu foi
inputting tiacking uata anu obtaining maiket piices on a given piouuct. The client
softwaie is baseu on !./#0$/, an open-souice mobile platfoim. The iuea foi the
application oiiginateu fiom the Faii Tiacing pioject
1
, which aims to 123""0#4&546$,+%&
*#+/-& 78& $9"%-9-.4$.:& ;*& 4#+,<$.:& +./& 4#+,$.:& 4-,6.0%0:$-2& $.& 23""%8& ,6+$.2& 40&
"#0=$/-&,0.239-#2&+./&"#0/3,-#2&>$46&-.6+.,-/&$.?0#9+4$0.@
2
.
The system involves a client-seivei aichitectuie, anu one-way synchionisation of
uata ovei BTTP
S
. The tiacking is uone with the use of 072-#=+4$0.2, a teim uesciibing
a piecise location, time, textual uesciiption, anu an image associateu with a single
point along the piouuct's jouiney. 0bseivations can be cieateu eithei manually oi
automatically ovei a uistance peiiou specifieu by the usei.
The system obtains anu uisplays latest maiket piices on the tiackeu piouuct, anu
ieceives coueu text messages that can eithei input an obseivation, oi iequest the
maiket uata. The client application is uesigneu with a computei-illiteiate usei in
minu, anu peifoims a bulk of its activity autonomously. Lastly, the system accounts
foi limiteu connectivity in the taigeteu aieas, anu has a way of saving its state foi
futuie uploau.
It has been iuentifieu fiom the stait that the softwaie will be in a piototype stage
upon submission, anu will not be testeu on a physical Anuioiu uevice.

1 www.faiitiacing.oig
2 http:web4.cs.ucl.ac.ukstaffC.Wallentafaiitiacingblog.page_iu=2
S Bypeitext Tiansfei Piotocol


S

!"#$%&'(&)'*!%*!+&
),"-!%.&/ 0*!.'12)!0'*33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 4
1.1 AINS ANB u0ALS ................................................................................................................................................. S
1.2 NANAuENENT..................................................................................................................................................... 6
),"-!%.&5 #")67.'2*1&0*('.8"!0'*33333333333333333333333333333333333333333333333333333333333333333333333333333333 9
2.1 TBE FAIR TRACINu PR0}ECT............................................................................................................................. 7
2.2 TARuET 0SER A0BIENCE ................................................................................................................................... 8
2.S PREvI00S RELATEB W0RK B0NE 0N BEBALF 0F FAIR TRACINu............................................................... 9
'ABAC&D-7E7+2-/&4#+,$.:&"#04048"- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA )
),"-!%.&: (%"!2.%+&';%.;0%<333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 /=
S.1 REQ0IRENENTS BEFINITI0N.......................................................................................................................... 1u
S.2 REQ0IRENENTS ANALYSIS.............................................................................................................................. 11
BA'AC&*6-&"#0/3,-#F2&"-#2"-,4$=-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CC
BA'A'&!./#0$/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA C'
BA'AB&G07$%-&4-%-"60.8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA C'
BA'AH&*#+,<$.:&"#0/3,42 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CH
BA'AI&J0..-,4$.:&40&2-#=-#AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CI
BA'AK&!340.09032&0"-#+4$0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CI
),"-!%.&> +?+!%8&".),0!%)!2.%&"*1&1%+07*333333333333333333333333333333333333333333333333333333333333333 /@
4.1 SERvER APPLICATI0N...................................................................................................................................... 16
HACAC&L+=+&M-#=%-42&+./&*09,+4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CK
HACA'&M-#=-#E2$/-&,%+22&/$+:#+9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CN
HACAB&O+4+&4#+.2?-# AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CN
HACAH&O+4+&240#+:- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA CP
4.2 CLIENT APPLICATI0N ...................................................................................................................................... 19
HA'AC&Q;&/-2$:.&+./&%+8034AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA C)
HA'A'&R72-#=+4$0.2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA '(
HA'AB&!,,-22&40&9+#<-4&/+4+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 'I
HA'AH&*-S4&9-22+:$.:&2-#=$,-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 'N
HA'AI&Q2-#&T#-?-#-.,-2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BB
HA'AK&U04$?$,+4$0.2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BB
&
4
),"-!%.&4 !%+!0*7 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 :>
S.1 T00LS................................................................................................................................................................. S4
S.2 0SER L0uuINu.................................................................................................................................................. S6
S.S TESTINu TBE NAIN FEAT0RES....................................................................................................................... S7
IABAC&V-,0#/$.:&072-#=+4$0.2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BN
IABA'&R74+$.$.:&9+#<-4&/+4+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BP
IABAB&T#0,-22$.:&MGM&#-W3-242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BP
),"-!%.&@ +288".?&"*1&(2!2.%&1%;%$'-8%*!3333333333333333333333333333333333333333333333333333333333 :A
6.1 S0ITABILITY 0F P0RP0SE............................................................................................................................... S9
6.2 EvAL0ATI0N..................................................................................................................................................... 4u
6.S ACBIEvENENTS ................................................................................................................................................ 42
KABAC&*-,6.0%0:$,+% AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA H'
KABA'&T#0X-,4&9+.+:-9-.4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HB
6.4 F0T0RE BEvEL0PNENT.................................................................................................................................. 4S
KAHAC&Y-.-#+% AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HB
KAHA'&*#+,<$.:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HB
KAHAB&G+#<-4&/+4+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HB
"--%*10)%+& 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 >>
7.1 uL0SSARY.......................................................................................................................................................... 44
7.2 0SE CASES.......................................................................................................................................................... 46
7.S SYSTEN NAN0AL.............................................................................................................................................. S1
NABAC&M-#=-#&$.24+%%+4$0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA IC
NABA'&J%$-.4&$.24+%%+4$0.&Z0.&-93%+40#[AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA IC
NABAB&J%$-.4&,09"$%+4$0.&?#09&203#,- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA I'
7.4 0SER NAN0AL................................................................................................................................................... SS
7.S TBE ENTIRE FAIR TRACINu BATABASE........................................................................................................ S6
7.6 SANPLE NARKET BATA INP0T....................................................................................................................... S7
NAKAC&QMO!&?#3$4&+./&=-:-4+7%-&"#$,-2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA IN
NAKA'&\+600&]$.+.,-&,0990/$4$-2&/+4+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA IP
7.7 C0BE LISTINu.................................................................................................................................................... S8
7.8 PR0}ECT PLAN................................................................................................................................................... S9
7.9 INTERIN REP0RT.............................................................................................................................................. 62
.%(%.%*)%+& 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 @>

S

CBAPTER 1 INTR0B0CTI0N
1.1 Aims anu goals
The iuea oiiginateu fiom biowsing existing technology built on behalf of the
Faii Tiacing pioject; the web-baseu tiacing piototype (fully uesciibeu in section
2.S.1) pioviueu an inteiesting implementation, but the uatabase was limiteu to
2 entiies anu theie weie little means of inputting location- anu piouuct-ielateu uata.
The iest of the functionality was conceiveu when stuuying the pioject's cause, anu
uiscussing potential uevelopment with its iepiesentatives. 0ltimately, the piogiam
aims to combine functionality neeueu foi the pioject's opeiation in a hassle-fiee
mannei, anu to make it accessible to someone with little to no expeiience with
computei systems.
The oiiginal plan was to use the Anuioiu uevice stiictly as a platfoim foi uata input,
wheie the piouuceis may entei infoimation on theii piouucts, waiehouse locations,
batches of piouuce to be tiansfeiieu, etceteia; eaily veisions of the application show
this kinu of functionality. Bowevei, aftei some uelibeiation an obvious question
aiose as to why use an expensive Anuioiu uevice at all foi this task, when the same
coulu be achieveu with a stanuaiu web-baseu content management system,
accessible anywheie.
If an Anuioiu uevice weie to be useu, it woulu be wasteful not to take auvantage of
the platfoim's haiuwaie capabilities, e.g., a uPS ieceivei; the fact that it is also a
phone pioviueu inteiesting uevelopments that aie fully uesciibeu in Chaptei 4.
Theie aie a numbei of technological anu oiganisational skills involveu in builuing a
softwaie pioject, anu the piocess piesenteu with an oppoitunity to fostei such skills
- fiistly, to leain a new platfoim that will likely finu its way to the top of the mobile
segment within the next few yeais, along with an aiiay of client-seivei technologies
associateu with the system; seconuly, to get a chance to woik with a ieal pioject that
6
conceins a chaiitable cause; thiiuly, to cieate a founuation foi futuie uevelopment of
actual Anuioiu-baseu haiuwaie with the inputting anu tiacing functions built in it.
1.2 Nanagement
Bue to the amount of new skills that hau to be obtaineu in oiuei to pioceeu with
uevelopment, most notably Anuioiu, }ava Seivlets anu BTTP, some time hau to be
allocateu in oiuei to leain those technologies. It was latei founu that the moie
efficient way was to leain a technology on an +/&60,& basis, coveiing only the bits of
functionality iequiieu by the task at hanu iathei than attempting to leain eveiything
at once. Foi this ieason, it was pioblematic to scheuule piogiess effectively, because
it was not known how long a function that utilises pieviously unknown technology
woulu take to uevelop. Foi instance, the implementation of BTTP tiansfei took moie
time than oiiginally intenueu, anu the mapping functions less.
Because of this, in auuition to a ielatively slow stait anu a ceitain lack of cieuible
iueas it was ueciueu to auheie to !:$%- (see ulossaiy) piinciples when conceiving the
pioject's aims; this somewhat iesulteu in weak oiganisation, as having no cleai
fiamewoik affecteu motivation levels anu iesulteu in iathei patchy piogiess.
Bowevei, most of the iueas weie iuentifieu fiom the stait, along with a iough
scheuule of theii implementation.
Anothei cause of slow initial piogiess was an ambition to implement the
functionality as close as possible to ieal life; that is, in auuition to ongoing
coopeiation with the Faii Tiacing pioject, the initial plan was to establish contact
with logistics opeiatois, supplieis, piouuceis, etceteia, until it was iealiseu that
theie was insufficient time foi those contacts to be fiuitful anu without those
contacts anything the application uoes cannot be a full iepiesentation of ieality.
It was planneu to obtain infoimation on supply chains fiom the Faii Tiacing pioject,
but uue to othei commitments its membeis weie eithei unavailable oi unwilling to
pioviue specific instiuctions on how they woulu like the application to peifoim.

7
CBAPTER 2 BACKuR00NB INF0RNATI0N
2.1 The Faii Tiacing pioject
Faii Tiacing (www.faiitiacing.oig) is an EPSRC
4
-funueu pioject that aims to biiuge
an infoimation gap between the consumeis in the 0K anu othei Westein countiies
anu piouuceis in the ueveloping woilu. It intenus to uo so by tiacing uata about
specific piouucts fiom theii oiigin to the place of consumption anu then piesenting
it to the customeis. The uata will ultimately ueciue the "faiiness" of a specific
piouuct anu will theiefoie help people make moie ethical puichasing choices.
The applications of the Faii Tiacing pioject aie numeious. To the piouucing siue, the
extensive uatabase eventually built aiounu tiacing ioutes of millions of piouucts
woulu pioviue an inuispensable souice of maiket uata, to be ieceiveu in a wiue
iange of foimats - fiom a usei-uiiven text messaging seivice to full-featuieu web
applications. This will allow piouuceis to sell piouucts on best teims, by ieuucing
the numbei of inteimeuiaiies anu finuing the lowest-cost uealeis.
To the consumei siue, this will give an unbiaseu opinion on the tiue benefit of
buying Faiitiaue piouucts, pioviue uetaileu infoimation about specific items anu
piomote competition thiough infoimational enlightenment. The pioject unueilines
the giowing attituue shift in the Westein society towaius openness of uata, faii
competition, "gieen" piouucts anu a concein foi woikeis' conuitions in the
ueveloping woilu.
Faii Tiacing have been actively liaising with vaiious mobile telecom companies anu
othei IT piojects; foi instance, one has uevelopeu a baicoue iecognition system that
coulu potentially be auapteu to consumei uevices.


4
Engineeiing anu Physical Sciences Reseaich Council
8
2.2 Taiget usei auuience
The intenueu useis of the application aie: the Faii Tiacing iepiesentatives,
expoiteis anu uistiibutois, anu piouuceis in the countiies the Faiitiaue Founuation
woiks with. 0ne of the obvious caveats in taigeting the ueveloping woilu is the
availability of basic iequiiements of the system's opeiation - such as a wiieless
Inteinet connection, a uSN connection, oi electiicity. Even though the pioject uoes
not concein haiuwaie-ielateu pioblems, such as inclusion of solai-powei chaiging
featuies, it uoes auuiess some of those pioblems in softwaie, a full uesciiption of
which can be founu in Chaptei 4. It shoulu also be noteu that, iealistically, the pioject
is uesigneu foi futuie states of connectivity anu the population's computei liteiacy -
iepoits of a booming mobile segment in the taigeteu aieas have been aiounu foi
yeais |1uj anu theie is no ieason to believe that this tienu will not continue.

9
2.S Pievious ielateu woik uone on behalf of Faii Tiacing
2.S.1 Web-baseu tiacing piototype
Bevelopeu by vishal Shah anu Auel Baiuei of 0CL Computei Science uept. |Sj, it
pioviues an inteiface that uepicts a piouuct's jouiney fiom its inception to
consumption, along with multimeuia anu textual uata associateu with it. The same
uatabase was utiliseu in this pioject, with the intention of biiuging the two
applications togethei.


(BCDEF&/3&!GF&(HBE&!EHIBJC&KELMLMNKF&OHK&PFMHBQBJC&H&KELPDIMRS&TLDEJFN&U:V&
1u
CBAPTER S FEAT0RES 0vERvIEW
S.1 Requiiements uefinition
^& *6-& "#$0#$48& %+7-%2& G_& M_& J_& D& 24+./& ?0#& 19324& 6+=-@_& 12603%/& 6+=-@_& 1,03%/& 6+=-@_&
1>03%/&%$<-&40&6+=-@&46-&#-W3$#-9-.4_&#-2"-,4$=-%8A&
;O& O-2,#$"4$0.& T#$0#$48^&
! )QBFJM& !
C1 Pioviue means foi inputting uata into the system fiom a basic
mobile phone with SNS functionality
S
C2 Synchionise peiiouically with a 0K-baseu seivei N
CS Pioviue access to maiket uata on the uevice anu mobile phone C
C4 Pioviue uPS tiacking technology that collects uata about the
piouuct's location, anu obseivation's time anu uesciiption
S
CS Pioviue means foi cieating images associateu with the
obseivation anu uploauing them to seivei
W
C6 Biaw a map uetailing a piouuct's jouiney W
C7 Pioviue technology accessible to a computei illiteiate usei N
C8 The system shall iun as autonomously as possible S
C9 The obseivations shall be iecoiueu automatically S
C1u The obseivations shall be iecoiueu manually, anu incluue a
location, uesciiption, anu an image
C
C11 The system shall save its state if theie is no Inteinet connectivity
available
N
& +FEWFE& &
S1 The seivei shall suppoit }ava Seivei Pages N
S2 The seivei shall use a NySQL uatabase to stoie 0bseivation uata N
SS The seivei shall ietuin piouuct-ielateu uata at the uevice's
iequest




11
S.2 Requiiements analysis
S.2.1 The piouucei's peispective
The fiist majoi challenge in softwaie uesign was to unueistanu the context in which
it was to be useu. Let's consiuei the following scenaiio:
L02-&T-#+%43&$2&+&29+%%&7+.+.+&"#0/3,-#&$.&46-&O09$.$,+.&V-"37%$,A&`-&9+<-2&
X324& -.03:6& 90.-8& 40& 23""0#4& 6$2& ?+9$%8_& 20& 46-#-& $2& %$44%-& #009& ?0#& 32$.:&
+/=+.,-/& 4-,6.0%0:8& $.& 6$2& %$.-& 0?& 732$.-22A& *6-& 0.%8& 4-,6.0%0:8& >$/-%8&
+=+$%+7%-&$.&46-&+#-+&$2&907$%-&4-%-"60.8&+./&MGM_&+./&9024&0?&L02-F2&>0#<-#2&
+#-&-W3$""-/&>$46&7+2$,&907$%-&"60.-2A&
]0#43.+4-%8_& 46-& ]+$#& *#+,$.:& "#0X-,4& 6+=-& #+$2-/& ?$.+.,-2& ?#09& ,6+#$4+7%-&
/0.+4$0.2_& ,0%%+70#+4$0.& >$46& D-24-#.& 23"-#9+#<-42& +./& 46-&
]+$#4#+/-&]03./+4$0._& +./& 46-8& +#-& >$%%$.:& 40& 0??-#& L02-& +& 907$%-& ,09"34$.:&
/-=$,-&46+4&,+.&2-#=-&+&#+.:-&0?&"3#"02-2_&?#09&+,,03.4$.:&40&074+$.$.:&%+4-24&
9+#<-4&/+4+A&;.&#-43#._&46-8&>+.4&6$9&40&<--"&4#+,<&0?&6$2&"#0/3,-&+./&$."34&
4#+,$.:&/+4+&$.40&46-&/-=$,-_&>6$,6&$2&28.,6#0.$2-/&>$46&+&QaE7+2-/&2-#=-#A&
*6-& #-+20.& >68& ]+$#& *#+,$.:& >+.4& 46-& /+4+& 40& 7-& :+46-#-/& $2& 40& "#0=$/-&
D-24-#.& ,0.239-#2& >$46& -.6+.,-/& $.?0#9+4$0.& +7034& 46-& "#0/3,4F2& 0#$:$.&
+./&]+$#4#+/-F2&$.=0%=-9-.4A&
The above vaiiables may uiffei, but let's set out the following assumptions with
which the taiget softwaie was to be uesigneu:
A faiming oiganisation, oi a co-opeiative, will have access to an auvanceu
mobile uevice;
The uevice will be locateu in an aiea that has both Inteinet anu uSN
connectivity;
Nobile phones aie wiuely useu in the aiea.


12
S.2.2 Anuioiu
Now let's take look at Anuioiu, anu the ieasons why it was chosen as the client
platfoim foi this pioject:
Anuioiu is a ielatively new playei in the mobile inuustiy, but it is iapiuly
gaining suppoit in the softwaie uevelopment ciicles;
Its softwaie is wiitten in }ava, peihaps the most commonly useu language
touay with suppoit of thousanus mouules, extensions, anu pages of
uocumentation;
It's open, Linux-baseu, anu gives uiiect access to haiuwaie, meaning that
"the only limitation is imagination" in uesigning Anuioiu softwaie;
uoogle has maue steps to cement the platfoim's ieputation among
uevelopeis anu ensuie its futuie uevelopment - steps such as piouucing
iegulai upuates to the SBK anu founuing the 0pen Banuset Alliance |7j;
Because of the system's openness anu flexibility it's easy to piouuce a
buuget Anuioiu-baseu uevice to be solu in the taigeteu aieas - the ueciuing
factoi of choosing Anuioiu ovei the closeu iPhone fiamewoik that pioviues
a similai set of featuies.
0nfoitunately, the fact that Anuioiu fiist came to light only a couple of yeais ago
piesenteu a challenge; some of its functions weie still pooily uocumenteu anu
iequiieu outsiue ieseaich. In auuition, the platfoim has unueigone uiastic changes
befoie the 1.u ielease (at the time of wiiting the veision is 1.1), anu much of the
pieviously wiitten coue accompanying non-official uocumentation hau to be ie-
uone.
S.2.S Nobile telephony
An Anuioiu-baseu uevice can ieceive text messages; in this context it seives as a hub
foi seveial mobile phones in vicinity limiteu only by the netwoik pioviuei's iange of
seivice. The iuea foi this function oiiginateu fiom a uesignei at a Faii Tiacing
woikshop, who saiu, "It's easy to uesign an Anuioiu uevice. It's haiuei to mimic its
functionality on a cheap mobile phone."

1S
The mobile phone useis can senu coueu text messages to the Anuioiu uevice in
oiuei to input piouuct-ielateu uata, oi iequest maiket infoimation, in which case a
iesponse in sent back to the phone. The auvantages of this scheme aie eviuent:
SNS functionality can be founu on viitually any mobile phone that's less
than 2 uecaues olu;
Text messages aie a univeisally accepteu way of communication anu can be
sent by someone with minimal technological skills;
Theie's no neeu foi a S
iu
-paity ieceiving seivice that chaiges auuitional fees,
the only cost is the cost of senuing a message.
Theie aie ceitain limitations, too:
The ieceiving uevice has to be switcheu on anu the application has to be
iunning (the lattei issue was paitly solveu by cieating a backgiounu seivice;
see section 4.2.S foi uetails);
The senuei must be within the iange of seivice of the netwoik pioviuei.
Theiefoie, the following aiiangement takes place fiom the piouucei's point of view:

(BCDEF&53&!GF&IQBFJMXSFEWFE&HEIGBMFIMDEF&YELO&MGF&KELPDIFERS&KFESKFIMBWF&
14
S.2.4 Tiacking piouucts
A uPS-enableu uevice can iecoiu anu stoie tiacking uata, which will ultimately
enable consumeis to tiace each inuiviuual piouuct fiom its point of oiigin, calculate
the numbei of miles tiavelleu, etceteia.
In oiuei to achieve this functionality, theie aie a numbei of complications involveu
in tagging anu keeping tiack of the piouuce. RFIB tags, wiuely useu in supply chain
management, woulu likely seive as the piimaiy technology behinu tagging piouucts,
anu a pioject iepoit |Sj highlights this technology in moie uetail; howevei, theie aie
a numbei of vaiiables that aie not cleai fiom the point of view of a stuuent, such as:
Bow the tagging piocess is uone, when, anu by whom;
What amounts of piouuce aie taggeu simultaneously, anu how to keep tiack
of each inuiviuual piouuct;
Bow to abstiact this infoimation in a ielational uatabase anu implement it
on a mobile uevice.
Those aie laige issues iequiiing an in-uepth investigation into supply chain
management; as mentioneu above, foi the puiposes of this pioject it was ueciueu to
abanuon exteinal ieseaich anu focus on pioviuing the technology foi uata input,
with some compiomises maue in the lack of knowleuge of tagging techniques.
It shoulu be noteu that this veision of the application is by no means final anu can be
expanueu eithei by people with moie knowleuge in the aiea, oi if the authoi
attempts to investigate supply chains in the futuie.
Theiefoie, the following assumptions weie maue in softwaie anu uatabase uesign:
Tiacking is staiteu at the point of the piouuct's inception, anu it is assumeu
that the piouuct has alieauy been piocesseu, soiteu, anu packeu, i.e. it is
ieauy foi consumption;
0ne Anuioiu uevice can only tiack one piouuct at a time;
The Tiace application follows the piouuct along its entiie jouiney, eithei
fiom one physical uevice oi seveial.

1S
The above assumptions follow the stiuctuie of the Faii Tiacing web piototype; its
uatabase also accounts foi only one piouuct type pei piouucei, anu pioviues a single
iuentification tag foi an entiie jouiney. As mentioneu, the same uatabase was useu in
the context of this pioject.
Theiefoie, the system may be iun in the following usage scenaiio: at the point of the
piouuct's packing the piouucei iecoius an obseivation, until it is passeu on to an
expoitei oi a wholesale meichant, who then iecoius obseivations thioughout the
piouuct's jouiney, until the piouuct is solu to a ietailei, who commits the final
obseivation at the point of the piouuct's sale. At any point in-between an
obseivation can be inseiteu by senuing a coueu text message fiom a tiusteu mobile
phone.
S.2.S Connecting to seivei
The application shoulu be able to iecoiu live obseivation uata anu uploau it to the
seivei immeuiately. Bowevei, theie may be heavy connectivity constiains in the
ueveloping woilu, anu the piouuct may tiavel hunuieus of miles befoie ieaching its
uestination. Theiefoie, the system shoulu be able to save its state if the Inteinet is
tempoiaiily unavailable, anu monitoi connectivity options on a continuous basis.
S.2.6 Autonomous opeiation
Because the taiget usei auuience of Tiace may be computei illiteiate, anu those
using the uevice might not be just inteiesteu in inputting Faii Tiacing uata, a bulk of
its functionality shoulu be peifoimeu in the backgiounu. As such, most of the
obseivations iecoiueu on the uevice shoulu be automatic anu not iequiie any usei
input. This is baseu on a usage scenaiio wheie a piouuct tiavels hunuieus of miles,
eithei by lanu oi sea, anu wheie the Faii Tiacing pioject woulu want obseivation
infoimation iecoiueu on a iegulai basis. An option to make a manual obseivation
that incluues textual infoimation anu an image associateu with a paiticulai place is
maue available also.
16
CBAPTER 4 SYSTEN ARCBITECT0RE ANB BESIuN
4.1 Seivei application
4.1.1 }ava Seivlets anu Tomcat
It was ueciueu that the seivei-siue application woulu be built using }ava Seivlets, so
it's easiei to stieamline uevelopment, integiate the client- anu seivei-siue Eclipse
piojects anu to ueciease the task of finuing the iight tools anu instiuctions. This
aiiangement alloweu foi shaiing classes between client anu seivei siues, anu
tiansfeiiing M-#$+%$b-/ (see ulossaiy) objects via BTTP. It uiu, howevei, piesent a
challenge of leaining the technology anu configuiing the Tomcat seivei, on which
the seivei application iuns.
The following }ava classes weie ueployeu on the seivei:
2-#=-#AR72-#=+4$0.M-#=%-4 - this class is iesponsible foi piocessing BTTP
P0ST iequests with obseivation uata - the Seiializeu 0bseivation objects
aie ieconstiucteu fiom }ava ;."34M4#-+92 (see ulossaiy), anu theii uata is
inseiteu into the uatabase.
2-#=-#AT#0/3,4M-#=%-4 - ieceives a P0ST iequest fiom the uevice containing
the uevice's iuentifiei, cieates a Piouuct object fiom the uatabase, anu
stieams it back to the uevice.
,0990.AT#0/3,4 - iepiesents piouuct-ielateu infoimation that is sent to the
uevice foi customiseu maiket uata iequests.
2-#=-#AO7!/+"4-# - a uatabase helpei class that piocesses SQL queiies such
as obseivation inseition, fetching uata, etc.

17
4.1.2 Seivei-siue class uiagiam
The seivlet uiagiams aie not shown because they uo not implement any methous
outsiue the inheiiteu uoPost methou.
4.1.S Bata tiansfei
BTTP was the main means of tiansfeiiing uata between the Anuioiu client anu the
seivei; classes fiom Apache's 644",%$-.4 package weie useu to piepaie, senu, anu
piocess P0ST iequests. Tiansfeiiing messages uiiectly insteau of builuing anothei
abstiaction layei such as a V5M*ful oi a MR!T web seivice (see ulossaiy) was
piefeiieu, because theie was no ieal neeu in the scope of the functionality anu not
enough time to fully unueistanu these technologies.
The tiansfei mechanism woiks as follows: the obseivation uata is packageu into a
Seiializable object, it is then conveiteu to an 0utputStieam anu passeu in a P0ST
(BCDEF&:3&1Z"PHKMFE&HJP&-ELPDIM&IQHSS&PBHCEHOS&
18
iequest; on the seivei siue it is conveiteu back into an object, anu then inseiteu into
the uatabase. An eailiei veision simply passeu uata in 0RL-encoueu foim, but this
was latei abanuoneu in favoui of a moie veisatile anu secuie appioach - the
intiuuei will not have the class specification in an attempt to ie-constiuct an object.
A c+2-KH algoiithm (see ulossaiy) was useu in uata tiansfei as an auuitional
measuie to ensuie uata secuiity anu integiity; the pioject uses an implementation
by Robeit W Baiuei |6j, which was chosen because of its integiation options with
}ava InputStieams.
4.1.4 Bata stoiage
Foi the main centialiseu uatabase, NySQL was chosen foi the ieason of being open
anu fiee, yet poweiful anu secuie enough to waiiant foi enteipiise-class
applications. The following schema iepiesents a poition of the oiiginal Faii Tiacing
uatabase that was applieu in he context of this pioject, with some minoi
mouifications (see Appenuix 7.S):
(BCDEF&>3&!GF&KLEMBLJ&LY&MGF&(HBE&!EHIBJC&PHMHZHSF&DSFP&BJ&MGF&KELTFIM&
device
deviceID INT(11) P D N
productID BIGINT(20) F N
productType
productTypeID INT(11) P N
productName VARCHAR(30)
quantity INT(11)
quantityType VARCHAR(10)
price DECIMAL(5,2)
image TEXT
link TEXT
description TEXT
observation
obsID INT(11) P N A
productID BIGINT(20) U
obsTypeID INT(11) F D N
obsDateTime TIMESTAMP D N
details TEXT
product
productID BIGINT(20) F P D N
productTypeID INT(11) F
producerID INT(11) F
observationType
obsTypeID INT(11) P N A
GPSLon DOUBLE
GPSLat DOUBLE
obsLocation VARCHAR(100)
image TEXT
producer
producerID INT(11) P N
producerTypeID INT(11) F
producerName VARCHAR(30)
producerDetails VARCHAR(30)
country VARCHAR(30)
producerType
producerTypeID INT(11) P N
producerType VARCHAR(30)
typeDetails VARCHAR(30)

19
4.2 Client application
4.2.1 0I uesign anu layout
The oiiginal plan was to builu S uiffeient application piofiles, with the system asking
the usei upon stait whethei (s)he is a piouucei, an expoitei, oi a consumei. Aftei
closei investigation, howevei, it was founu that this aiiangement woulu iesult in
unnecessaiy complications since most of the functions aie inteiveneu in the
S piofiles; foi instance, a piouucei may want to tiack a poition of the piouuct's
jouiney, a consumei - to view an obseivations map, anu an expoitei may check the
latest maiket piices.
Theiefoie, the S main featuies weie biought into a single application, unuei the
coiiesponuing tabs: Naiket uata, 0bseivations, anu SNS iequests; in the next
section these featuies will be highlighteu in moie uetail.

(BCDEF&43&!EHIF&OHBJ&SIEFFJ&
2u
0bseivations
i. Recoiuing obseivations
a. Automatic
In oiuei to achieve automatic iecoiuing functionality, the application shoulu be iun
in the backgiounu, without hinueiing any othei activity peifoimeu on the uevice.
The Anuioiu's M-#=$,- (see ulossaiy) mechanism is iueal foi this task. In Tiace, the
R72-#=+4$0.M-#=$,- class listens to location changes, anu cieates an obseivation
when the location is changeu by an amount specifieu by the usei (ieau moie on
0sei Piefeiences in section 4.2.4). If an Inteinet connection is available, it is
uploaueu to the main seivei immeuiately anu saveu locally on the uevice; if not, it is
simply saveu foi futuie uploau.
b. Nanual
At ceitain points of the piouuct's jouiney, foi instance,
when it aiiives at a majoi poit, the usei may want to
iecoiu moie extensive infoimation about the piesent
location. The system allows saving a shoit uesciiption
of the location anu the obseivation itself; it also allows
cieating an image with Anuioiu's built-in cameia to go
with the iecoiu.
Because the Anuioiu emulatoi uoesn't pioviue uiiect
means of connecting to a 0SB oi any othei exteinal
cameia, the pieview winuow on the testing system
shows a floating iectangle. The figuie on the left is the
image saveu to uisk when captuieu in this fashion; it
appeais to have been taken fiom a Tv sitcom the authoi
is not awaie of.
(BCDEF& 93& 0OHCF& MH[FJ& ZN& MGF&
FODQHMLE&
(BCDEF&@3&8HJDHQ&'ZSFEWHMBLJ&YLEO&

21
(BCDEF&\3&"&OHK&LY&HQQ&LZSFEWHMBLJS&
ii. Bisplaying obseivations
a. 0n a map
A uoogle map uisplaying iecoiueu obseivations
was not oiiginally intenueu since the web-
baseu application pioviues similai
functionality; howevei, it was latei ueciueu that
a visual oveiview of all obseivation points anu
the path tiavelleu coulu make the listing featuie
moie inteiesting, if not useful. The map also
listens to location changes, anu focuses on the
cuiient location shoulu it change by a specifieu
amount. To ieuuce powei consumption this is
only uone when the map !,4$=$48 (see ulossaiy)
is shown.
b. In a list
Auuitionally, the usei may view a list of
obseivations in a sepaiate Activity; upon
clicking on an item in the list, a winuow is
shown uisplaying the uetails of the obseivation,
an image if piesent, anu an auuiess; the lattei is
obtaineu by the #-=-#2-& :-0,0/$.: functionality
built into Anuioiu, which conveits latituue anu
longituue values into a postal auuiess, if one is
founu.
iii. 0ploauing obseivations
An attempt to uploau an obseivation is uone
upon its cieation; when no Inteinet connectivity
is available it is maikeu as "not uploaueu"; eithei
way a local copy is saveu. When the application
is closeu anu then ie-openeu, it seaiches foi obseivations that have not been
(BCDEF& A3& "& QBSM& LY& LZSFEWHMBLJS& ]BMG& MGF& MLK&
FJMEN&SFQFIMFP&
22
uploaueu anu peifoims the uploau if the uevice is online. This is uone in a
backgiounu thieau anu is completely tianspaient to the usei.
iv. Local uata stoiage
Anuioiu's built-in SQLite engine was useu to stoie
obseivation anu text messaging seivice uata locally,
in oiuei foi it to be accesseu on the uevice anu
uploaueu peiiouically to the seivei. A J0.4-.4&
T#0=$/-# (see ulossaiy), the Anuioiu mechanism foi
uata stoiage anu ietiieval, was useu as an extia
abstiaction layei to simplify anu automate SQL
iequests. The oiiginal plan was to use XNL files foi
local uata stoiage, until Content Pioviueis weie
uiscoveieu anu weie shown to have a simplei manipulation stiategy.
v. Class uiagiam
Because of Anuioiu's Activity-centeieu uesign, it's uninfoimative to iepiesent the
application's stiuctuie with class uiagiams; it'u be moie appiopiiate to iepiesent
the flow of Activities as a sequence.
observations
_id INTEGER P A
date LONG
details TEXT
location TEXT
latitude FLOAT
longitude FLOAT
image TEXT
isUploaded BINARY
(BCDEF&/=3&$LIHQ&+^$BMF&
'ZSFEWHMBLJS&MHZQF&

2S
The following uiagiam iepiesents only the 0bseivation class anu its subclasses:
The paient 0bseivation class iepiesents an automatic obseivation cieateu by the
iecoiuing seivice (please see next section). The G+.3+%R72-#=+4$0. subclass auus
the uesciiptive fielus that can be auueu in a manual entiy, anu a
G+.3+%R72-#=+4$0.D$46;9+:- auuitionally incluues a byte aiiay image that is useu
in BTTP tiansfei along with a local file path fiom which it is ietiieveu.
(BCDEF&//3&'ZSFEWHMBLJ&IQHSS&PBHCEHO&
! "#!
$%& '()*(+,(!-%./0.1!
!
!"#$%&'()*'+,-&%.",#'/,0'$123/0",#'/,'34-&%5/."3,'0"/#%/6'
!
Main : Activity ObservationService :
Service
[PREF_AUTO_RECORD]
startService()
ObservationsMap :
Activity
Record an
Observation:
basic course of
action
User
<<actor>>
open application
1. User starts application
2. Application checks automatic
recording preference, if on, start
observation service
3. User opens Observations tab
4. User inputs manual observation
5. GPS location changed
6. User re-opens application
7. Application checks for
unuploaded observations
8. If found, observations uploaded
open observations
Observations :
ContentProvider
InputObservation :
Activity
click on New... button, input data
insert()
query()
onLocationChanged() : insert()
ObservationServlet :
HttpServlet
[connectivity established]
uploadObservation()
open Main activity
query()
[Cursor.getCount() > 0]
uploadObservation()
MySQL database
insert
insert

2S
4.2.2 Access to maiket uata
i. Besciiption
To extenu the application's functionality
beyonu the Faii Tiacing uata input
capabilities, a featuie uisplaying cuiient
maiket piices ielateu to the piouuct being
tiackeu was implementeu. This featuie is
intenueu to be useu by the piouucei, but is
available to any usei of the application.
The natuie of the uata was not ueteimineu
fiom the stait, which is why it was ueciueu
to abstiact fiom what a ieal-life piouucei
might iequiie anu insteau focus on leaining
uata paising mechanisms that may be
implementeu to obtain uata fiom any othei
souice in the futuie.
A plain list of piouuct piices is not
paiticulaily exciting, anu most ueuicateu websites pioviue histoiical uata in a
vaiiety of foims; howevei, the puipose of paising this uata in the fiist place was
to make it available to a usei of a veiy basic mobile phone; this featuie is fuithei
explaineu in the next section.
ii. Souices
Cuiiently, the system suppoits 2 souices of uata:
Repoits on fiuit anu vegetable piices by the 0S Bepaitment of
Agiicultuie, in plain text foimat; the pioject uses piices fiom Lonuon's
New Covent uaiuen maiket (see sample input in appenuix __);
!"#$%&'()*'+,&'-.%/&0'1.0.'0.2'3,45"6#'
7%41$80'"694%-.0"46:'0,&'1.0.:'.61'
423&%;.0"46'3&%;"8&'30.0$3'
! "#!
$ %&''&()*)+,! (-*-! &.*-)/+(! 01&'! 2-3&&! 4)/-/5+6! )/! %78! 0&1'-*9! )/!
:-1*)5;<-16! %&00++! =%>! 0;*;1+,! ?,++! @<&,,-1AB! 0&1! (+<)C+1A! )/! D+5+'.+1!
"EEFG!
)))G 7+H;+/5+!()-I1-'!
J3+!,&0*K-1+!';,*!0)1,*!&.*-)/!)/0&1'-*)&/!-.&;*!*3+!*1-5L+(!:1&(;5*9!)*!(&+,!,&!
.A! 5&//+5*)/I! *&! *3+! '-)/! ,+1C+16! -/(! ,-C)/I! *3+! (-*-! )/! -/! M/(1&)(! *+53/)H;+!
5-<<+(! !"#$%&' ($%)%$%*+%,6! -! 0;<<! (+,51):*)&/! &0! K3)53! 5-/! .+! 0&;/(! )/! ,+5*)&/!
NG"GNG! J3+! 1+-,&/! K3A! O1+0+1+/5+,6! -/(! /&*! -/! 7PQ)*+! (-*-.-,+6! 0&1! )/,*-/5+6!
K+1+!;,+(6!),!.+5-;,+!)*!),!-,,;'+(!*3-*!*3),!L)/(!&0!)/0&1'-*)&/!),!&.*-)/+(!&/<A!
&/5+! ?-0*+1! -<<6! -! 0-1'+1! (&+,/>*! ,K)*53! 01&'! I1&K)/I! &/+! *A:+! &0! :1&(;5+! *&!
-/&*3+1!C+1A!&0*+/B6!-/(!.+5-;,+!O1+0+1+/5+,!:1&C)(+!-!';53!,)':<+1!-/(!0-,*+1!
(-*-!,*&1-I+!'+53-/),'!*3-/!-!(-*-.-,+G!
User <<Actor>>
Obtaining market
data: basic course
of action
1. User starts application
2. Application checks if product
information is saved in
SharedPreferences
3. If not, connects with the main server
and obtains product data related to
the device's ID
4. Displays market data on the product
in the Main Activity
start application
Main : Activity ProductServlet :
HttpServlet
PRODUCT_INFO :
SharedPreferences
[product unknown]
obtainProduct()
saveProductInfo()
MySQL database
query
3rd party data
source
[product recorded]
updateStatus()
!"#$%&'()*'+,-."/"/#'0.%1&-'2.-.'3&4$&/5&'2".#%.0'

27
4.2.S Text messaging seivice
i. Besciiption
As explaineu befoie, the Anuioiu uevice can
seive as a hub foi ieceiving anu tiansmitting
uata thiough text messages. This functionality
can iun without any usei input, which is why
anothei Seivice, !"#!$%&'($, was implementeu
foi its opeiation. The seivice can be contiolleu
in 0sei Piefeiences, anu iuns even when the
main application winuow is closeu. It listens to
all incoming text messages, anu, shoulu one
contain the keywoius uesciibeu below,
piocesses theii input.

ii. Bata stoiage
Auuitionally, a histoiy of iequests is saveu in an
SQLite uatabase contiolleu by a Content
Pioviuei, !"#)%*&'+$%, anu a list of iequests is
shown to the usei unuei the !,!- !$%&'($- tab. In
this list, the application automatically
substitutes the senuei's numbei fiom the
uevice's auuiess book foi his name if such an
entiy is founu.
When woiking with an emulatoi, SNS messages can be sent eithei fiom the
Eclipse IBE with the Anuioiu plug-in installeu, oi by opening 2 instances of the
emulatoi anu senuing fiom one instance to anothei. (The lattei methou was useu
in iequesting maiket uata, in which case the seconu uevice was useu to ieceive
the iesponse.)
!"#$%&' ()*' +,+' -&%."/&' 012' -345"6#' -&%."/&'
-010$-'167'1'3"-04%8'49'%&:$&-0-'
requests
_id INTEGER P A
date LONG
sender TEXT
text TEXT
pending BINARY
!"#$%&'(;*'<4/1='+><"0&'%&:$&-0-'012=&'
28

iii. Auuing an 0bseivation
a. Stiuctuie anu uesciiption
The following foimat is inteicepteu by the seivice:
NEWOBS [device_id] [location]; [details]
Example queiy:
newobs 455 wc1e6bt; university college london
The uevice's IB, although not stiictly necessaiy since the senuei alieauy knows
its phone numbei, seives as a checkei value to soit out non-genuine iequests.
0sing an uppeicase keywoiu is not manuatoiy. The [location] anu
[details] paits aie saveu in the coiiesponuing fielus of the 0bseivation
entiy, shoulu one be cieateu.
Because an 0bseivation must contain latituue anu longituue values in oiuei foi it
to be tiackeu on the map, theie aie ceitain complications when implementing
this featuie on a mobile phone - most phones uo not have uPS ieceiveis, anu
ones that uo aie unlikely to pioviue intuitive means of senuing location
infoimation in a text message.
The main focus in Tiace's uesign, howevei, was on a seamless usei expeiience,
anu on affoiuability of the technology. Theiefoie, a way of finuing a location
without exact paiameteis was iequiieu: the softwaie uses !"#$%#&' ()"*"&+,(
(see ulossaiy) to finu the latituue anu longituue points of the location uesciibeu
in the [location] pait of the message.
This appioach has its uisauvantages; the senuei must uesciibe the location in
uetail, oi else the founu location coulu iepiesent something entiiely uiffeient
fiom what was intenueu. Foi instance, seaiching foi "0CL" ietuins a school in

29
the outskiits of Biussels, not in Lonuon. This is paitly solveu by limiting the
iange of the geocouei's seaich, by a ioughly 1uu-mile iauius fiom wheie the
Anuioiu uevice is locateu.
Shoulu the usei wish to seaich foi an eiioi oi keep tiack of incoming iequests,
all valiu messages aie saveu in an SQLite uatabase anu listeu unuei the
!"!#$%&'()%# tab. Since the geocouei ietiieves its uata fiom the Inteinet, a
possibility of the uevice being offline is accounteu foi; in this case, the uata in
saveu with a "penuing" tag, anu the softwaie goes thiough all taggeu iequests
anu uploaus them as the Inteinet becomes available.
In oiuei to cut messaging costs, the uevice uoes not ieply to an obseivation
iequest whethei oi not an entiy has been auueu.

! "#!
$% &'()'*+'!,-./0.1!
!"#$%&'()*'+,,'-&.'/01&%234"/-'565'%&7$&14',"3#%38'
User
<<Actor>>
New observation
SMS request:
basic course of
aciton
1. Android user starts SMS service
2. SMS is received
3. If message contains device ID:
3.1 If message is a new observation request,
search location

3.1.1 If device is online
If found, save observation
Save request with pending = false

3.1.2 If device is ofine
Save request with pending = true
SmsService :
Service
Sender
<<Actor>>
startService()
send SMS
Observations :
ContentProvider
Geocoder
getFromLocationName()
insertObservation()
SmsRequests :
ContentProvider
saveContent(message, false)
saveContent(message, true)
ALT

S1
iv. Requesting maiket uata
a. Stiuctuie anu uesciiption
MKTDATA [device_id] [comment]
The comment is optional. Example queiy:
mktdata 455
0pon ieceiving this queiy the uevice automatically ieplies with a text message
uetailing cuiient maiket uata on the piouuct tiackeu by the uevice, as uisplayeu
unuei the !"#$%&' ("&" tab. Because the size of an SNS message is limiteu to 6u
chaiacteis, anu to save costs no moie than one message is sent at a time, only the
piouuct soit iecoiueu in the uatabase is queiieu. Foi example, if the uevice is
tiacking Royal uala apples, the !"#$%&' ("&" tab may uisplay extenueu
infoimation on all soits of apples the system can finu, but only uata on the
Royal uala soit is incluueu in the message.
If no uata has been obtaineu, eithei because the uevice is offline oi the seivei is
uown, the message is saveu with a "penuing" tag; as in the case with the
obseivation iequest, the system peiiouically goes thiough all such entiies anu
senus maiket uata as it becomes available.
b. Example iesponse
!"#$%&'()*'+',-%.&/'0-/-'%&1$&2/3%&24562&'
! "#!
$% &'()'*$'!+,-./-0!
!
!"#$%&'()*'+,%-&.'/,.,'0+0'%&1$&2.'/",#%,3'
SMS market
data request:
basic course of
action
1. Android user starts service
2. SMS is received
3. If message contains device ID
3.1 If message is a market data request,
check if market data's been received
3.1.1 If not null, send message with data
Save request, pending = false
3.1.2 If null, save request, pending = true
User
<<Actor>>
Sender
<<Actor>>
SmsService :
Service
startService()
send SMS
Common : class
MARKET_DATA == null ?
sendTextMessage()
SmsRequests :
ContentProvider
saveContent(message, false)
saveContent(message, true)
ALT

SS
4.2.4 0sei Piefeiences
The Anuioiu platfoim pioviues a simple
mechanism foi stoiing usei piefeiences,
!"#$%&' ($%)%$%*+%,. In Tiace, the usei can
specify how often the obseivations shall be
iecoiueu (in miles), anu to contiol the 2
seivices, automatic obseivation iecouing
anu ieceiving text messages.
4.2.S Notifications
The usei is notifieu of backgiounu events
using -.#,/,, the on-scieen messages that
uisappeai automatically aftei a few
seconus. It was ueciueu not to use
Anuioiu's built-in Notification system as it
woulu be too intiusive to aleit the usei of
each new automatic obseivation anu coueu SNS message; this is simply not
necessaiy since the functions uo not iequiie usei input even at the event of
failuie, in which case the iequest is ie-piocesseu at a latei time, as uesciibeu
eailiei.
!"#$%&'()*'+%,-&'.%&/&%&0-&1'2,0&3'
S4
CBAPTER S TESTINu
S.1 Tools
Foi its Anuioiu platfoim, uoogle pioviues a well-put togethei softwaie
uevelopment kit (SBK), a plug-in foi Eclipse IBE, anu a numbei of tools to aiu the
uevelopment. In the light of absence of a physical uevice, the tool most useu in
this pioject was, natuially, the emulatoi:
Auuitionally, the Eclipse plug-in comes with a !"#$%&' !()*+' ,-.%/-0' 1(0$%2(
(BBNS) peispective, which seiveu as the piimaiy testing tool because it incluues
3-+4"/, a logging utility, shows infoimation on cuiiently iunning thieaus, anu
emulates ceitain Anuioiu featuies useu extensively in the pioject, such as
!"#$%&'()*'+,&'-./%0"/'&1$2340%'

SS
senuing SNS messages anu pushing geogiaphical locations onto the uevice. The
lattei functionality is contiolleu fiom the
Location Contiols panel; it can loau a set of
points obtaineu in the uoogle Eaith softwaie
anu expoiteu to a .kml file. With this
methouology, seveial uozen obseivations
spanning half of the woilu can be cieateu anu
testeu in Tiace. Foi the puiposes of this pioject,
2 paths weie testeu; one oiiginating in Accia,
uhana anu enuing in Newcastle, anu one
ciicling aiounu Noith Lonuon; the system
hanuleu them well using manual, automatic,
anu SNS obseivations.
The testing stiategy useu thioughout the couise of the pioject was basic yet
infoimative anu efficient; the majoiity of the testing, uebugging, anu uata
checking was uone thiough !"#$%&, the logging utility. The utility uiviues all log
messages by tags: '()*"+(, ,(*-#, ./0", 1%)/2/#, anu 3))"); auuitionally, theie's
a filteiing mechanism that can uiviue messages by class names in which they
weie geneiateu. In Anuioiu, logging is useu to piint stack tiaces, notify the
uevelopei of the system status changes, anu piint usei-uefineu infoimation.

!"#$%&'()*'+,##"-#'"-'.-/%,"/'

!"#$%&' ((*' 01%2' ,3' 24&' 5567' 8"&9'
:4,9"-#';,<12",-'<,-2%,;:'
S6

This methouology was chosen in favoui of unit testing foi seveial ieasons:
Logging is somewhat moie veisatile since it's possible to check loop
contiol, Activity anu Seivice status, usei piefeiences, etc.;
Theie's an auuitional time oveiheau involveu in wiiting testing classes,
which is not necessaiy as the output values can be checkeu by logging;
Test-uiiven uevelopment wasn't auopteu fiom the stait uue to the
novelty of the platfoim, so theie was little use in wiiting test classes !"#$%
&'($)*.
S.2 0sei logging
The Anuioiu system piints extensive stack tiaces with each teiminal eiioi; in
conjunction with usei logging messages built into the coue this enables to tiack
anu eliminate any bugs oi eiiois that occui in the application.
Examples of usei logging:
Log.d(TAG, "Sort: " + sort + ", name: " + pair[0] + ", type: " +
type);
Log.i(TAG, "Product received: " +
"ID: " + prod.getId() + ", " +
"title: " + prod.getName() + ", " +
"type: " + prod.getType() + ", " +
"producer: " + prod.getProducer() + ", " +
"image: " + prod.getImage() + ", " +
"link: " + prod.getLink());
Log.i(TAG, "Observation added, row URI: "
+ res.toString());
Log.e(TAG, "Unable to parse data: IOException. " + e.getMessage() +

S7
"\nThat means either you're offline, or USDA
5
decided not to " +
"reveal this information anymore, which renders this method " +
"completely useless.");

S.S Testing the main featuies
As mentioneu, a thoiough evaluation of how the application woulu behave unuei
possible ciicumstances was peifoimeu. The ciicumstances incluue:
S.S.1 Recoiuing obseivations
The uevice oi the main seivei is offline: an exception is thiown; the
softwaie saves its state using Content Pioviueis, as explaineu befoie.
Whethei oi not the entiy was saveu without an "uploaueu" tag can be
checkeu by queiying the Anuioiu's inteinal uatabase:

!"#$%&'()*'+$&%,"-#'.-/%0"/'1+2"3&'/434546&'
Entiies with a 1 in the last column have been uploaueu; those with a u
have not.
The uPS ieceivei is tuineu off, out of iange, oi geogiaphical location
cannot be obtaineu: it is impossible to auu an 0bseivation, anu classes
implementing a LocationListenei oveiiiue the onPioviueiBisableu anu
onStatusChangeu methous that account foi such behavioui;

S
0niteu States Bepaitment of Agiicultuie
S8




S.S.2 0btaining maiket uata
The uevice is offline, oi the uata souice is unavailable: this ietuins a !"#$
%&'()*$ +&*&$ &,&-.&/.)$ &*$ *0-1$ *-%)2 message anu the ieason is saveu in
the log;
Paising eiioi: if the upuateu uata uoes not fit the paisei's stiuctuie,
nothing is uisplayeu, anu the eiioi is loggeu;
Piouuct infoimation is not obtaineu: the system connects with the
seivei befoie uisplaying any maiket uata;
S.S.S Piocessing SNS iequests
Bevice is offline: a valiu iequest is saveu with a "penuing" tag, anu then
uepenuing on whethei it's an 0bseivation oi a maiket uata iequest, the
geocouei seaiches foi a location anu uploaus the entiy, oi latest maiket
uata is obtaineu anu sent back, accoiuingly;
The iequest is not piopeily foimatteu: if the message contains the
uevice's IB, then it is saveu in a Content Pioviuei so the usei can iuentify
the eiioi; if not, then it is ieceiveu as a stanuaiu text message;
The location is not founu: an 0bseivation is not cieateu but the iequest
is saveu.

S9
CBAPTER 6 S0NNARY ANB F0T0RE BEvEL0PNENT
6.1 Suitability of puipose
The pioject has met all of its main iequiiements, anu even some of the optional
ones; as such, uPS tiacking anu mapping functions weie not oiiginal
pieiequisites. It coulu be noteu, howevei, that the implementeu featuies have
not achieveu sufficient uepth to be useu in a ieal enviionment. The limitations
set upon the softwaie uue to lack of expeitise in computeiiseu tiacking anu
logistics opeiations, the most obvious being the fact that a piouuct is tiackeu in
packageu foim, waiiant the application as a piototype iathei than an enu
piouuct.
Auuitionally, although the softwaie has been uesigneu with the so-calleu "uigital
uiviue" in minu, that is, it uoesn't assume that an Inteinet connection is always
available, oi that eveiy usei will be able to affoiu the uevice, it still uoesn't meet
the neeus of those who uo not have access to electiicity. In that iespect, the
softwaie's been uesigneu foi futuie states of connectivity anu population
awaieness, anu given the pace at which the ueveloping maiket cuiiently evolves
anu the floou of investments pouiing in fiom those uisappointeu in the Westein
financial system, this coulu veiy well be achieveu in the next seveial yeais in
many aieas of Afiica anu Southeast Asia.
That saiu, the puipose of the pioject was to unueistanu the technology anu the
uevelopment piocess, to piactice setting out goals anu scheuule theii
implementation, not to unueistanu the intiicacies of the logistics inuustiy, oi the
stages a coffee bean must go thiough befoie it ieaches its buyei. In that iespect,
the pioject was a success; the Anuioiu platfoim was piacticeu at an auvanceu
level, anu the pieviously unknown seivei-siue technology was stuuieu anu
applieu with ieasonable pioficiency.


4u
6.2 Evaluation
As it stanus, the seivei application was not uesigneu to suppoit high thioughput;
the chosen methou of conveiting InputStieams into Seiializeu 0bseivation
objects aie expensive in teims of piocessing powei. Foi the puiposes of a small
uatabase of active input uevices, howevei, this methouology is an efficient way of
shaiing the same class specification between the client anu seivei siues.
The choice of Anuioiu as the client platfoim was a stiongly positive one; no othei
platfoim has so fai achieveu the same flexibility, openness, anu numbei of
featuies. Apple's iPhone, as stateu befoie, pioviues a similai set of featuies, but it
is a piopiietaiy platfoim that cannot be useu to builu a buuget uevice aimeu at
the ueveloping maikets; anu even uPS-enableu smaitphones coulu not compete
with the level of suppoit anu the ease of use of the Anuioiu SBK.
In teims of auaptability of Tiace's coue, it shoulu be noteu that the uevelopment
followeu stanuaiu Anuioiu piactises in uesign anu configuiation, anu will not,
theiefoie, pievent anyone familiai with the platfoim fiom extenuing it. The
application useu stanuaiu Anuioiu paiauigms such as the XNL-baseu layout
(even though the moie tiauitional Swing-like mechanism is also suppoiteu), anu
values Resouices, which aie useu to stoie stiing anu aiiay constants in XNL files
that aie sepaiate fiom the main }ava coue. As noteu eailiei, an Anuioiu
application uoesn't follow 00P uesign patteins in its stiict sense, that is, it is
baseu on Activities, Seivices, anu so on, so theie is little ioom foi making giave
eiiois in the application's oveiall stiuctuie. 0n the othei hanu, eveiy effoit has
been maue to keep the piogiam' functions concise, veisatile, anu ie-usable. The
coue has been piopeily foimatteu anu uocumenteu to impiove ieauability; some
immeuiate suggestions foi futuie uevelopment weie auueu thiough T0B0 tags
that can often be founu in the coue.
The softwaie laigely ielieu on the functions built into the SBK anu the }ava
libiaiies; the only S
iu
paity coue useu weie the }ava Seivlet API's anu Apache
Commons Lang libiaiy foi stiing manipulation. The few custom-maue functions
!
"#!
$%&'!%&(&)*+!,-.&%!,/)0$1/0$,!,/&!2)01)*.!*)&!*++!+03*,&'!-4!,/&!50..04!3+*%%6!
*4'!*)&!2)02&)+7!'03$.&4,&'8!
9+,/0$1/!,/&!%0:,;*)&!;*%!4&(&)!)$4!04!*!2/7%-3*+!'&(-3&6!,/&!30'&!*330$4,%!:0)!
%0.&! 0:! ,/&! %3&4*)-0%! ,/*,! 30$+'! *)-%&! -4! )&*+<+-:&! $%&=! :0)! -4%,*43&6! -4! ,/&!
!"#$%&'()*+,$%&)-$! 3+*%%! -.2+&.&4,%! ,/&! *+.%*&)/$%0)#'"1$/! *4'!
*+,('(2#34'+5$/!.&,/0'%6!;/-3/6!*%!*+)&*'7!'&%3)->&'6!*)&!3*++&'!;/&4!,/&!?@A!
)&3&-(&)! 3/*41&%! -,%! %,*,$%=! ,/&! .-4-.*+! ,-.&! -4,&)(*+! -4! ;/-3/! ,/&! )&3&-(&)!
3/&3B%! +03*,-04! $2'*,&%6! *+,/0$1/! %&,! ,0! *! %.*++! (*+$&! :0)! '&.04%,)*,-04! *4'!
,&%,-41! 2$)20%&%6! -%! %$11&%,&'! ,0! >&! 3/*41&'! ,0! *! +041&)! 2&)-0'! ,0! 2)&(&4,!
&C3&%%-(&! 20;&)! 304%$.2,-048! D&(&),/&+&%%6! :$),/&)! ,&%,-41! ;-++! +-B&+7! >&!
)&E$-)&'! %/0$+'! ,/&! 2)01)*.! >&! '&2+07&'! 04! *! )&*+! '&(-3&=! %0.&! 0:! ,/&!
:$43,-04*+-,7!.*7!>&!,00!&C2&4%-(&!:0)!*!.0>-+&!*22+-3*,-046!%$3/!*%!)&<E$&)7-41!
,/&!F>%&)(*,-04%!504,&4,!@)0(-'&)!04!,/&!.*2!&(&)7!,-.&!*!4&;!&4,)7!-%!*''&'=!
,/-%! 2)0'$3&'! %0.&! .-40)! +*1%! ;/&4! 02&)*,-41! ;-,/! *! +*)1&! 4$.>&)! 0:!
F>%&)(*,-04%!&(&4!04!,/&!&.$+*,0)8!
9%! *40,/&)! %/0),30.-41! 0:! ,/&! *22+-3*,-046! ,/&! .-4-.$.! 0>%&)(*,-04! '-%,*43&!
:&*,$)&! )&1$+*,&'! -4! ,/&! @)&:&)&43&%! %&3,-04! '0&%4G,! 2&):0).! ;&++! 04! ,/&!
&.$+*,0)=!&(&4!;/&4!-,!-%!%&,!,0!HII!.-+&%!,/&!%&)(-3&!%,-++!)&30)'%!*4!&4,)7!-:!,/&!
+03*,-04G%! .0(&'! >7! .$3/! +&%%8! J/-%! 30$+'! >&! *,,)->$,&'! ,0! ,/&! :*3,! ,/*,! ,/&!
+03*,-04! -%! 3/*41&'! -4! >-1! +&*2%! 04! *! ,&%,-41! &4(-)04.&4,6! *4'! -,! 30$+'! >&! ,/*,!
94')0-'! 04+7! )&30)'%! .-+&*1&! ;/&4! ,/&! +03*,-04! -%! 3/*41&'! 1)*'$*++7=! :0)! ,/-%!
)&*%04!,/&!:&*,$)&!;*%!+&:,!-4!2+*3&8!
J/&!3+-&4,!2)01)*.!;*%!>$-+,!:0)!94')0-'!AKL!(&)%-04!#8#6!*4'!1-(&4!,/&!:*3,!,/*,!
94')0-'! -%! %,-++! *! 70$41! 2+*,:0).! ?001+&! *3,-(&+7! *4'! )&1$+*)+7! &C2*4'%! -,%!
%2&3-:-3*,-048! 9%! 40,&'! &*)+-&)6! ,/-%! /*%! 2)&%&4,&'! %0.&! '-::-3$+,-&%! '$)-41!
'&(&+02.&4,6! *4'! .*7! >&30.&! *! /-4')*43&! :0)! :$,$)&! &C2*4%-046! -:! ?001+&!
%$''&4+7! '&3-'&%! ,0! ')02! 0)! .0'-:7! *! :&*,$)&8! J/&)&! -%! 40! /&'1-41! *1*-4%,! ,/-%!
20%%->-+-,76! /0;&(&)6! *4'! *47! 3/*41&%! ?001+&! .*B&%! ,0! ,/&! AKL! -,! '03$.&4,%! -4!
'&,*-+6! %0! *47! 4&;! 2)01)*..&)! 30$+'! &*%-+7! %20,! *4'! :-C! ,/&! 0>%0+&,&! 30'&!
2*,,&)4%8!
42
6.S Achievements
6.S.1 Technological
The following technologies weie leaineu to some uepth uuiing the couise of
uevelopment (see ulossaiy foi unknown teims):
i. }ava
a. Bata paising techniques anu iegulai expiessions
b. Thieaus
c. 0bject seiialisation
u. Softwaie engineeiing
ii. Seivei-siue anu tiansfei
a. }ava Seivlets
b. Tomcat seivei
c. BTTP
u. NySQL
iii. Anuioiu
a. Basics
b. XNL-baseu layout
c. Cameia captuie
u. Bioaucast ieceiveis
e. Seivices
f. Content Pioviueis anu SQLite uatabases
g. Location-baseu seivices, geocouing
h. Napping anu uiawing
i. Senuing anu ieceiving SNS
iv. Eclipse IBE

v. Ant builu tool

vi. Woiu piocessing

4S
6.S.2 Pioject management
This was a fiist majoi softwaie pioject by the authoi; hence it seiveu not only as
a platfoim on which to "tiy out" the technology leaineu acauemically, but to
expanu an aiiay of skills incluuing softwaie engineeiing, time management,
planning, commitment, etceteia. Some Agile piinciples, although not stiictly
applicable in the context uue to absence of a foimal client anu a uevelopei team,
weie successfully implementeu; they incluue somewhat spontaneous planning,
ongoing iestiuctuiing, anu auaptation to change.
6.4 Futuie uevelopment
6.4.1 ueneial
Builu a sistei application geaieu foi consumei use, which incluues a
baicoue scannei anu ieaus tiacing infoimation into the uevice. A similai
Anuioiu application, !"#$%&'()'&*+,'&' |8j, achieves this by using the
Zebia Ciossing libiaiy |9j to iecognise baicoues, which coulu be
incoipoiateu into Tiace;
Beploy the piogiam on a physical Anuioiu uevice;
6.4.2 Tiacking
Expanu the application so it can tiack multiple types anu batches of
piouucts at a time;
Enable to auu, euit, anu iemove piouucts to be tiackeu;
6.4.S Naiket uata
The numbei of piouucts anu souices coulu be gieatly expanueu, offeiing
histoiical infoimation in a vaiiety of giaphs - although the neeu foi such
functionality is uebatable since it can be accesseu on any ueuicateu
financial website fiom the same uevice;
Auu an option to uisplay local uealeis' piices (if any of them will evei
ielease open API's.)
44
CBAPTER 7 APPENBICES
7.1 ulossaiy
!"#$%$#& - iepiesents a single, focuseu winuow in an Anuioiu piogiam, which
inteiacts with the usei, much like a }ava Fiame that takes up entiie scieen 21
!'()*$( - open-souice mobile platfoim uevelopeu by uoogle. Foi moie
infoimation visit www.anuioiu.com S
+,-./01 ,23*)$#45 - encoues binaiy uata by tieating it numeiically anu
tianslating it into a base 64 iepiesentation 18
6*77..1 8691 7:#:).- - a contiact iepiesents physical ueliveiy of Aiabica coffee
beans; contiact size: S7,Suulbs; piice shown is cents pei pounu 2S
6*'#.'#1;)*%$(.)1- the Anuioiu mechanism foi stoiing anu ietiieving uata; can
be useu in conjunction with a uatabase, an XNL file, a plain text file, anu
otheis. Anuioiu ships with a few Content Pioviueis of its own, incluuing
Contacts, Neuia, Settings, anu so on 22
<<=> - Balvik Bebug Nonitoi Seivice, uebugging tool that ships with the
Anuioiu Eclipse plug-in S4
?,$)#),(. - piouuct ceitification system uesigneu to allow people to iuentify
piouucts that meet agieeu enviionmental, laboui anu uevelopmental
stanuaius 7
?*)@,)(1A.*"*($'3 - a technique that seaiches a specifieu auuiess anu ietuins
its geogiaphical location. In Tiace, uoogle's geocouei implementation was
useu, which means that if a location is founu in uoogle Naps, it will likely be
founu in Tiace 28
A;> - global positioning system S
A>= - global system foi mobile communications 8
BCC; - hypeitext tiansfei piotocol 6
D'E:#>#).,5FG:#E:#>#).,5 - }ava class iepiesenting a stieam of bytes, in this
context to be tiansfeiieu ovei a netwoik 16
$;4*'. - multimeuia smaitphone uesigneu anu built by Apple 12
=&>HI - an open-souice ielational uatabase management system 18

4S
!"#$%&'()*+ - a snapshot of a piecise location, time, piouuct being obseiveu,
optionally a textual uesciiption anu an image 1S
,!-. - BTTP iequest methou wheie the uata can be incluueu in the bouy of the
iequest anu which piouuces siue effects, such as upuating a uatabase 16
/0-. - iepiesentational state tiansfei, inteiface that tiansmits uomain-specific
uata ovei BTTP without an auuitional messaging layei 17
/$&$%#$12$*3*4)+5 - a technique useu to obtain a neaiest known auuiess of the
specifieu geogiaphical location. Tiace uses uoogle's implementation that
comes with Anuioiu SBK 21
/678 - iauio-fiequency iuentification. RFIB tags can be applieu to a piouuct foi
puipose of iuentification anu tiacking 14
-$%)'9)#'()*+ - piocess of conveiting a }ava object into a sequence of bits, to be
stoieu on a stoiage meuium oi tiansfeiieu via a netwoik. 0seu to tiansfei
objects between client anu seivei siues of the system 16
-$%&)3$ - an Anuioiu component that iuns in backgiounu anu without the neeu
foi usei input. A Seivice can be eithei fiee oi bounu to an !"#$%$#&, in which
case its lifecycle uepenus on the lifecycle of the Activity that staiteu it. Tiace
uses the foimei methou, i.e., the Seivice continues to iun when the piogiam
winuow is closeu 2u
-:'%$41 ,%$;$%$+3$# - a methou foi stoiing Anuioiu application piefeiences to
be maue available eithei within the scope of one piogiam oi between seveial
applications 26
-<- - shoit message seivice 11
-!=, - simple object access piotocol, piotocol specification foi exchanging
stiuctuieu infoimation in Web seivices; uses XNL as its message foimat anu
ielies on othei application layei piotocols such as RPC 17
->? - stiuctuieu queiy language 16
.*'#( - Anuioiu technique foi uisplaying shoit-liveu messages SS
.*@3'(1 #$%&$% - BTTP web seivei by the Apache Softwaie Founuation that
suppoits }ava Seivlets anu }ava Seivei Pages 16

46
7.2 0se cases
!"#$%&"#$ '($)*"+,&-$.&/0#1$2&1&3$/#45*/#.#61$78$
Biief uesciiption The Anuioiu system obtains anu uisplays maiket uata
Piimaiy actois Nain Activity
Seconuaiy actois S
iu
paity seivei, PiouuctSeivlet, Shaieu Piefeiences
Pieconuitions Bevice is online, seivei is iunning, S
iu
paity seivei
iunning, piouuct uata not pieviously obtaineu
Nain flow 1. 0sei opens Nain tab
2. Nain Activity senus a P0ST iequest to
PiouuctSeivlet with the uevice IB
S. A Piouuct is stieameu, ie-packageu, uata saveu in
Shaieu Piefeiences
4. Nain Activity cieates a BataPaisei object
S. BataPaisei connects with S
iu
paity seivei, obtains
anu paises uata
6. Nain Activity uisplays uata
Postconuitions Piouuct infoimation saveu, maiket uata uisplayeu
Alteinative flows If uevice is offline:
1. Nain Activity uisplays "uata unavailable" message

!"#$%&"#$ 9($:&/0#1$2&1&$;:;$/#45#"13$/#45*/#.#61$78$
Biief uesciiption An SNS maiket uata iequest is maue anu iesponueu to
Piimaiy actois SmsSeivice, senuei
Seconuaiy actois SmsRequests content pioviuei
Pieconuitions Naiket uata obtaineu, SNS seivice on
Nain flow 1. Text message is sent in foimat
MKTDATA [device_id]
2. SmsSeivice checks uevice IB
S. If coiiect:
1. SmsSeivice checks if message contains
keywoiu

47
2. If coiiect:
1. SmsSeivice ietiieves maiket uata
anu senus back to mobile
2. SmsSeivice saves iequest in
Content Pioviuei
S. If incoiiect:
1. SmsSeivice ignoies iequest
Postconuitions Request saveu, iesponueu
Alteinative flows If seivice is off:
1. Request is ignoieu

!"#$%&"#$ '($)#%*+,$-&./&0$*1"#+2&34*.5$+#6/4+#-#.3$78$
Biief uesciiption Recoius obseivation with uesciiption anu image
Piimaiy actois Tiace
Seconuaiy actois 0bseivationSeivlet, 0bseivations content pioviuei
Pieconuitions uPS switcheu on
Nain flow 1. 0sei opens 0bseivations tab
2. 0sei clicks on New. button
S. 0sei inputs uesciiption, takes image, piesses 0K
button
4. 0bseivationsNap attempts uploau
S. If successful:
1. Recoiu saveu in Content Pioviuei with
uploaueu fielu = tiue
6. If unsuccessful:
1. Recoiu saveu with uploaueu = false
7. New obseivation uisplayeu on map
Postconuitions 0bseivation saveu
Alteinative flows If uPS pioviuei uisableu:
1. New. button is uisableu
2. Flow A1
!"#$%&"#$ 8($)#%*+,$&/3*-&34%$*1"#+2&34*.5$+#6/4+#-#.3$785$79$
Biief uesciiption Recoius an obseivation automatically
48
Piimaiy actois 0bseivationSeivice
Seconuaiy actois 0bseivationSeivlet, 0bseivations content pioviuei,
Shaieu Piefeiences
Pieconuitions uPS switcheu on
Nain flow 1. 0sei staits 0bseivationSeivice by clicking on
Nenu - Auto obseivation iecoiuing - Save
2. 0bseivationSeivice obtains minimum uistance
change fiom Shaieu Piefeiences
S. 0bseivationSeivice iegisteis location listenei
4. If location changes by specifieu amount:
1. Seivice captuies obseivation uetails
2. Seivice attempts uploau
S. If successful:
1. Save to Content Pioviuei with
uploaueu = tiue
4. If unsuccessful:
1. Save with uploaueu = false
S. Bisplay Toast notification
Postconuitions 0bseivation saveu
Alteinative flows If uPS pioviuei uisableu:
1. Location listenei pauseu
2. Flow A1

!"#$%&"#$ '($)#%*+,$-.-$*/"#+0&12*34$+#562+#7#31$89$
Biief uesciiption Recoius obseivation out of an SNS iequest
Piimaiy actois SmsSeivice, senuei
Seconuaiy actois ueocouei, 0bseivationSeivlet, 0bseivations content
pioviuei
Pieconuitions Bevice online
Nain flow 1. 0sei staits SmsSeivice in Piefeiences
2. Senuei makes iequest in foim
NEWOBS [device_id] [location]; [details]

49
S. If message is paiseu coiiectly:
1. SmsSeivice instantiates ueocouei
2. ueocouei seaiches foi location
S. If location is founu:
1. New obseivation is cieateu, uploaueu,
saveu in Content Pioviuei
4. If location is not founu oi is outsiue the seaich
limit:
1. Request saveu with penuing = false
4. If message is incoiiect:
1. Request ignoieu
Postconuitions 0bseivation saveu
Alteinative flows If uevice is offline:
1. Request saveu with penuing = tiue
2. Flow A2

!"#$%&"#$ '()#*+&),-#$.(/0$'12$3*/%#""$4#+5,+6$/7"#*-&),/+"$
Biief uesciiption 0ploaus any obseivations that haven't been uploaueu
Piimaiy actois Nain Activity
Seconuaiy actois 0bseivationSeivlet, 0bseivations content pioviuei
Pieconuitions Bevice online, seivei iunning
Nain flow 1. 0sei staits application
2. Nain Activity checks foi penuing obseivations
S. If founu:
1. Backgiounu thieau is cieateu
2. Thieau uploaus each obseivation
Postconuitions 0bseivations uploaueu
Alteinative flows None

!"#$%&"#$ '()#*+&),-#$.(/0$'82$3*/%#""$4#+5,+6$9:9$*#;<#")"$
Biief uesciiption Piocesses penuing maiket uata oi obseivation iequests
Piimaiy actois SmsSeivice
Seconuaiy actois ueocouei, 0bseivationSeivlet, 0bseivations content
Su
pioviuei, SmsRequests content pioviuei
Pieconuitions Bevice online, seivei iunning, maiket uata obtaineu
Nain flow 1. 0sei staits SmsSeivice
2. Seivice staits Timei
S. TimeiTask seaiches foi penuing iequests eveiy
1u minutes
4. If founu:
1. If iequest is a maiket uata iequest:
1. Senus maiket uata back to senuei
2. If it's a new obseivation iequest:
1. Initialises ueocouei
2. ueocouei seaiches location
S. If founu:
1. 0bseivation cieateu, uploaueu,
saveu to Content Pioviuei
4. If not founu:
1. Request saveu with penuing =
false
Postconuitions Requests piocesseu
Alteinative flows None



S1
7.S System manual
7.S.1 Seivei installation
To ueploy the seivei-siue application one must peifoim the following:
1. Install NySQL, veision S
2. Impoit the faiitiacing.sql sciipt locateu in <CB>uatabase; this will cieate
a uatabase titleu faiitiacing2
S. Install Tomcat seivei, veision 6
4. 0pen <CB>TiacewebNETA-INFcontext.xml, anu change the uatabase
usei name anu passwoiu
S. Install Apache Ant
6. 0pen <CB>Tiacebuilu.xml, anu point the ${catalina} value to youi
Tomcat seivei location
7. 0pen <CB>Tiace in shell anu type ant build
8. Stait Tomcat
9. 0pen http:localhost:8u8uTiaceinput0bseivation
1u. If it ietuins the message: "BTTP methou uET is not suppoiteu by this
0RL", the installation was peifoimeu coiiectly.
7.S.2 Client installation (on emulatoi)
1. Bownloau anu unpack Anuioiu SBK, http:uevelopei.anuioiu.com
2. Stait emulatoi fiom <SBK>tools uiiectoiy, wait until it fully loaus
S. 0nuei the same uiiectoiy, open shell anu type:
adb install <CD>/Trace/bin/Trace.apk
4. Stait application on the emulatoi
S2
7.S.S Client compilation fiom souice
The above instiuctions will be sufficient to install the client piogiam anu all its
featuies. To compile fiom the souice one woulu have to uo the following (please
note that this applies to SBK veision 1.1):
1. Bownloau anu unpack Anuioiu SBK
2. Bownloau Eclipse S.4 uanymeue
S. 0pen Eclipse, click Belp - Softwaie upuates.
4. 0nuei Available softwaie tab, Auu site.
S. Entei https:ul-ssl.google.comanuioiueclipse as a location, click 0K
6. Check Bevelopei Tools, anu click Install.
7. Check both Anuioiu Bevelopei Tools anu Anuioiu Euitois, click Next,
accept the license anu click Finish
8. Restait Eclipse
9. 0pen Eclipse Piefeiences, Anuioiu, biowse foi SBK location
1u. Select File - Impoit., Existing piojects into woikspace, Select aichive file,
biowse foi <CB>Tiace.zip
11. Befine an Apache Tomcat 6.u Taigeteu Runtime in Pioject settings -
Taigeteu Runtimes, biowse foi Tomcat installation uiiectoiy
12. Stait Tomcat by opening Winuow - Show view - Seiveis, anu clicking the
Stait button
1S. Click on Run - Run configuiations.
14. Bouble click on Anuioiu application; uefine a name, biowse foi the Tiace
pioject
1S. Click Apply - Run. The emulatoi will stait automatically

SS
7.4 0sei manual
The manual will concein only the client siue of the system; the seivei uoes not
iequiie any extia management. The manual is also wiitten foi use with an
emulatoi, not an actual uevice; instiuctions foi the lattei woulu be somewhat
similai.
!"#$%&'#()*+&,#-),). open the Naiket uata tab
!"# /0-),&# ()*+&,# -),). it is upuateu automatically at each application
stait. Bowevei, the uata is almost always uelayeu, by seveial houis in
the case of commouities uata, by seveial uays in the case of fiuit anu
vegetable uata
!"#*&1/&2,#()*+&,#-),)#3*"(#)#("4%5&#06"7&#8#)7",6&*#&(/5),"*. #
1. Stait SNS seivice by piessing Nenu - SNS seivice - Save #
2. Stait a new instance of the emulatoi fiom <SBK>tools#
S. 0pen Nessaging application, click on New message#
4. Piess ctil+F11 to iotate scieen anu be able to type#
S. In the To fielu, entei the numbei specifieu in the fiist emulatoi's
winuow title (e.g. SSS4)#
6. Type mktdata [device_id] (lettei case is not significant), e.g.
Mktdata 455
7. If theie is no iesponse, check that maiket uata has been loaueu on
the fiist uevice.#
!"# 3%7-# "/,# -&$%9&:2# ;<. this is shown in Piefeiences; piess Nenu button
to entei
!"# 96)7=&# 0*"-/9,. this is not possible as a piouuct is lockeu to its
uevice; you can, howevei, change the uevice's IB at compile time. To uo
that, follow instiuctions on compiling fiom the souice, then open
anuioiu.tiace.Common.java, anu change the BEvICE_IB constant. 0nly
the IB's specifieu in the comments weie uefineu in the uatabase anu
testeu. Compile anu launch the piogiam.
!"#9*&),&#)7#>42&*$),%"7.#
Automatically:
S4
1. Stait seivice by piessing the Nenu button, Auto obseivation
iecoiuing, Save
2. 0pen the BBNS peispective in Eclipse by piessing Winuow -
0pen peispective - 0thei - BBNS
S. 0nuei Emulatoi contiol tab, finu Location contiols; if the aiea is
uisableu make suie the emulatoi is iunning, anu select the
emulatoi name unuei Bevices tab
4. Click on KNL tab, Loau KNL.
S. Choose eithei ghana_path.kml oi noith_lonuon.kml fiom
<CB>maps, 0pen, then click on the fiist item in the list
6. In Tiace, open the 0bseivations tab; it shoulu centei to a newly
maue obseivation. You can gain zoom contiols by tapping
anywheie on the map
7. In BBNS, click on the next item on the list; Tiace shoulu make a
new 0bseivation
8. Caiiy on going thiough the list, oi piess the Play button unuei
Location contiols; but bewaie that it may slow uown the
application consiueiably.
Nanually:
1. 0pen 0bseivations tab
2. Piess the New. button
S. Entei obseivation anu location uetails, take pictuie (optional),
piess Confiim.
By senuing an SNS message:
1. Nake suie SNS seivice is on, anu uevice is online
2. Stait anothei instance of the emulatoi, open Nessaging, entei the
fiist uevice's poit numbei in To (shown in the winuow title)
S. 0R type an aibitiaiy phone numbei in BBNS peispective, unuei
Telephony actions
4. Type newobs [device_id] [location];
[description]
e.g.: Newobs 455 nw19hz; UCL halls in Camden

SS
S. 0pen 0bseivations tab on the fiist uevice; the new entiy shoulu
appeai on map. If not founu, use the List all function.
!"#$%&'(#")*+%,&$-".*/ open 0bseivations tab
!"#0-.1#&.#2)*+%,&$-".3*#&11%+**/
1. Nake suie the uevice is online
2. 0pen 0bseivations tab
S. Piess List all, click on the uesiieu 0bseivation
!"#%+,-+4#-.'"5-.6#787#%+9:+*$*/#open SNS seivice tab
!"#0-.1#":$#787#*+.1+%3*#.&5+/ Tiace automatically fetches any matching
name fiom the uevice's Contacts anu uisplays it in Bistoiy
S6
7.S The entiie Faii Tiacing uatabase


As stateu befoie, the uatabase was uesigneu by the Faii Tiacing pioject, except
the following mouifications:
The 'uevice' table was cieateu, which matches a uevice IB to a piouuct
Foieign keys weie auueu to all tables iequiiing them.
producerImage
ID INT(11) P N A
producerID INT(11) F
image TEXT
imageName TEXT
description TEXT
comments
commentID INT(3) P N A
name VARCHAR(50)
comments TEXT
producerAudio
ID INT(11) P N A
producerID INT(11) F
audio TEXT
description TEXT
productType
productTypeID INT(11) P N
productName VARCHAR(30)
quantity INT(11)
quantityType VARCHAR(10)
price DECIMAL(5,2)
image TEXT
link TEXT
description TEXT
producer
producerID INT(11) P N
producerTypeID INT(11) F
producerName VARCHAR(30)
producerDetails VARCHAR(30)
country VARCHAR(30)
producerVideo
ID INT(11) P N A
producerID INT(11) F
video TEXT
description TEXT
producerType
producerTypeID INT(11) P N
producerType VARCHAR(30)
typeDetails VARCHAR(30)
productTypeVideo
ID INT(11) P N A
productTypeID INT(11) F
video TEXT
description TEXT
productTypeImage
ID INT(11) P N A
productTypeID INT(11) F
image TEXT
imageName VARCHAR(100)
description TEXT
productTypeAudio
ID INT(11) P N A
productTypeID INT(11) F
audio TEXT
description TEXT
observationType
obsTypeID INT(11) P N A
GPSLon DOUBLE
GPSLat DOUBLE
obsLocation VARCHAR(100)
image TEXT
fbUserRatings
productTypeID INT(11) F N
userID INT(11) N
rating INT(1) N
observation
obsID INT(11) P N A
productID BIGINT(20) F
obsTypeID INT(11) F D N
obsDateTime TIMESTAMP D N
details TEXT
product
productID BIGINT(20) P D N
productTypeID INT(11) F
dateBottled DATE
ethicalMarks DOUBLE
fairTrade CHAR(3)
organic CHAR(3)
producerID INT(11)
device
deviceID INT(11) P D N
productID BIGINT(20) F N
!
"#!
#$% &'()*+!(',-+.!/'.'!01)2.!
#$%$3 4&56!7,20.!'1/!8+9+.':*+!),0;+<!

NEW COVENT GARDEN Terminal Prices as of 21-APR-2009

Provided by: Fruit and Vegetable Market News,
Federal - State Market News Service, USDA.

Phone: (202) 720-2264 Fax: (202) 720-4052


VIA WASHINGTON, D.C. PRICES ARE IN U.S. DOLLARS CONVERTED
USING THE NEW YORK
FOREIGN EXCHANGE MID-RANGE RATE FOR THE DATE OF THE
REPORT, OR NEAREST
AVAILABLE DATE, AS APPEARED IN THE WALL STREET JOURNAL.
SOURCE: Fresh Produce Journal, England
NC_FV010


CITRUS FRUITS
---GRAPEFRUIT: 15 kg containers IS White 13.20 TU Red
11.74 17 kg containers
US U.S. One Star Ruby 19.81
---LEMONS: 15 kg containers SP 12.47
---LIMES: 4 kg containers BR Seedless Type 4.77
---MISC CITRUS: 10 kg containers MR Class I Ortanique
11.00
---ORANGES: 15 kg containers EG Various Varieties
11.37 MR Various Varieties
13.57 SP Various Varieties 11.74

BERRIES
---BLUEBERRIES: OFFERINGS INSUFFICIENT TO QUOTE.
---MISC BERRIES: OFFERINGS INSUFFICIENT TO QUOTE.
---RASPBERRIES: 125 gm containers per bkt SP Red 1.32
---STRAWBERRIES: flats 8 1-lb containers with lids BL
18.19 250 gm
containers per bkt SP .76

MELONS
---CANTALOUPS: 5 kg containers CR 10.64
---HONEYDEWS: 10 kg containers BR 18.34
---MISC MELONS: 5 kg containers MR Galia 8.80 SP Galia
9.17
---WATERMELONS: OFFERINGS INSUFFICIENHT TO QUOTE.

NON-CITRUS FRUITS
! "#!
---APPLES: cartons tray pack per kg UK cat I Bramley
Seedling .81 10 kg
containers CQ cat I Fuji 14.67 18 kg containers BR cat I
Royal Gala 19.81 CL
cat I Granny Smith 22.74 Royal Gala 20.54 FR cat I Golden
Delicious 19.44
Granny Smith 16.87 Royal Gala 17.97 Braeburn 16.14
---AVOCADOS: 4 kg containers SP Various Greenskin
Varieties 8.07
---BANANAS: 18 kg cartons JM 29.34 WN 29.34 ZZ 29.34
---FRUITS OTHER: flats 1 layer AG Figs 24s 8.80
---GRAPES: 4.5 kg containers CL Thompson Seedless
11.00 Sugraone 11.00
Crimson Seedless 9.90 IQ Thompson Seedless 9.90 SF
Bonheur 10.64
---KIWIFRUIT: 3 kg containers IT Hayward 4.77
---MANGOES: 4.5-5 kg containers BR Tommy Atkins 6.24
---PAPAYA: OFFERINGS INSUFFICIENT TO QUOTE.
---PEARS: 12 kg containers BL CAT I Conference 22.74
18 kg containers AG CAT
I Packham Triumph 19.81
---PINEAPPLES: cartons each PN golden ripe 8s 1.25 9s
1.25 10s 1.25
---PLUMS: 5 kg containers CL Angeleno 11.37
!
$%&%' ()*++!,-.)./0!/+11+2-3-04!2)3)!
"KCZ09.NYB",121.50,"4/29/2009","1:49pm",+0.20,121.65,122.
00,120.80,0
!
$%$ 5+20!6-43-.7!!
!"#$%&$'()*+',%-$.'/,$+'012345*%6$4&*6'78'*$%97+-'8*:;'%'6:;,)($*.<'

S9
7.8 Pioject plan
Tiacing ethical uata in piouuction anu supply chains using mobile technology
In collaboiation with Faii Tiacing, www.faiitiacing.oig
!"#$% to uevelop softwaie foi the Anuioiu mobile platfoim that minimises
effoits in iecoiuing piouuction anu supply uata foi a wiue iange of piouucts
oiiginateu fiom unuevelopeu economies, in oiuei to offei moie ethical choices to
enu consumeis anu pioviue uninteiiupteu access to maiket uata to the
piouuceis.
&'()*+",)$% to ieseaich mission statement of the Faii Tiacing pioject anu
collaboiate with its cuiient anu past uevelopeis; co-opeiate with the pioject's
paitneis in gatheiing iequiiements foi futuie platfoim; unueistanu stiuctuie
useu in the cuiient piototype |1j; uefine a set of input uata anu the client-seivei
aichitectuie to be useu foi stoiing anu ietiieving uata; ieseaich cuiient
technology anu techniques useu by faimeis in piouucing countiies anu by
logistics netwoiks; ieseaich mobile netwoiks penetiation in iuial aieas of
taigeteu countiies; uevise an efficient anu uiscieet methou of enteiing uata with
minimal usei effoit; piouuce a pool of test anu, at a latei stage, ieal uata to be
accesseu in a vaiiety of foimats; collaboiate with mobile phone companies
(specifically Nokia) in ueveloping the taigeteu uevice.
-./)*+)010)2",)34'2)$%1
Repoits of ieseaich into logistics, the "uigital uiviue", anu economic
giowth;
Besign specification with 0NL; test patteins, use cases analysis, etc.;
An explanation of technologies useu in the pioject, accessible to a
geneial ieauei;
A woiking local veision of the seivei aichitectuie;
0sei inteiface uesign & iepoits on BCI ieseaich techniques;
6u
Anuioiu softwaie that meets above objectives, fully functional anu
uocumenteu.
!"#$%&'()*+($,+-'.(+/0)
Baiuwaie system uesign baseu on Anuioiu, i.e., specification, 0S geaiing,
etc.;
Befineu stanuaius foi the mobile text messaging seivice & instiuctions
on implementation;
Reseaich into XNPP foi uata exchange between mobile uevices.
1-%2+3#)4$(+/#%&+/0)
Pioject stait - enu of 0ctobei: ieseaich, netwoiking, pioject uefinition,
wiiting up initial iepoit
Weeks 1-S of Novembei - leaining Anuioiu funuamentals, tiying out
example coue, piepaiing pioject plan
Weunesuay 19
th
Novembei: ueauline foi pioject plan
Week 4 of Novembei - ieseaiching Faii Tiacing's co-opeiative paitneis,
meeting pioject uevelopeis anu managei, unueistanuing logistics,
uefining technologies to be useu anu leaining them
Week 1 of Becembei - use case analysis, specification uesign, uatabase
uesign & local ueployment
Weeks 2-4 of Becembei - system implementation, piepaiation of
inteiim iepoit
Weeks 1-2 of }anuaiy - implementation, wiiting up inteiim iepoit,
finishing up fiist piototype with basic functions, incl. ueliveiables 1-4
Nonuay 19
th
}anuaiy: ueauline foi inteiim iepoit
}anuaiy to miu-Naich - implementation of auuitional iteiations to be
specifieu in inteiim iepoit; testing anu evaluation, incl. BCI testing
Naich - auuiessing laigei-scale pioblems specifieu in 'optional
ueliveiables' - to be confiimeu
Apiil - wiiting up iepoit
!
"#!
$ %&'()*!#
+,
!-)*.!/01!2&3451,!(5)(6'75!
!
#8 9,,2.::;5<=81+8>168)18>?:+,>(57,+:@8+9)9:A)'&B&)1'7C:!
!
D),5!)7(!+'C7),>&5!3A!+>25&@'+3&.!
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!
F&)9)G!H3<5&,+!
62
7.9 Inteiim iepoit
Tiacing ethical uata in piouuction anu supply chains using mobile technology
In collaboiation with Faii Tiacing, www.faiitiacing.oig
!"#$"%#&'()'*+#',$(-$#..'
So fai my attention's been focuseu on uesigning the oveiall aichitectuie, making
uecisions on the technologies to be useu, anu attempting to implement fiist steps
in iealisation of the initial plan. At this moment theie isn't a lot of actual
implementation in place; I iecognise this as a majoi setback anu will be putting
auuitional piessuie in oiuei to complete the pioject on time.
Thioughout the holiuay peiiou I uefineu the scope of the pioject moie cleaily; it
shoulu be noteu that the oiiginal plan to encompass all stages of uata input anu
uisplay, with auuitional seivices of the ietiieval of maiket uata will have to be
ieuuceu in favoui of a smallei application with moie iobust anu thought-out
functionality. Bowevei, the pioject is still taigeteu to incluue the following
featuies:
Client seivei aichitectuie; the seivei will be baseu on }SP anu will
tiansmit uata ovei BTTP using XNL; theie is a NySQL uatabase in place
which coveis a basic implementation of the uata input functionality. The
aichitectuie woiks as follows: a iequest is maue fiom an Anuioiu uevice,
it is ieceiveu in the foim of a 0RL by the seivei, then iequest is
piocesseu by }SP, an XNL file is geneiateu anu sent back to the uevice,
the uata is iecogniseu anu output to the usei.
Image cieation (using Anuioiu's built-in cameia) anu uploau.
The exact set of uata to be input onto the system anu implementation of
'piofiles', e.g., one of a piouucei oi a uistiibutoi, is still to be ueteimineu;
howevei, the main focus iight now is to builu a basic iteiation to which
auuitional featuies can be auueu at a latei stage.

6S
The pioject will take auvantage of the Anuioiu platfoim's telephony
functionality by being able to ieceive text messages fiom client cell
phones, tiansciibe the uata anu uploau it to the seivei. This is baseu on
the iuea that a village, foi instance, will have access to multiple cell
phones but only one Anuioiu uevice, which in tuin has access to the
main seivei baseu in the 0K oi elsewheie.
Naiket uata uisplay using uummy uata pioviueu in XNL foimat.
It is not cleai whethei theie will be enough time to utilise Anuioiu's
mapping featuies, which weie not oiiginally intenueu to be in the scope
of the pioject since it conceins uata input anu not tiacing techniques.
!""#$%&'#()*&+,(
Set up communication between the seivei anu Anuioiu client, to be
completeu by Fiiuay, }anuaiy Su.
Week beginning Febiuaiy 2: uefine uata to be useu, expanu existing
functionality to match ieal-life iequiiements, image uploau
Week beginning Febiuaiy 9: implement SNS ieceiving featuie, tiuy up
coue anu 0I uesign, implement maiket uata functionality
Reauing week: complete implementation, if all of the above is
implementeu auu featuies uesciibeu in the oiiginal pioject plan, begin
wiiting up iepoit.
Signeu:
uiaham Robeits, supeivisoi:
_______________________________________
Ivan Antipov:
_______________________________________
! "#!
$%&'()*!+ *),)*)-$).!
/0 1223455678#09:0;9<0=90;>5:2=??5$0@=<<7A2=5?=BC2C=9BAD8<ED5!
F0 1223455678#09:0;9<0=90;>5:2=??5$0@=<<7A2=5?=BC2C=9BAD8<ED5G3=D7HBIJF!
K0 1223455678#09:0;9<0=90;>5:2;I7A2:5=01=BI7C5?=BC(C=9BAD5!!
#0 1223455678#09:0;9<0=90;>5:2=??5$0@=<<7A2=5?=BC2C=9BAD8<ED563L
9EA27A25;3<E=I:5FMMN5MF537AD917AD<;0IE9!
O0 1223455678#09:0;9<0=90;>5:2=??5$0@=<<7A2=5?=BC2C=9BAD8<ED563L
9EA27A25;3<E=I:5FMMN5MF5C73EC20IE9!
"0 1223455B1=CI7C0:E;C97?ECD70A7259;CC7A25P=Q=58=:7"#5!
N0 12234556660E37A1=AI:72=<<B=A9709ER5=AICEBIHEQ7CQB76012R<!
+0 1223455:9=A0P:1=C>7S0ECD5!
T0 12234559EI70DEED<709ER535UVBAD5!
/M0 1223455666079EAERB:209ER58;:BA7::5IB:3<=S:2ECS09?RG:2ECSHBIJ//#"OO
O+!
!

You might also like