- Building Serverless Microservices in Python
- Richard Takashi Freeman
- 362字
- 2021-06-24 15:57:28
Overview of microservices
The term microservice arose from a workshop in 2011, when different teams described an architecture style that they used. In 2012, Adrien Cockcroft from Netflix actually described microservice as a fine-grained SOA who pioneered this fine-grained SOA at web scale.
For example, if we have sensors on an Internet of Things (IoT) device, if there's a change of temperature, we would emit an event as a possible warning further downstream. This is what's called event-stream processing or complex-event processing. Essentially, everything is driven by events throughout the whole architecture.
The other type of design used in microservices is called domain-driven design (DDD). This is essentially where there is a common language between the domain experts and the developers. The other important component in DDD is the bounded context, which is where there is a strict model of consistency that relies in its bounds for each service. For example, if it's a service dealing with customer invoicing, that service will be the central point and only place where customer invoicing can be processed, written to, or updated. The benefits are that there won't be any confusion around the responsibilities of data access with systems outside of the bounded context.
You could think of microservice as centered around a REST endpoint or application programming interface using JSON standards. A lot of the logic could be built into the service. This is what is called a dumb pipeline but a smart endpoint, and you can see why in the diagram. We have a service that deals with customer support, as follows:

For example, the endpoint would update customer support details, add a new ticket, or get customer support details with a specific identifier. We have a local customer support data store, so all the information around customer support is stored in that data store and you can see that the microservice emits customer-support events. These are sent out on a publish-subscribe mechanism or using other publishing-event frameworks, such as Command Query Responsibility Segregation (CQRS). You can see that this fits within the bounded context. There's a single responsibility around this bounded context. So, this microservice controls all information around customer support.
- 復(fù)發(fā)性口腔潰瘍中西醫(yī)結(jié)合診斷和治療
- 人體寄生蟲(chóng)學(xué)(第2版)
- Building RESTful Web Services with Java EE 8
- 現(xiàn)代口腔正畸技術(shù)與臨床思維(現(xiàn)代實(shí)用口腔醫(yī)學(xué)著譯叢書(shū))
- 圖說(shuō)超廣角熒光素眼底血管造影
- 中醫(yī)臨床技能實(shí)訓(xùn)教程
- 人感染禽流感防治知識(shí)問(wèn)答
- 原發(fā)性肝癌放射治療臨床實(shí)踐
- 圖說(shuō)災(zāi)難逃生自救叢書(shū):核與輻射事故
- 腦卒中診療與康復(fù)問(wèn)答
- 寬型與窄型QRS波心動(dòng)過(guò)速的診斷與鑒別診斷
- 200例疑難病癥診治實(shí)錄
- 常見(jiàn)老年病家庭康復(fù)操作指南
- BTK抑制劑與淋巴瘤診療病例分析
- 咽喉疾病喉鏡圖鑒