﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-深蓝色心情</title><link>http://www.blogjava.net/darkbluefeeling/</link><description>过来聊聊~~~~</description><language>zh-cn</language><lastBuildDate>Wed, 29 Apr 2026 16:51:19 GMT</lastBuildDate><pubDate>Wed, 29 Apr 2026 16:51:19 GMT</pubDate><ttl>60</ttl><item><title>万众期待的guzz新版终于发布啦！各种期待的功能噢～～</title><link>http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Wed, 18 Jul 2012 00:32:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/383361.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/383361.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/383361.html</trackback:ping><description><![CDATA[<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">亲爱的你萌是不是觉得哀家已经放弃了小谷子，不不不，原因只是因为哀家最近比较懒木有更新而已。哀家每年总有那么十来个月是比较懒的～～【望天</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">不过，这次更新绝对有货！在7月中发，也用来纪念我家的小桔梗殿下吧。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; text-align: left; background-color: #ffffff; font-size: large; "><strong>guzz 1.3.1 20120712更新介绍：</strong></span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">大版本更新噢：</strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">1. 动态拼接SQL终于发布啦，等的花都谢了。现在，乃可以写一个有条件的sql语句，然后在执行时，guzz娘会根据传入的参数构造成真正需要的sql语句，然后再绑定参数执行。古娘默认是基于Velocity模板实现的，于是动态SQL拼接的语法、灵活性、易用性、学习成本是绝对足够的，velocity文档也是绝对的丰富和成熟。来仔细瞧瞧吧：</span><a href="http://code.google.com/p/guzz/wiki/TutorialTemplatedSQLService?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialTemplatedSQLService?wl=zh-Hans</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">2. 受够了一个一个的添加域对象到guzz.xml中？是解放自己的时候啦。面对着大半年来的各种诉求，1.3.1版这次终于良心发现，增加了package-scan功能【泪目】。咱们也可以扫描文件并批量添加business啦。介是这个脑残：</span><a href="http://code.google.com/p/guzz/wiki/TutorialHbmPackageScan?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialHbmPackageScan?wl=zh-Hans</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">3. 在SQL中写时间串就报错？ 虽然是小功能，但转义字符支持这次还是放出来啦。不害怕SQL注入，一门心思拼接SQL语句的孩纸们请看这里：</span><a href="http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans#sql语句中特殊字符转义" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans#sql语句中特殊字符转义</a><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">&nbsp;。搞死就这么玩吧，勇士们自己被黑了求别黑我家小谷子。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">4. JDNI数据源这次也支持啦。感谢波波提供的代码。借机也感谢波波提供的其他代码。</span><a href="http://code.google.com/p/guzz/wiki/TutorialDatasourceProvider?wl=zh-Hans#guzz内置连接池实现" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialDatasourceProvider?wl=zh-Hans#guzz内置连接池实现</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">5. 其他小功能和bug修正，本宫就不废话了。亲爱的你萌有兴趣就自己去对比SVN代码吧。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">下面照例复制下宣传介绍。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; text-align: left; background-color: #ffffff; font-size: large; "><strong>什么是guzz?</strong></span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">guzz是一套用于多数据库编程的Java ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">guzz主要功能与特点：</strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">新浪微博：</strong><a href="http://weibo.com/guzzframework" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://weibo.com/guzzframework</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">扣扣群：</strong><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">&nbsp;36429094&nbsp; 218658794</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">Mail List：</strong><a href="https://lists.sourceforge.net/lists/listinfo/guzz-mail-users" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">https://lists.sourceforge.net/lists/listinfo/guzz-mail-users<br /><br /></a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/383361.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2012-07-18 08:32 <a href="http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.3.0 多配置文件支持发布</title><link>http://www.blogjava.net/darkbluefeeling/archive/2012/02/22/370523.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Wed, 22 Feb 2012 07:29:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2012/02/22/370523.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/370523.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2012/02/22/370523.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/370523.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/370523.html</trackback:ping><description><![CDATA[<span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; font-size: large; "><strong style="font-weight: bold; ">guzz 1.3.0 20120222更新介绍：</strong></span>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">本次为改进型更新：</strong>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">1. 增加了默认的多properties配置文件支持。方便配置管理和部署。详细介绍[url] http://code.google.com/p/guzz/wiki/TutorialAppProperties?wl=zh-Hans[/url]&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">2. WriteTemplate增加了2个新接口，方便更好的进行sql语句直接操作。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">3. 修正了打印sql语句的错误配置方式。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; font-size: large; "><strong style="font-weight: bold; ">什么是guzz?</strong></span>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">guzz是一套用于多数据库编程的ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">guzz主要功能与特点：</strong>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">http://code.google.com/p/guzz/</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">新浪微博：</strong><a href="http://weibo.com/guzzframework" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">http://weibo.com/guzzframework</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">扣扣群：</strong><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">&nbsp;36429094&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">Mail List：</strong><a href="https://lists.sourceforge.net/lists/listinfo/guzz-mail-users" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; ">https://lists.sourceforge.net/lists/listinfo/guzz-mail-users</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #f7f7f7; " /><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/370523.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2012-02-22 15:29 <a href="http://www.blogjava.net/darkbluefeeling/archive/2012/02/22/370523.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对于12306，我的完整技术方案</title><link>http://www.blogjava.net/darkbluefeeling/archive/2012/01/16/368608.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Mon, 16 Jan 2012 11:48:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2012/01/16/368608.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/368608.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2012/01/16/368608.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/368608.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/368608.html</trackback:ping><description><![CDATA[<div><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">12306主要就是卖票比较复杂，注册登录之类的功能就不说了。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">有网友说，12306卖票系统比航空复杂，因为要分段卖，航空只有起点和终点，火车中间还有好多站。不过好消息是，这些站在售票时是连续的，不会出现1张票跳着站买的情况，这样就可以把一张票拆成N张只有起点和终点的票，和航空售票一样了。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">卖票分为两部分，查询和购买。12306目前提供了单独的查询，我觉得这个其实挺好的，至少有读写分离的思想；不过延迟10分钟的数据，肯定没什么人愿意用，大家还是要挤进购买系统查询。单独的查询相当于摆设了，没有发挥作用。要让查询系统有效，尤其是春运期间，延迟应该在30秒之内。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">查询剩余票数设计：&nbsp;<br /></strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">查询的特点是按照车次信息或者时间查，车次和时间一般都不会变，因此在设计时，可以把页面分成两部分。一是匹配的车次列表信息，如北京到上海有哪些车，这个结果可以用CDN缓存。车次基本是固定的，缓存设置为10分钟应该就能满足需要。不占用负载。在浏览器拿到这个页面后，通过异步请求，根据每趟车的编号二次查询剩余票数等实时数据，合并显示。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">车次查询时，把车次信息分库存储，并作冗余存储。好比这个库提供所有北京-&gt;xxx的查询，这个库提供上海到xxx的查询，这个库提供广州到xx的查询，剩下的在一个大库中等。车次变化很小，库可以分散存，而且可以冗余存储。用内存表也行，总数据量也不多，性能上没什么可说的。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">对于实时票数，确实是比较困难的，网上很多方案都不对，没有考虑中间站的问题。剩余票数缓存并不好做。我的想法是，提前分好票，然后用单独的数据结构做缓存。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">例如，对于G113高铁，共有8站：北京、德州、济南、徐州、南京、常州、苏州、上海。假设它有两千张票，座位啊卧铺啊啥的。在发票前，创建新表20120113_G113，然后把2000张票提前插入到表中，每个票都有一个本表内唯一的数字编号。表结构基本上就是：编号、起始站、终点站、座位类型、车厢、座位号、乘客姓名、乘客证件号码、车票状态等实际业务模型需要。初始化时，起点站就是北京（根据顺序存储为1），终点站就是上海（根据顺序存储为8），乘客信息空着表示尚未绑定乘客，车票状态置为&#8220;待出售&#8221;。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">这样我们要查询2012年1月13号G113 济南-&gt;南京 的剩余票数时，就查询20120113_G113起始站编号大于等于3并且小于等于5，并且状态为&#8220;待出售&#8221;的记录数就行了。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">每张表2000条数据，对于非春运时节，性能完全足够。对于春运时节，非繁忙路段，性能应该也足够了。对于春运繁忙期，继续看下面的。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">车票出售基本流程：&nbsp;<br /></strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">用户选择车票并要求购买，系统锁定票并标记状态为&#8220;锁定中&#8221;，让用户付款等。完成后标记车票为&#8220;已经发售&#8221;，并且更新用户信息到车票的持有人信息字段中。此票不再出售。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">对于中间站购票，假设用户购买了 济南-&gt;南京 ，前面流程不变。但完成出票后，将车票起始和终点站改为&#8220;济南&#8221;和&#8220;南京&#8221;，并且自动插入两张新票可用。一张是&#8220;北京-&gt;济南&#8221;，一张是&#8220;南京-&gt;上海&#8221;，通知队列更新相关缓存。相当于车票做了自动分裂。这样我们设计时只需要把一张票设计为&#8220;只有起点和终点&#8221;就行了。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">更高效的剩余票数查询设计：&nbsp;<br /></strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">数据库的count操作并不快，因此对于繁忙季节的繁忙表，每次都count是铁定不行的。我想到的一个办法是：把上面提到的预售车票表加载到内存中。我们用一个64位long类型数字表示一张车票，每趟车的每种座位类型是一个long数组。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">对于每个long数字，前面的32位用来顺序存储32个车站（假设一趟车最多有32个站，没查过，不行可以放长点），每一位标记&#8220;车票是否包含此站&#8221;。如G113 济南到南京的票（车站顺序为第3到第5站），long数字的第2到第4位设置为1，其他前32位设置为0。后面的32位用来表示车票在车票出售表中的唯一编号。这样根据一个long类型数字，我们就能表述一张票的发售信息了。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">比如2012年1月13号G113，有软卧500张和硬卧1500张。那就需要两个数组。20120113_G113_软卧 对应一个长度500的long数组；20120113_G113_硬卧 对应一个长度1500的long数组。存储所有售票信息。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">有点类似BitSet的感觉，对空间要求不高。我们可以做个系统把所有车票信息按照这种结构加载到内存中。对于实时查票，如查询2012年1月13号G113车次 济南-&gt;南京 的余票，就是遍历两个数组，检查位数为2和4的long数字有多少个，就直接获得了软卧和硬卧的剩余票数。对于现代计算机，这点遍历，时间是纳秒级的。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">当车票被出售后，从long数组中删除票信息，比如先置为-1表示已经无效。再用后台线程实际删除（避免写冲突，将删除延迟到重建一个数组所消耗的多少纳秒内刚好没有写请求的时间段中）。如果long数组长度为0，那就是没有车票了，直接返回0；用户再怎么刷，也不会干扰数据库。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">更高效的剩余票数查询方案的扩展性和容错性：&nbsp;<br /></strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">本身车票是按照车次划分的，同时也有时间维度，横向扩展不存在任何问题。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">long数组可以根据数据库票务信息重新构造，而且成本不高（一条&#8220;select * from xxx where 状态=待发售&#8221; SQL语句）。在硬件故障，扩容机器，或是发现数据不一致时，重新构造数组就行。而且可以从后台异步做。扩展性和容错性都不是问题。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">售票交易与锁票：&nbsp;<br /></strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">用户查询到有票后，填写要购买的票数，提交。好比购买两张硬卧，流程如下：&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">1. 在20120113_G113_硬卧long数组中随机获取符合要求的顺序的两个long数字，并将其从数组中删除；这个速度很快，纳秒级；&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">2. 根据long数字后32位，从数据库中锁票。如果全部锁定成功，设置票为预定状态，更新用户预定信息，锁票时间等。然后记录日志等其他相关操作。如果锁票失败，说明在纳秒级的时间内，票还是有冲突，购票失败，直接返回报错。锁票就是数据库行锁，sql中的 select for update nowait。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">3. 页面提示错误，或者进入下一步交易流程，如网银支付等。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">在整个过程中，我们看到，用户请求就算集中爆发，事务的冲突性也能降低到&#8220;随机获取的long数组值刚好一样 + 在cpu执行2000个for循环的可能百万分之一秒内刚好同时提交&#8221;。我觉得冲突概率应该很低很低。一趟车2000个车票，1：100比例也就20万人同时抢，20万人同1秒提交cpu也算的过来。而实际上，怎么可能一秒钟有20万人同时抢一趟车的票哪&#8230;&#8230;&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">在整个过程中，大部分请求都被long数组消耗完后，直接检查long数组长度为0，提示无票拦截。进入数据库阶段的，也就是比实际的票数多一点点的有效订单而已。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><strong style="font-weight: bold; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">回票：&nbsp;<br /></strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">中间站买票的，在预定成功后，车票自动分裂，分裂的票可以通过队列调度实时的回到long数组中，继续服务。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">预定后不买的，可以通过预定时间的超时检查，后台做个线程，让票回归。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">欢迎讨论。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">微博：</span><a href="http://weibo.com/guzzframework" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">http://weibo.com/guzzframework</a>&nbsp;</div><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/368608.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2012-01-16 19:48 <a href="http://www.blogjava.net/darkbluefeeling/archive/2012/01/16/368608.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>chrome扩展程序“超级提醒”，源代码开放！</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 01 Dec 2011 05:16:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/365281.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/365281.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/365281.html</trackback:ping><description><![CDATA[<div><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #efefef; "><br /></span>chrome插件，用于统一提醒来自gmail, yahoo，hotmail，新浪微博。。。等多家主流网站的新邮件或新通知。喜欢的朋友可以加入此项目，继续加对更多网站的支持！&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><a href="http://code.google.com/p/notifyall/" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">http://code.google.com/p/notifyall/</a>&nbsp;<br /></div><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/365281.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-12-01 13:16 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz 1.3.0大版本发布，支持Spring事务</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/11/24/364686.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 24 Nov 2011 00:43:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/11/24/364686.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/364686.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/11/24/364686.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/364686.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/364686.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: guzz是一套用于多数据库编程的ORM框架，实现在一套系统中轻松使用多台数据库。在这次更新中，您可以像配置Hibernate一样配置Guzz，让Spring进行声明式的全局事务管理。Guzz Spring事务支持标准Spring事务的所有配置，除了嵌套事务和JTA。&nbsp;&nbsp;<a href='http://www.blogjava.net/darkbluefeeling/archive/2011/11/24/364686.html'>阅读全文</a><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/364686.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-11-24 08:43 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/11/24/364686.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>show下我做的消息提醒的chrome插件，免费使用，呵呵（有效果图）</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/11/18/364209.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 18 Nov 2011 03:20:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/11/18/364209.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/364209.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/11/18/364209.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/364209.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/364209.html</trackback:ping><description><![CDATA[<div><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #efefef; ">功能：显示来自Gmail, Hotmail, Yahoo Mail, Facebook, 新浪微博, 百度, 网易邮箱的未读邮件和未读消息数。并可以在提示框直接点击打开查看。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">地址：</span><a href="https://chrome.google.com/webstore/detail/pfpnamijjddnpholapdkhokmgnfkdfpp?hl=zh_CN" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">https://chrome.google.com/webstore/detail/pfpnamijjddnpholapdkhokmgnfkdfpp?hl=zh_CN</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">用于提高工作效率。&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">效果图：&nbsp;</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><img src="http://notifyall.googlecode.com/svn/wiki/raw/en_US/full_chose.png" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; "  alt="" />&nbsp;<br /></div><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/364209.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-11-18 11:20 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/11/18/364209.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.9多数据库框架更新发布</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Tue, 30 Aug 2011 09:11:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/357584.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/357584.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/357584.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #f7f7f7; "><br /><strong style="font-weight: bold; ">如无意外，本次更新为1.2.9最后一次更新，随后将进行下一个大版本的开发，设计新的功能，欢迎提供想法。</strong>&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">guzz 1.2.9 20110830更新介绍：</strong></span>&nbsp;<br /><br /><strong style="font-weight: bold; ">本次更新：</strong>&nbsp;<br /><br />1. fix issue 16. 为paramMapping 增加了type属性，用于直接指定参数类型，用于在没有java属性直接可用的情况下，为参数设置强类型。&nbsp;<br /><br />2. fix issue 14, 15。允许基于对象的数字类型，如Long, Integer设置和获取null值。修正了nullValue属性设置后无效的bug。 &#8221;null&#8221;作为nullValue的保留字，用于将默认值设置为java null对象。&nbsp;<br /><br />3. 增加了hbm.xml中新格式的支持。新支持的格式为：&nbsp;<br />&lt;property name="xxx" type="java.lang.Long"&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;column name="col_xxxx" precision="18" scale="0" not-null="true"&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;comment&gt;注释xxxx&lt;/comment&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/column&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property&gt;&nbsp;<br /><br />4. 增加了对空sql参数的检测。如 select xxx where abc in() xxx；当in 操作集合为空时，直接返回查询结果为空，避免sql错误。检测仅限于基于taglib和SeachExpression对象化的查询。&nbsp;<br /><br />5. 修订了配置管理中，连接池类型参数无法重复读取的bug。&nbsp;<br /><br />6. 工程改成了maven管理。&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">什么是guzz?</strong></span>&nbsp;<br /><br />guzz是一套用于多数据库编程的ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。<br /><br /><strong style="font-weight: bold; ">guzz主要功能与特点：</strong>&nbsp;<br /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a>&nbsp;<br /><strong style="font-weight: bold; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a>&nbsp;<br /><strong style="font-weight: bold; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br /></span><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/357584.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-08-30 17:11 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>通用操作日志系统设计。一次编写，所有项目共同使用！</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Mon, 01 Aug 2011 10:35:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/355509.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/355509.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/355509.html</trackback:ping><description><![CDATA[<br /><span class="Apple-style-span" style="font-family: Tahoma; line-height: 25px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">基于分表和自定义表结构的日志系统。真正足够灵活的，实现成本较低的通用日志架构。&nbsp;<br /><br />新浪微盘下载PDF文档：<a href="http://t.cn/aY8XIT" target="_blank" style="color: #006699; text-decoration: underline; ">http://t.cn/aY8XIT</a>&nbsp;<br /><br /><br /><br /></span><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/355509.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-08-01 18:35 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.9更新发布，支持选举服务</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 29 Jul 2011 01:14:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/355282.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/355282.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/355282.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: Arial, sans-serif, Helvetica, Tahoma; line-height: 25px; "><br /><span style="font-size: large; "><strong style="font-weight: bold; ">guzz 1.2.9更新介绍：</strong></span>&nbsp;<br /><br /><strong style="font-weight: bold; ">本次更新：</strong>&nbsp;<br /><br />1. 优化了批操作接口。增加了默认的自动提交和清除选项，使得调用者可以连续插入百万记录而不用自己计数，手工分batchSize提交。默认batchSize的大小根据数据库类型和版本，自动选择性价比最合适的；当然调用者也可以在程序中修改。&nbsp;<br /><br />2. 新提供Leader服务接口。Leader接口用于在集群环境下确认自己是不是主机，一个集群下一般只允许1台主机。新提供的LeaderService仅为接口，开发者需要根据自身情况选择适合自己的实现。halo-cloud工程实现了基于zookeeper的Leader服务，代码：[http://code.google.com/p/halo-cloud/source/browse/trunk/misc/com/guzzservices/version/impl/ZKLeaderElectionServiceImpl.java]&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">什么是guzz?</strong></span>&nbsp;<br /><br />guzz是一套用于多数据库编程的ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。<br /><br /><strong style="font-weight: bold; ">guzz主要功能与特点：</strong>&nbsp;<br /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a>&nbsp;<br /><strong style="font-weight: bold; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a>&nbsp;<br /><strong style="font-weight: bold; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br /></span><br /><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/355282.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-07-29 09:14 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>halo-cloud开源私有云平台 新增调度任务和邮件发送服务</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 07 Jul 2011 00:43:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/353842.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/353842.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/353842.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: Arial, sans-serif, Helvetica, Tahoma; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">halo-cloud介绍</strong></span>&nbsp;<br /><br /><strong style="font-weight: bold; ">halo-cloud是什么？</strong>&nbsp;<br /><br />可由1到100台机器组成，并用普通编程方式扩展的小型私有云计算平台。&nbsp;<br /><br /><strong style="font-weight: bold; ">halo-cloud有何价值？</strong>&nbsp;<br /><br />不是每个公司都像google、像淘宝、像新浪微博一样庞大，需要复杂的成千上万台机器组成的大型云计算平台，那样技术太复杂，成本太高。&nbsp;<br /><br />更没有多少中国公司会使用GAE、Amaze EC之类公共云平台，那样网络吃不消。&nbsp;<br /><br />对于普通的公司，100台以内机器组成的私有云是最好的选择。规模适中、容易开发、易于维护。&nbsp;<br /><br />我们对云不炒作，不报幻想，只是希望有了他，我在一个项目中写过一遍的功能代码，在以后的项目中可以直接用，不用重复开发。我也不需要什么这规范那规范，因为我从不打算开放成公共云，够我的主要项目用，速度快就好。&nbsp;<br /><br />总的来说：我希望我的云是个云，没有单点问题；我希望我的云可以节省我的开发和维护成本，基础功能统统只用写一遍就可以复用；我希望我的云速度快，不要有SOAP Web Service之类的问题，当我真的需要性能的时候；我希望我的云能让现有的团队来维护和继续开发，不要学一大堆东西，甚至牵扯到个人悟性上。&nbsp;<br /><br />这就是halo-cloud诞生的理由。私有的、小型的、简单的云计算基础服务平台。你可以直接使用上面的服务，也可以低成本的在上面开发自己的新服务。&nbsp;<br /><br />PS：如果你觉得云这个名字不爽，就叫他分布式基础服务吧。&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">主要更新：</strong></span>&nbsp;<br /><br />1. 新增任务调度功能。<strong style="font-weight: bold; ">项目价值：</strong>使用quartz统一实现调度，对于java项目开发基本不在需要配置调度；对于php等不具备任务功能的语言，自动获取某个页面定时执行的新功能。&nbsp;<br /><br />2. 新增邮件发送功能。<strong style="font-weight: bold; ">项目价值：</strong>对于项目开发，基本不用在配置重复的配置邮件服务器，编写邮件发送代码。只需要调用一个API即可。&nbsp;<br /><br />3. 服务器端增加客户端感知功能。编写服务器端程序时（服务提供者），新接口允许提供者获知当前调用者的IP地址和端口，用于进行权限校验等。&nbsp;<br /><br /><strong style="font-weight: bold; ">详细说明：</strong><a href="http://code.google.com/p/halo-cloud/wiki/AboutFAQ" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/halo-cloud/wiki/AboutFAQ</a>&nbsp;<br /><br /><strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/halo-cloud/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/halo-cloud/</a>&nbsp;<br /><br /><br /><br /><br /><br /></span><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/353842.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-07-07 08:43 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>