我负责重构企业系统,使其更易于维护,可扩展和可测试.当项目启动时,团队决定使用LINQ2SQL,我们现在意识到这是一个糟糕的因为它通过在域层中实现INotifyPropertyChanged自动执行大量代码的方式.这会在某些方面导致严重的性能问题.
这是一个需要从头开始重写的中型系统.在介绍新的ORM时,我试图实现以下目标:
我目前正在评估EF和NHibernate.我倾向于使用EF,因为我相信微软将继续专注于开发它,我知道它将始终与VS很好地集成.我被告知如果我需要对我的域层进行更细粒度的控制,NHibernate是一个更好的选择.
我错过了其他任何好的选择吗?这里最好的解决方案是什么?为什么?
有没有人知道一种解决同步两个相同关系数据库的复杂性的设计模式?我一直在各种项目中遇到这个挑战,无法找到一个深入处理它的合适模式.我面临的具体挑战是:
如果有人知道解决这些挑战的模式,甚至是堆栈,我很乐意听到你的想法.我尝试过使用MS Sync Framework,虽然它确实解决了数据同步中涉及的许多问题,但就上面列出的挑战而言,它并不是一个完整的解决方案.
concurrency synchronization design-patterns atomic relational-database
我在CloudFormation模板中定义了以下安全组:
"APIInstanceSG": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Security Group for Application EC2 Instances,
"VpcId": "vpc-10a75377",
"Tags": [{
"Key": "Name",
"Value": "APIInstanceSG" }
}]
}
}
Run Code Online (Sandbox Code Playgroud)
我还定义了一个Elastic Beanstalk环境,其中包含OptionSettings中的以下内容:
{
"Namespace": "aws:autoscaling:launchconfiguration",
"OptionName": "SecurityGroups",
"Value": { "Ref": "APIInstanceSG" }
}
Run Code Online (Sandbox Code Playgroud)
当我使用此模板创建堆栈时,安全组是在CloudFormation尝试创建EB环境之前创建的,但是当它尝试创建EB环境时,它会因以下错误而崩溃:
配置验证异常:无效的选项值:'sg-994fcbe4'(命名空间:'aws:autoscaling:launchconfiguration',OptionName:'SecurityGroups'):安全组'sg-994fcbe4'不存在
Elastic Beanstalk Environment配置如下:
"AspectAPIEnv": {
"Type": "AWS::ElasticBeanstalk::Environment",
"Properties": {
"ApplicationName": "application-name",
"EnvironmentName": "environment-name",
"SolutionStackName": "64bit Amazon Linux 2016.09 v3.1.0 running Node.js",
"Tier": {
"Name": "WebServer",
"Type": "Standard"
},
"OptionSettings": [
{
"Namespace": "aws:autoscaling:launchconfiguration",
"OptionName": "EC2KeyName",
"Value": "ec2-key"
}, …Run Code Online (Sandbox Code Playgroud) amazon-web-services aws-cloudformation amazon-elastic-beanstalk aws-security-group