<s>
Lambda	B-General_Concept
architecture	I-General_Concept
is	O
a	O
data-processing	B-General_Concept
architecture	O
designed	O
to	O
handle	O
massive	O
quantities	O
of	O
data	O
by	O
taking	O
advantage	O
of	O
both	O
batch	B-General_Concept
and	O
stream-processing	B-Application
methods	O
.	O
</s>
<s>
This	O
approach	O
to	O
architecture	O
attempts	O
to	O
balance	O
latency	O
,	O
throughput	O
,	O
and	O
fault-tolerance	B-General_Concept
by	O
using	O
batch	B-General_Concept
processing	I-General_Concept
to	O
provide	O
comprehensive	O
and	O
accurate	O
views	O
of	O
batch	B-General_Concept
data	O
,	O
while	O
simultaneously	O
using	O
real-time	O
stream	B-Application
processing	I-Application
to	O
provide	O
views	O
of	O
online	O
data	O
.	O
</s>
<s>
The	O
rise	O
of	O
lambda	B-General_Concept
architecture	I-General_Concept
is	O
correlated	O
with	O
the	O
growth	O
of	O
big	B-Application
data	I-Application
,	O
real-time	O
analytics	O
,	O
and	O
the	O
drive	O
to	O
mitigate	O
the	O
latencies	O
of	O
map-reduce	B-Operating_System
.	O
</s>
<s>
Lambda	B-General_Concept
architecture	I-General_Concept
depends	O
on	O
a	O
data	O
model	O
with	O
an	O
append-only	O
,	O
immutable	O
data	O
source	O
that	O
serves	O
as	O
a	O
system	O
of	O
record	O
.	O
</s>
<s>
Lambda	B-General_Concept
architecture	I-General_Concept
describes	O
a	O
system	O
consisting	O
of	O
three	O
layers	O
:	O
batch	B-General_Concept
processing	I-General_Concept
,	O
speed	O
(	O
or	O
real-time	O
)	O
processing	O
,	O
and	O
a	O
serving	O
layer	O
for	O
responding	O
to	O
queries	O
.	O
</s>
<s>
This	O
paradigm	O
was	O
first	O
described	O
by	O
Nathan	O
Marz	O
in	O
a	O
blog	O
post	O
titled	O
"	O
How	O
to	O
beat	O
the	O
CAP	B-Operating_System
theorem	I-Operating_System
"	O
in	O
which	O
he	O
originally	O
termed	O
it	O
the	O
"	O
batch/realtime	O
architecture	O
"	O
.	O
</s>
<s>
The	O
batch	B-General_Concept
layer	O
precomputes	O
results	O
using	O
a	O
distributed	O
processing	O
system	O
that	O
can	O
handle	O
very	O
large	O
quantities	O
of	O
data	O
.	O
</s>
<s>
The	O
batch	B-General_Concept
layer	O
aims	O
at	O
perfect	O
accuracy	O
by	O
being	O
able	O
to	O
process	O
all	O
available	O
data	O
when	O
generating	O
views	O
.	O
</s>
<s>
By	O
2014	O
,	O
Apache	B-Application
Hadoop	I-Application
was	O
estimated	O
to	O
be	O
a	O
leading	O
batch-processing	O
system	O
.	O
</s>
<s>
Essentially	O
,	O
the	O
speed	O
layer	O
is	O
responsible	O
for	O
filling	O
the	O
"	O
gap	O
"	O
caused	O
by	O
the	O
batch	B-General_Concept
layer	O
's	O
lag	O
in	O
providing	O
views	O
based	O
on	O
the	O
most	O
recent	O
data	O
.	O
</s>
<s>
This	O
layer	O
's	O
views	O
may	O
not	O
be	O
as	O
accurate	O
or	O
complete	O
as	O
the	O
ones	O
eventually	O
produced	O
by	O
the	O
batch	B-General_Concept
layer	O
,	O
but	O
they	O
are	O
available	O
almost	O
immediately	O
after	O
data	O
is	O
received	O
,	O
and	O
can	O
be	O
replaced	O
when	O
the	O
batch	B-General_Concept
layer	O
's	O
views	O
for	O
the	O
same	O
data	O
become	O
available	O
.	O
</s>
<s>
Stream-processing	B-Application
technologies	O
typically	O
used	O
in	O
this	O
layer	O
include	O
Apache	B-Language
Kafka	I-Language
,	O
Amazon	O
Kinesis	O
,	O
Apache	B-General_Concept
Storm	I-General_Concept
,	O
SQLstream	O
,	O
Apache	B-Application
Samza	I-Application
,	O
Apache	B-Language
Spark	I-Language
,	O
Azure	B-General_Concept
Stream	I-General_Concept
Analytics	I-General_Concept
.	O
</s>
<s>
Output	O
from	O
the	O
batch	B-General_Concept
and	O
speed	O
layers	O
are	O
stored	O
in	O
the	O
serving	O
layer	O
,	O
which	O
responds	O
to	O
ad-hoc	O
queries	O
by	O
returning	O
precomputed	O
views	O
or	O
building	O
views	O
from	O
the	O
processed	B-General_Concept
data	I-General_Concept
.	O
</s>
<s>
Examples	O
of	O
technologies	O
used	O
in	O
the	O
serving	O
layer	O
include	O
Druid	B-Application
,	O
which	O
provides	O
a	O
single	O
cluster	O
to	O
handle	O
output	O
from	O
both	O
layers	O
.	O
</s>
<s>
Dedicated	O
stores	O
used	O
in	O
the	O
serving	O
layer	O
include	O
Apache	B-Application
Cassandra	I-Application
,	O
Apache	B-Language
HBase	I-Language
,	O
Azure	B-Application
Cosmos	I-Application
DB	I-Application
,	O
MongoDB	B-Application
,	O
VoltDB	B-Application
or	O
Elasticsearch	B-Application
for	O
speed-layer	O
output	O
,	O
and	O
,	O
Apache	B-Language
Impala	I-Language
,	O
SAP	B-Application
HANA	I-Application
or	O
Apache	B-General_Concept
Hive	I-General_Concept
for	O
batch-layer	O
output	O
.	O
</s>
<s>
And	O
while	O
expensive	O
full	O
recomputation	O
is	O
required	O
for	O
fault	B-General_Concept
tolerance	I-General_Concept
,	O
incremental	O
computation	O
algorithms	O
may	O
be	O
selectively	O
added	O
to	O
increase	O
efficiency	O
,	O
and	O
techniques	O
such	O
as	O
partial	O
computation	O
and	O
resource-usage	O
optimizations	O
can	O
effectively	O
help	O
lower	O
latency	O
.	O
</s>
<s>
Metamarkets	O
,	O
which	O
provides	O
analytics	O
for	O
companies	O
in	O
the	O
programmatic	O
advertising	O
space	O
,	O
employs	O
a	O
version	O
of	O
the	O
lambda	B-General_Concept
architecture	I-General_Concept
that	O
uses	O
Druid	B-Application
for	O
storing	O
and	O
serving	O
both	O
the	O
streamed	O
and	O
batch-processed	O
data	O
.	O
</s>
<s>
For	O
running	O
analytics	O
on	O
its	O
advertising	O
data	O
warehouse	O
,	O
Yahoo	B-Application
has	O
taken	O
a	O
similar	O
approach	O
,	O
also	O
using	O
Apache	B-General_Concept
Storm	I-General_Concept
,	O
Apache	B-Application
Hadoop	I-Application
,	O
and	O
Druid	B-Application
.	O
</s>
<s>
The	O
Netflix	O
Suro	O
project	O
has	O
separate	O
processing	O
paths	O
for	O
data	O
,	O
but	O
does	O
not	O
strictly	O
follow	O
lambda	B-General_Concept
architecture	I-General_Concept
since	O
the	O
paths	O
may	O
be	O
intended	O
to	O
serve	O
different	O
purposes	O
and	O
not	O
necessarily	O
to	O
provide	O
the	O
same	O
type	O
of	O
views	O
.	O
</s>
<s>
Nevertheless	O
,	O
the	O
overall	O
idea	O
is	O
to	O
make	O
selected	O
real-time	O
event	O
data	O
available	O
to	O
queries	O
with	O
very	O
low	O
latency	O
,	O
while	O
the	O
entire	O
data	O
set	O
is	O
also	O
processed	O
via	O
a	O
batch	B-General_Concept
pipeline	O
.	O
</s>
<s>
The	O
latter	O
is	O
intended	O
for	O
applications	O
that	O
are	O
less	O
sensitive	O
to	O
latency	O
and	O
require	O
a	O
map-reduce	B-Operating_System
type	O
of	O
processing	O
.	O
</s>
<s>
Criticism	O
of	O
lambda	B-General_Concept
architecture	I-General_Concept
has	O
focused	O
on	O
its	O
inherent	O
complexity	O
and	O
its	O
limiting	O
influence	O
.	O
</s>
<s>
The	O
batch	B-General_Concept
and	O
streaming	O
sides	O
each	O
require	O
a	O
different	O
code	O
base	O
that	O
must	O
be	O
maintained	O
and	O
kept	O
in	O
sync	O
so	O
that	O
processed	B-General_Concept
data	I-General_Concept
produces	O
the	O
same	O
result	O
from	O
both	O
paths	O
.	O
</s>
<s>
Yet	O
attempting	O
to	O
abstract	O
the	O
code	O
bases	O
into	O
a	O
single	O
framework	O
puts	O
many	O
of	O
the	O
specialized	O
tools	O
in	O
the	O
batch	B-General_Concept
and	O
real-time	O
ecosystems	O
out	O
of	O
reach	O
.	O
</s>
<s>
In	O
a	O
technical	O
discussion	O
over	O
the	O
merits	O
of	O
employing	O
a	O
pure	O
streaming	O
approach	O
,	O
it	O
was	O
noted	O
that	O
using	O
a	O
flexible	O
streaming	O
framework	O
such	O
as	O
Apache	B-Application
Samza	I-Application
could	O
provide	O
some	O
of	O
the	O
same	O
benefits	O
as	O
batch	B-General_Concept
processing	I-General_Concept
without	O
the	O
latency	O
.	O
</s>
