Explores common patterns in microservice architectures and how these are addressed in the gilmour library.
Discusses async signal-slot as well as synchronous request-response architectures.
Introduces unix inspired composition of microservices for more modular and flexible design.
3. Services
• Logical entity - higher level of abstraction
• Can be comprised of sub-services
• Multiple servers for fault tolerance
• Different expectations of reliability
vs Servers
32. Request Response
RPC
Hello?
Aloha!
{
data:
The
actual
payload,
sender:
The
origin
of
the
request
(unique
for
each
request),
code:
The
response
code
if
this
is
a
response.
This
uses
HTTP
error
codes
}
sender_id
Wrong number! code
42. Errors
Hello?
Aloha!
sender_id
Wrong number! code
Error reporter
?
{
code:
response
code
(non-‐200)
sender:
the
"sender"
from
the
request
topic:
the
topic
to
which
the
request
was
sent
request_data:
the
request
payload
userdata:
implementation
dependent
debug
infomation
backtrace:
the
backtrace
of
the
error
timestamp:
the
timestamp
of
the
error
}
53. The wisdom of the
masters
• Do one thing and do it well
• Design programs to be connected to other programs
• When a program has nothing surprising to say, it
should say nothing.
• When you must fail, fail noisily and as soon as
possible.
• Design for the future, because it will be here sooner
than you think.