关于 WCF 中数据压缩的几篇文章
2007-12-04 16:56
281 查看
在.net3.0出现以前我们进行分布式开发式有两个选择一个是webservice,另一个是remoting;
在早期的项目中,比较喜欢remoting,因为remoting可控性好,也好部署,不需要依赖其他的宿主环境。 今年的做的项目大部分都是webservice的,因为在这几年remoting过程中遇到了几个问题,比较典型的就是remoting的宿主程序容易出现异常,并且这个异常很难捕捉,一旦宿主程序的压力过大,就会出现这个情况。比较脸红的是,这个问题到现在也没有发现是怎么产生的,也就无从说解决了
。
凡是涉及到分布式部署的项目都会有数据的传输问题:要对需要传输的数据进行压缩。较早的项目中,都是将dataset压缩为流对象(经过序列化的)后进行传递的,压缩比1/4的样子。
.net3.0的出现极大的方便了分布式项目的开发部署,在学习wcf时候,一直在寻找在wcf构架下的数据压缩方案,就将搜集到一些文章汇总在这里(这方面的东西少的可怜),供大家参考。个人比较喜欢
WS-Compression for WCF 感觉思路更清晰
ms的文章:Custom Message Encoder: Compression Encoder
http://msdn2.microsoft.com/en-us/library/ms751458.aspx,例子在TechnologySamples、Extensibility、Channels、MessageEncoder、Compression目录中
msdn社区的文章:Serialize Datasets as binary (not XML) in WCF
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1618046&SiteID=1&pageid=0#1648392 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1520385&SiteID=1,这里面Pablo Cibraro 的回复非常清晰,俺就摘录在这里了
There are basically three ways to implement compression in WCF.
1. At transport level using a message encoder which compress all the
data throughout the entire channel (From the client to the service).
There is a sample of this in the WCF SDK, [SDK
Folder]TechnologySamples/Extensibility/MessageEncoder/Compression
2. At message level, adding some metadata to the soap message (Soap
headers) and compressing the soap body. This approach can use a WCF
binding or a MessageInspector Behavior to modify the soap messages. You
can find an example here, http://weblogs.asp.net/cibrax/archive/2006/03/29/WS_2D00_Compression-for-WCF.aspx
3. Only for the Http transport, you can use the Http Compression
capability. I haven't seen any implementation of this technique so far.
I hope this can help you
Regards,
Pablo.
WS-Compression for WCF
http://weblogs.asp.net/cibrax/archive/2006/03/29/441398.aspx
继续补充中...
在早期的项目中,比较喜欢remoting,因为remoting可控性好,也好部署,不需要依赖其他的宿主环境。 今年的做的项目大部分都是webservice的,因为在这几年remoting过程中遇到了几个问题,比较典型的就是remoting的宿主程序容易出现异常,并且这个异常很难捕捉,一旦宿主程序的压力过大,就会出现这个情况。比较脸红的是,这个问题到现在也没有发现是怎么产生的,也就无从说解决了
。
凡是涉及到分布式部署的项目都会有数据的传输问题:要对需要传输的数据进行压缩。较早的项目中,都是将dataset压缩为流对象(经过序列化的)后进行传递的,压缩比1/4的样子。
.net3.0的出现极大的方便了分布式项目的开发部署,在学习wcf时候,一直在寻找在wcf构架下的数据压缩方案,就将搜集到一些文章汇总在这里(这方面的东西少的可怜),供大家参考。个人比较喜欢
WS-Compression for WCF 感觉思路更清晰
ms的文章:Custom Message Encoder: Compression Encoder
http://msdn2.microsoft.com/en-us/library/ms751458.aspx,例子在TechnologySamples、Extensibility、Channels、MessageEncoder、Compression目录中
msdn社区的文章:Serialize Datasets as binary (not XML) in WCF
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1618046&SiteID=1&pageid=0#1648392 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1520385&SiteID=1,这里面Pablo Cibraro 的回复非常清晰,俺就摘录在这里了
There are basically three ways to implement compression in WCF.
1. At transport level using a message encoder which compress all the
data throughout the entire channel (From the client to the service).
There is a sample of this in the WCF SDK, [SDK
Folder]TechnologySamples/Extensibility/MessageEncoder/Compression
2. At message level, adding some metadata to the soap message (Soap
headers) and compressing the soap body. This approach can use a WCF
binding or a MessageInspector Behavior to modify the soap messages. You
can find an example here, http://weblogs.asp.net/cibrax/archive/2006/03/29/WS_2D00_Compression-for-WCF.aspx
3. Only for the Http transport, you can use the Http Compression
capability. I haven't seen any implementation of this technique so far.
I hope this can help you
Regards,
Pablo.
WS-Compression for WCF
http://weblogs.asp.net/cibrax/archive/2006/03/29/441398.aspx
继续补充中...
相关文章推荐
- [转] 关于 WCF 中数据压缩的几篇文章
- 关于自动化报告的几篇推荐文章
- 收集的几篇关于HTML5、CSS3相关的文章
- 上次CSDN泄密事件或者合并事件反正关于XMPP方面的几篇文章都没影儿了。。。但在此做个总结,让各位做即时通讯的同学少跳几个坑
- 几篇关于Hadoop+Hive数据仓库的入门文章
- Angular 几篇关于指令的好文章收录(二)
- 【转】关于程序员技术态度的几篇文章
- 关于WCF+MVC+EF 学习系列文章整理
- 介绍几篇关于LINQ 的入门文章
- 几篇关于AdSense的文章摘录
- 几篇关于模式匹配算法的文章
- 关于GDAL的几篇文章
- 关于SOAP的几篇文章
- 关于Git的几篇文章,值得一读
- CodeProject上的最近几篇关于IronPython技术的文章
- 关于跟踪文件的几篇文章
- 几篇关于javascript的好文章,收藏
- 几篇关于multithread与游戏编程的文章,值得一读
- 刚刚看过的关于搜索引擎的几篇文章
- 几篇不错的关于android启动过程分析文章