我应该考虑的决定分裂我们的单片式web应用程序,使用DDD单独的Web应用程序时? [英] What should I consider when deciding to split our monolithic web application into separate web apps using DDD?

查看:171
本文介绍了我应该考虑的决定分裂我们的单片式web应用程序,使用DDD单独的Web应用程序时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景

我们使用微软(.NET)的技术堆栈。

We use the Microsoft (.NET) technology stack.

目前,我们有一个大的整体网络应用。我们计划如何实施领域驱动设计。结果
我们计划实施一些有界上下文微服务,但不是全部。因为它是一个整体件,
最有界上下文将住在同一个数据库中,所以我们必须确保我们的访问控制在
在code级。

We currently have a large monolithic web app. We are planning how to implement Domain Driven Design.
We plan to implement microservices on some bounded contexts, but not all. Because it is a monolith, most bounded contexts will live in the same database, so we'll have to make sure that we control access at the code level.

发布SO ,有落实界环境两个方面。

From this SO post, there are two ways to implement bounded contexts.

<bc 1>
 |_ domain
 |_ application
 |_ presentation
 |_ infrastructure
<bc 2>
 |_ domain
 |_ application
 |_ presentation
 |_ infrastructure

或以下内容:

domain
 |_ <bc 1>
 |_ <bc 2>
application
presentation
infrastructure

我们感兴趣的是第一种方法。因为看起来它会适合我们的情况。

We are interested in the first approach. because it seems like it would fit our situation.

我的问题是,我们应该考虑决定是否要拆我们的一个Web应用程序到由有限conexts单独的应用程序时。什么是一些缺点和陷阱的考虑这个方法时?

My question is, what should we consider when deciding if we should split our single web application into separate applications by bounded conexts. What are some of the drawbacks and gotchas when considering this approach?

有我们的应用程序数(为简便起见)主要领域:

There are a few (for brevity) main areas of our application:

Products
Client Administration
System Administration

当一个用户在一个特定的区域,他/她通常需要对其他领域的信息很少。

When a user is in a particular area, he/she usually needs little information about the other areas.

所有的想法和建议,欢迎。我们正在试图获得尽可能多的了解越好。

All thoughts and recommendations are welcome. We are trying to gain as much understanding as possible.

推荐答案

一个微服务的基本支柱,是的独立部署能力,所以我肯定会用的方法去1。

One of the basic underpinnings of microservices is independent deployability, so I would definitely go with approach 1.

现在在该方案中,一个微服务的presentation层并不只要前端的UI去,这通常只是一个REST API。有几种方法来设计消耗微服务前端,但如果产品客户端系统前端有不同的生命周期,我会建议有他们单独的Web应用程序。

Now in that scenario, the "Presentation layer" of a microservice doesn't go as far as the front-end UI, it's usually just a REST API. There are several approaches to designing front ends that consume micro services, but if the Product, Client and System front ends have different lifecycles I would recommend having separate web applications for them.

在这个问题上有用的文章:
http://blog.xebia.com/the-monolithic-前端-内式微服务的体系结构/
http://samnewman.io/patterns/architectural/bff/#bff

Useful articles on that subject : http://blog.xebia.com/the-monolithic-frontend-in-the-microservices-architecture/ http://samnewman.io/patterns/architectural/bff/#bff

这篇关于我应该考虑的决定分裂我们的单片式web应用程序,使用DDD单独的Web应用程序时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆