DDD~WCF做中间件,实现多个项目的缓存共享
事情是这样的,前台网站有些数据不希望每次都从数据库里读,所以,应该做个缓存,而引起缓存更新的入口来自网站的后台管理,而前台和后台被部署在不同的网站中,这时缓存的更新就成了问题,前台的缓存与后台的操作不能联系到一起,为了解决这个问题,我引入了WCF作为中间件,所以与数据库的操作,读,写都来自一个入口,那就是WCF,WCF用户告诉你是否从缓存取数据,所有缓存的数据也缓存在WCF中,OK,想法不错,下面来说一下具体的实现步骤。
一 首先看一下结构图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAl8AAAFvCAIAAAD7Tzl6AAAgAElEQVR4nO29aWxj533/K7RIA/jCQQvkP7j/3CJImr4YtDVS3N4GDVLccZV4bdzJJHbiMeyO7cS5HdtFnHSSSeNFdryMnXg8thsv4xk7jyiR4uGiXSIlahdFaqdEidqofaNELRRJUSOKFHlfnBmJPDxcRB3yIQ+/H/wAwyJ5nh8Ph8+Hz563s7Ozs7MzNDR0FQAAAMhtGhoaWC3msf+5evXqX//1Xz8OAAAA5Cr//M///Nhjj4XZ8ZNPPjl37lwQAAAAyFWuXLny7LPPwo4AAADAIbAjAAAAwAV2BAAAALjAjgAAAAAX2BEAAADgAjsCAAAAXGBHAAAAgAvsCAAAAHCBHQEAAAAusCMAAADABXYEAAAAuMCOAAAAABfYEQAAAOACOwIAAABcYEcAAACAC+wIAAAAcIEdAQAAAC6wIwAAAMAFdgQAAAC4wI4AAAAAF9gRAAAA4AI7AgAAAFxgRwAAAIAL7AgAAABwgR0BEA+BQGBz02GdnDKbhxEI0cf4+MTGxobf70/Ftwl2BEAkzM7NNzQ2S2UMApFTUVffMDU1LfgXKq12DAQCi4tLQ0MWY2c34vjRbxqYm5vf3d1NxYcFsgun08ko1HJGZTYP2+1r2wDkABsbG6Nj4yp1uVTGTM/MCvudSp8dp2dm6+sbqf/KEF/U1NZNTFgDgYDgHxnIFgKBQF19A6NQb246aOcCQLrZ3d2tqtYoVaU7N24IeNk02XF7e5tRqBmF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9qOl3Q8U3qVSQi16Kg45uXmk5fL7sslTHGzm7aX4isBHYEQHg8Hs+geVipVktlDAJBK0orykZGxvb2YuygB6ICOwKQKpxOp3Vyqqe339jZjUCkM3p6+62TU06nk/aXIIuBHQEAAAAusCMAAADABXYEAAAAuMCOAAAAABfYEQAAAOACOwIAAABcYEcAAACAC+wIAAAAcIEdAQAAAC6wIwAAAMAFdgQAAAC4wI4AAAAAF9gRAAAA4AI7AgAAAFxgRwAAAIAL7AgAAABwgR0BAAAALrAjAAAAwAV2BAAAALjAjgAAAAAX2BEAAADgAjsCAAAAXGBHAAAAgAvsCAAAAHCBHQEAAAAuPHa8evXq3//93xcAAAAAucr3vve9xx57LMyOnZ2dzwMAAAC5DcMwrBb/f4i2TDX/o8dJAAAAAElFTkSuQmCC" alt="" />
注意看我的结构图,前台aop_cache和后台aop_cache_background项目都引用aop_cache_webservice项目,而它们没有对数据层aop_cache_data的引用,这个aop_cache_webservice是一个WCF项目,主要实现与数据层的通讯工作,当然也可以与BLL业务层通讯,这个架构主要是讲如何实现前后台共享缓存,而并非讲架构,所以重要不再架构,而在实现共享缓存。
二 WCF层实现所需要的DLL,主要是unity,cache,interception,log4net等,如图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXYAAACbCAIAAAD5kSfaAAANzklEQVR4nO2cP44cNxaHfQ4FHfoCusGcQop1AF3BkUJvrEyAbChWaAcKfABjFytg4d1ox4mDBWxjgcIau0BvMPC4xPeHjyyyisX+PhCDHjb53u+xq35VPdPNz56+vj59fX3x/vrv364Pj4NtWZa7u7tffv7VaXd3d8uyyLnXq/lAjqHRaKdoP/30r8f257/87aF99vT19cX763/+W3BKL7+DxdBotMemW8yL99ff/nd9IBjowVx8sBga7daabjGP/lJkMS9fvvQt5ttvvsViaLSbarrFXK81FvPu3TvfYr788k9YDI12U62lxXz8+NG3mGfPnlVbzMNj2UOj0UZu5p97K9qyLM+fP/dd5u8//EO1GGlqEQ5fPhqN5rfGFvPq1SvfYt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="" />
三 对于unity,wcf,cache的调用上,我进行了二次封装,如图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPsAAABMCAIAAAAk31Y8AAAELklEQVR4nO2bsW7bMBCG8xwePGQIEGjMkF1PltlvkE4ZkjWakzFu1iyd2k512gKZbC+cOxg1FJE6HilZkn3fByNQKPLuaP+mCZv/mTsw14sr5ePQlQA4587GLgBgUFA82ALFgy1QPNgCxYMtUDzYQqX45XKZnYBvJ2FSqBR/eXmZLfrrxdVmvY0+UDwMg0rx8/m8KIo80XdR/LxGRuq8UdGYqSW1dT5EeRBFq/iqqqKif3hbXdyvZneri/vVw9tq17hXfPVYlWVZlmX1WG3W27Is93+FNX4vi2H0IWep302qB3FPB63inXNR0c/uVjcv70/fft28vM/uPil+J/c/v/9u1tsf33+WnzlGxfcYFoYkQfHOucViURTFx8eHPsFO8WVZvn59rW9j9Gt8fVewv25sFfydg76lEVxQZ9utjMjBf4U4vGf6IkHxy+WyKIqqqtq6ze5W9ceuMaj4jDW+3uLLItg5uAkRLoLp5GKUkTW5lKOgI1rFR+Xu/it+s976ir+9/VLf1WTs4zUtsuL9dVeTTnM3GjlP8fvIQkmQSsJ3NbLcnaj4vejLsnx+etZ/O9mj4qNx2hrlgJolueMaDz2iUvz5+XlU7k7c1XT8dlJoqbf7jRnRoqt125DGwP2//rUfR+6D9HtEpXiN3NsY8ReoYxeK/BkFeRz8XM3wpwxOaV08pblMBE6SgS1QPNgCxYMtUDzYAsWDLVA82AIPFNgCDxTYAg9UWsCj+OU/tTbNpLpMeVLPFR6ocLoB+vRFL7k0z/OkhJsNHqhwugH69AWKTwIPVDN49HX18waLEbLLs2iblzJXcAoZcTTltUUW5qh8NoJF9gIeqOQjiprs0T6aWWTX3Evkvi6U9QivXb/ggYoEj/ZRvsbR7G3v7eCoYRSvzO73keUrB2xE9ts7ggcq3ij3SVrV+moZco1PiuMUC7ZS8dFbeeCBCrw8wluosfL5120ltY1KqlAzfc2k/EqEUfJM/bFCkNSCg5PtCB6oY+L0ZjQ8eKCOhlOd18BwkgxsgeLBFigebIHiwRYoHmyB4sEWeKDAFnigwBZ4oNICNn4bHyw19AUeqHC6aIfUengPTAQ8UOF00Q4o/kjBAxU5xOfXU78I7ruSEnFUZmDwQEXOmrfVkxpHWTMcGjxQkeDRXF0Uj9yHBw9UvFHOlad4x35mJPBAhffcwQjBDv6OXFkkch8FPFCjMfHyThU8UCMw8fJOG06SgS1QPNgCxYMtUDzYAsWDLVA82AIPFNgCDxTYAg9UcsDGIbBGkfPP9FsAdAcPVDidcDeoexcqFcVPEDxQ4XTC3TbFB7vB1MAD1QweFX1jSLQPTAo8UDkeqKjiNaFgFPBARYIHO3QMAiOCByre6HeQPx9Q/JTBAyVt99tiCkHYxE8cPFBgCzxQYAtOkoEtUDzYAsWDLf4Bbpz63+mch58AAAAASUVORK5CYII=" alt="" />
四 看了这些,我们再来看一下,WEB层调用WCF层的代码片断:
public ActionResult Index()
{
// 通过WCF获取远程数据,不走缓存, 走config中的<system.serviceModel>
using (ServiceProxy<IService1> proxy = new ServiceProxy<IService1>())
{
return View(proxy.Channel.GetClassroom_Info());
}
}
web层的配置文件包含了对WCF的调用
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ServiceProxyBinding" sendTimeout="00:10:00" receiveTimeout="00:10:00" closeTimeout="00:10:00"></binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint name="IService1" address="http://www.aop.com/Service1.svc" contract="aop_cache_WebService.IService1" binding="basicHttpBinding" bindingConfiguration="ServiceProxyBinding" />
</client>
</system.serviceModel>
五 WCF层调用DAL层的代码,使用unity来做方法拦截与依赖注入,将cache功能注入到指定方法中
IClassroom_InfoRepository _iClassroom_InfoRepository = ServiceLocator.Instance.GetService<IClassroom_InfoRepository>();
public void InsertClassroom_Info(Classroom_Info entity)
{
_iClassroom_InfoRepository.InsertClassroom_InfoData(entity);
} public List<Classroom_Info> GetClassroom_Info()
{
return _iClassroom_InfoRepository.GetClassroom_InfoData();
}
六 对于WCF的配置文件,我们要重要看一下,它包含了数据库连接串的配置和unity的配置
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-aop_cache-20131030092430;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-aop_cache-20131030092430.mdf" />
<add name="TsingDa_NewLearningBarEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=TsingDa_NewLearningBar;user id=sa;password=zzl123;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings> <!--BEGIN: Unity-->
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<sectionExtension type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension, Microsoft.Practices.Unity.Interception.Configuration" />
<container>
<extension type="Interception" />
<register type="Project.Caching.ICacheProvider, Project.Caching" mapTo="Project.Caching.EntLibCacheProvider, Project.Caching" />
<!--对WCF的访问进行的注入与缓存和异常的拦截-->
<register type="aop_cache_Data.IClassroom_InfoRepository, aop_cache_Data" mapTo="aop_cache_Data.Classroom_InfoRepository, aop_cache_Data">
<interceptor type="InterfaceInterceptor" />
<interceptionBehavior type="Project.InterceptionBehaviors.CachingBehavior, Project.InterceptionBehaviors" />
</register>
</container>
</unity>
<!--END: Unity-->
<!--BEGIN: Caching-->
<cachingConfiguration defaultCacheManager="ByteartRetailCacheManager">
<cacheManagers>
<add name="ByteartRetailCacheManager" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" expirationPollFrequencyInSeconds="" maximumElementsInCacheBeforeScavenging="" numberToRemoveWhenScavenging="" backingStoreName="NullBackingStore" />
<!--
expirationPollFrequencyInSeconds:过期时间(seconds)
maximumElementsInCacheBeforeScavenging:缓冲中的最大元素数量
numberToRemoveWhenScavenging:一次移除的数量
-->
</cacheManagers>
<backingStores>
<add type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="NullBackingStore" />
</backingStores>
</cachingConfiguration>
<!--END: Caching--> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.Unity.Interception" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Warning" propagateActivity="true">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="d:\wcf.svclog" />
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
七 DAL层的实现,由接口和实现两部分组成,接口的方法上规定了是否要进行cache操作
public interface IClassroom_InfoRepository
{
[Caching(CachingMethod.Remove, "GetClassroom_InfoData")]
void InsertClassroom_InfoData(Classroom_Info entity);
[Caching(CachingMethod.Get)]
List<Classroom_Info> GetClassroom_InfoData();
}
实现很简单,只是一个测试而以
public class Classroom_InfoRepository : TsingDa_NewLearningBarRepository<Classroom_Info>, IClassroom_InfoRepository
{
public void InsertClassroom_InfoData(Classroom_Info entity)
{
base.Insert(entity);
}
public List<Classroom_Info> GetClassroom_InfoData()
{
return base.GetModel().ToList();
}
}
DDD~WCF做中间件,实现多个项目的缓存共享的更多相关文章
- 四、利用EnterpriseFrameWork快速开发基于WCF为中间件的三层结构系统
回<[开源]EnterpriseFrameWork框架系列文章索引> EnterpriseFrameWork框架实例源代码下载: 实例下载 本章内容与上一张<利用Enterprise ...
- ASP.NET Core 中间件详解及项目实战
前言 在上篇文章主要介绍了DotNetCore项目状况,本篇文章是我们在开发自己的项目中实际使用的,比较贴合实际应用,算是对中间件的一个深入使用了,不是简单的Hello World,如果你觉得本篇文章 ...
- [转]ASP.NET Core 中间件详解及项目实战
本文转自:http://www.cnblogs.com/savorboard/p/5586229.html 前言 在上篇文章主要介绍了DotNetCore项目状况,本篇文章是我们在开发自己的项目中实际 ...
- net core 中间件详解及项目实战
net core 中间件详解及项目实战 前言 在上篇文章主要介绍了DotNetCore项目状况,本篇文章是我们在开发自己的项目中实际使用的,比较贴合实际应用,算是对中间件的一个深入使用了,不是简单的H ...
- 【转载】ASP.NET Core 中间件详解及项目实战
前言 在上篇文章主要介绍了DotNetCore项目状况,本篇文章是我们在开发自己的项目中实际使用的,比较贴合实际应用,算是对中间件的一个深入使用了,不是简单的Hello World,如果你觉得本篇文章 ...
- 用jinja做了个E-Letter小项目
做了一个html E-Letter项目. 邮件模板采用jinja2, html 邮件内容生成简直太爽了. 整个项目开发只用了2个小时, 调试却花了大半天时间, 生成的邮件总是发不出去. 于是, 打开 ...
- 跟我一起做一个vue的小项目(二)
这个vue项目是紧跟着之前的项目跟我一起做一个vue的小项目(一)来的. 我继续后面的开发(写的比较粗糙,边学边记录) 下图是header头部的样式 header组件内容如下 //header.vue ...
- 使用gulp解决RequireJS项目前端缓存问题(二)
1.前言 这一节,我们主要解决在上一节<使用gulp解决RequireJSs项目前端缓存问题(一)>末尾提到的几个问题: 对通过require-config.js引入的js文件修改后,没有 ...
- 使用gulp解决RequireJS项目前端缓存问题(一)
1.前言 前端缓存一直是个令人头疼的问题,你有可能见过下面博客园首页的资源文件链接: 有没有发现文件名后面有一串不规则的东东,没错,这就是运用缓存机制,我们今天研究的就是这种东西. 先堵为快,猛戳链接 ...
随机推荐
- [C#基础实例]指定地址解析图片并下载
需求:查找页面图片并下载至本地: 实现: 首先:读取通过网络html内容,并用正则表达式查找图片地下. 其次:使用WebRequest.Create创建图片请求. 最后:把获取图片网络流数据通过Fil ...
- Sass的学习
第一章:Sass简介 一. 什么是CSS预处理器 定义:CSS预处理器定义了一种新的语言,其基本思想是,用一种专门的编程语言,为CSS增加一些编程的特性,将CSS作为目标生成文件,然后开发者就只要使用 ...
- c#对数据库访问完应关闭连接
1.对数据库的连接SqlConnection con = new SqlConnection(constr);使用完成后,应该至少应该close或dispose关闭.否则会导致数据库例如(SQl200 ...
- 积木大赛 noip2013提高组day2
这道题一开始想到处理中间是0的位置,但这样时间太慢了,后来想到一种类似二分的方法,就是把这一段的最小值找到,全部减去最小值,然后有0一出现,就又递归处理前一段,每次答案就加上这一段的最小值: AC代码 ...
- opencv在ios上的开发教程
http://docs.opencv.org/doc/tutorials/ios/hello/hello.html openCV 2.4.3 iOS background_segm.hpp 'lis ...
- 第56讲:Scala中Self Types实战详解
今天学习了self type的内容,让我们来看下代码 package scala.learn class Self{ self => val tmp = "Scala" ...
- 2.使用JDK开发webService
使用jdk开发webService需要注意:jdk版本必须1.6以及1.6以上! 以下webService的组成部分: server端和client端,通过服务器端(server)webService ...
- reduce() 函数
reduce()函数 reduce()函数也是Python内置的一个高阶函数.reduce()函数接收的参数和 map()类似,一个函数 f,一个list,但行为和 map()不同,reduce()传 ...
- ASP.NET连接远程Oracle数据库,提示试图加载格式不正确的程序
VS调试远程连接Oracle数据库,一直报错 由于本地计算机是64位的操作系统,而且也确定安装的Oracle客户端是64位的 ,但是一直提示这个错误. 试了很多方法,终于发现可能是 不能在VS中调试的 ...
- Linux常用目录