zoukankan      html  css  js  c++  java
  • 利用WhiteHose一步步建立分布式系统的框架(二)创建LDD步骤

    定义LDD

    假如你是一个系统架构设计师,首先你要根据你要开发的项目的数据中心的情况设计一个LDD

    1.      启动Whidbey并创建一个分布式解决方案在右边的模版里选择逻辑数据中心。并命名为BigCorpLDD

    添加区域或终结点

    3.      创建四个区域并命名他们为 DMZ, InternalApplicationZone, InternalTrustZone and InternetZone
      一个公司的网络通常会分为不同的块,它可能是由路由器划分成的逻辑区域。通过这个模块透视图。我们可以知道网络的划分情况。最通用的划分是一个边界的划分(PerimeterNetwork – DMZ (Demilitarized Zone)),这个区域位于公司的局域网和外边的广域网之间。所以我们要增加一个DMZ区域。其他的区域很容易理解。他们分别为内部应用程序区域、信任区域和广域网区域。

    4.      DMZ:命名它的入站结点为DMZ_InEndpoint.

    5.      DMZ: 删除缺省的出站结点,并添加一个新的出站结点并命名它为DMZ_IAEndpoint. (因为缺省的出站结点的名称不显示)

    6.      InternalApplicationZone: 命名它的入站结点为IA_DMZEndpoint. 7.      InternalApplicationZone: 删除缺省的出站结点,并添加一个新的出站结点并命名它为 IA_ITEndpoint.

    8.      InternalApplicationZone: 增加一个出站结点并命名它为IA_OutEndpoint.

    9.      InternalTrustZone: 命名它的入站结点为 IT_IAEndpoint.删除它的出站结点。

    10.  InternetZone: 删除所有的终结点。

     

    添加服务器到各个区域。

    11.  DMZ: 添加一个IIS Web Server并命名它为HardenedIIS

    a)     增加一个DatabaseClient Endpoint

    b) 配置HardenedIIS的设置和约束。(再按安全上考虑,我们要求用户模拟)

       应用程序约束->ASP.NETWebApplication->ASP.NET安全性->要求模拟->Click the Checkbox

    12.  DMZ: 增加一个Database Server并命名它为 StateServer

    13.  InternalApplicationZone: 增加一个Windows Client 并命名它为WindowsServer

    a)   增加一个 HTTPClient Endpoint

    14.  InternalApplicationZone: 添加一个IIS Web Server并命名它为 AppServer

    a)     增加一个 HTTPClient Endpoint

    15.  InternalApplicationZone: 添加一个IIS Web Server并命名它为BrokerServer

    16.  InternalTrustZone: 添加一个IIS Web Server并命名它为DALServer

    a)     删除 HTTPClient Endpoint

    b)     增加一个DatabaseClient Endpoint

    17.  InternalTrustZone: 增加一个Database Server并命名它为 DataServer

    18.  InternetZone: 添加一个IIS Web Server并命名它为ExWebServer1

    a)     删除 HTTPClient Endpoint

    19.  InternetZone: 添加一个IIS Web Server并命名它为ExWebServer2

    a)     删除 HTTPClient Endpoint

    连接服务器和区域。

    20.  DMZ: 利用连接工具连接HardenedIIS DatabaseClient Endpoint StateServer的DatabaseServer Endpoint

    21.  DMZ: 连接HardenedIIS Website Endpoint区域的入站Endpoint DMZ_InEndpoint

    22.  DMZ: 连接HardenedIIS HTTPClient Endpoint区域的的出站Endpoint DMZ_IAEndpoint

    23.  DMZ: 连接 区域DMZ的出站终结点DMZ_IAEndpoint到区域InternalApplicationZone的入站终结点IA_DMZEndpoint

    24.  IAZ: 连接 AppServer Website终结点到区域InternalApplicationZone的入站终结点 IA_DMZEndpoint

    25.  IAZ: 连接AppServer HTTPClient终结点InternalApplicationZone的出站终结点IA_ITEndpoint

    26.  IAZ: 连接AppServer 的另外一个 HTTPClient 终结点到BrokerServerWebSite终结点。

    27.  IAZ: 连接BrokerServer HTTPClient 终结点到区域 InternalApplicationZone的终结点IA_OutBoundEndpoint

    28.  IAZ: 连接Zone IA_OutEndpoint to the InternetZone

    29.  IAZ: 连接 WindowsServer HTTPClient endpoint to the AppServer, a Website endpoint is created.

    30.  IAZ: 连接区域InternalApplicationZone的出站终结点IA_ITEndpoint 到区域InternalTrustZone区域的入站终结点IT_IAEndpoint

    31.  ITZ: 连接DALServer Website Endpoint IT_IAEndpoint

    32.  ITZ: 连接the DALServer Database Clientthe DataServer.

    33.  InternetZone: 连接 ExWebServer1 Website Endpoint 到区域的 Endpoint

    34.  InternetZone: 连接ExWebServer2 Website Endpoint到区域的Endpoint

    35.  保存并关闭diagram and solution.
     

     

     

    准备 OrderTracking wsdl 文件

    1           创建一个新的web service 工程并命名为 “OrderStatus”  

    2           删除缺省的web Service并新建一个Webservice,且命名为 OrderStatus  

    3           增加以下的WebMethod

    [WebMethod]
        public System.Xml.XmlDocument TrackOrder(string customerId, int orderId)
        {
            return new
    System.Xml .XmlDocument();
        }

    5 保存并关闭工程。

    准备PaymentVerification file

    1           创建一个新的web service 工程并命名为PaymentVerification

    2           删除缺省的web Service并新建一个Webservice,且命名为 PaymentVerification

    3           增加以下的WebMethod

    [WebMethod]
        public bool Validate(string cardNumber, System.DateTime expDate)
        {
            if (expDate >= System.DateTime.Today)
            {
                int total = 0;
                int temp = 0;
                char[] ccDigits = cardNumber.ToCharArray();
                for (int i = 0; i < cardNumber.Length; i++)
                {
                    if (((i + 1) % 2) == 0) { total += int.Parse(ccDigits[i].ToString()); }
                    else
                    {
                        temp = int.Parse(ccDigits[i].ToString()) * 2;
                        if (temp > 9)  { temp = (int)temp - 9; }
                        total += temp;
                    }
                }
                if ((total % 10) == 0) { return true; }
                else { return false; }
            }
            else { return false; }
        }
    5 保存并关闭工程。

    Prepare OrderTracking wsdl file

    1           创建一个新的web service 工程并命名为OrderManager(用HttP)

    2           删除缺省的web Service并新建一个Webservice,命名为:OrderManager

    3           添加mentVerification web service (e.g. http://localServer/PaymentVerification/PaymentVerification.asmx)) and call the Web reference name PaymentVerification.

    4           增加以下的代码

    PaymentVerification.PaymentVerification verification = new PaymentVerification.PaymentVerification();
        [WebMethod]
        public bool VerifyCreditInfo(string cardNum, System.DateTime expireDate)
        {
            return verification.Validate(cardNum, expireDate);
        }

    6 保存并关闭工程。

    利用WhiteHose一步步建立分布式系统的框架(一)--概述
    利用WhiteHose一步步建立分布式系统的框架(三)--创建AD步骤(定义AD的第一部分)
  • 相关阅读:
    pymssql连接Azure SQL Database
    Python升级后ssl模块不可用问题解决和浅析
    CentOS 7升级Python到3.6.6后yum出错问题解决总结
    Python监控SQL Server数据库服务器磁盘使用情况
    fastjason常用方法
    类型擦除真的能完全擦除一切信息吗?java 泛型揭秘
    spring boot打包成war包的页面该放到哪里?
    为什么delete后磁盘空间没有释放而truncate会释放?
    leetcode 977. Squares of a Sorted Array
    leetcode 844. Backspace String Compare
  • 原文地址:https://www.cnblogs.com/dwfbenben/p/337605.html
Copyright © 2011-2022 走看看