<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>huaronghu</title>
    <description>别停下脚步，前面会更好</description>
    <link>http://huaronghu.javaeye.com</link>
    <language>UTF-8</language>
    <copyright>Copyright 2003-2008, JavaEye.com</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>JavaEye - 做最棒的软件开发交流社区</generator>
      <item>
        <title>使用Hibernate_tool生成代码和映射文件 (原创)</title>
        <author>huaronghu</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://huaronghu.javaeye.com">huaronghu</a>&nbsp;
          链接：<a href="http://huaronghu.javaeye.com/blog/97689" style="color:red;">http://huaronghu.javaeye.com/blog/97689</a>&nbsp;
          发表时间: 2007年07月04日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><font face="Arial"></font>&nbsp;</p>
<p><font face="Arial">下载地址：http://www.hibernate.org/255.html<br />
它支持Eclispe插件方式和Ant方式。这里主要将采用Ant方式。这样可以脱离Eclipse :)</font></p>
<p><font color="#008080" face="Arial"><strong>1 准备好Hiberbate.properteis. 主要是告诉工具取哪的数据库和表格</strong></font></p>
<p><font face="Arial">hibernate.dialect org.hibernate.dialect.MySQLDialect<br />
#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect<br />
#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect<br />
hibernate.connection.driver_class com.mysql.jdbc.Driver<br />
hibernate.connection.url jdbc:mysql://localhost/uniform_user<br />
hibernate.connection.username sso<br />
hibernate.connection.password sso</font></p>
<font face="Arial">
<p><br />
<strong><font color="#008080">2 编写Ant脚本。这一步是要定义ant任务，以及生成POJO和HBM.XML配置文件</font></strong><!--l version="1.0--></p>
<p><font face="Arial">《?xml version=&quot;1.0&quot;?》<br />
《project name=&quot;UniformUser Hibernate&quot; default=&quot;all&quot; basedir=&quot;.&quot;》</font></p>
<p><font face="Arial">&nbsp;&nbsp; 《property name=&quot;name&quot; value=&quot;yidong&quot;/》<br />
&nbsp;&nbsp; 《property name=&quot;web.dir&quot;&nbsp; value=&quot;F:/winson/project/sso/develop/UniformUser&quot;/》<br />
&nbsp;&nbsp; 《property name=&quot;ant.lib.dir&quot;&nbsp; value=&quot;D:/apache-ant-1.7.0/lib&quot;/》<br />
&nbsp;&nbsp; 《property name=&quot;hibernatetools.lib.dir&quot;&nbsp; value=&quot;H:/Open Source/Hibernate/HibernateTools-3.2.0.beta9a/plugins/org.hibernate.eclipse_3.2.0.beta9a/lib/tools&quot;/》<br />
&nbsp;<br />
&nbsp;&nbsp; 《path id=&quot;lib.class.path&quot;》<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《fileset dir=&quot;${web.dir}/WebRoot/WEB-INF/lib&quot;》<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《include name=&quot;*.jar&quot;/》<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《/fileset》<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《fileset dir=&quot;${ant.lib.dir}&quot;》<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《include name=&quot;*.jar&quot;/》<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《/fileset》<br />
&nbsp;&nbsp; &nbsp;&nbsp; 《fileset dir=&quot;${hibernatetools.lib.dir}&quot;》<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《include name=&quot;*.jar&quot;/》<br />
&nbsp;&nbsp; &nbsp;&nbsp; 《/fileset》<br />
&nbsp;&nbsp; 《/path》<br />
&nbsp;<br />
&nbsp;&nbsp; 《taskdef name=&quot;hibernatetool&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classname=&quot;org.hibernate.tool.ant.HibernateToolTask&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref=&quot;lib.class.path&quot; /》</font></p>
<p><font face="Arial"><br />
&nbsp;《target name=&quot;all&quot;》 <br />
&nbsp;&nbsp;&nbsp;&nbsp; 《hibernatetool destdir=&quot;${web.dir}/src&quot;》 <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《jdbcconfiguration propertyfile=&quot;${basedir}/hibernate.properties&quot; packagename=&quot;${name}.sso.entity&quot; /》&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 《hbm2java jdk5=&quot;true&quot; /》&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 《hbm2hbmxml /》<br />
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 《hbm2cfgxml /》<br />
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 《hbm2dao /》 <br />
&nbsp;&nbsp;&nbsp;&nbsp; 《/hibernatetool》 <br />
&nbsp;《/target》&nbsp; <br />
《/project》 <br />
</font></p>
<p>任务all 用于生成POJO和DAO和映射文件及hibernate.cfg.xml<br />
其中lib.class.path必须包括ant的lib目录以及hibernate、hibernate-tools的lib目录。</p>
<p><u><strong>参考资料：http://blog.sina.com.cn/u/492db961010009ji</strong></u></p>
<p>&nbsp;</p>
</font>&nbsp;
          <br/>
          <span style="color:red;">
            <a href="http://huaronghu.javaeye.com/blog/97689#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Wed, 04 Jul 2007 11:25:24 +0800</pubDate>
        <link>http://huaronghu.javaeye.com/blog/97689</link>
        <guid>http://huaronghu.javaeye.com/blog/97689</guid>
      </item>
      <item>
        <title>一份游戏系统设计初稿文档[原创]</title>
        <author>huaronghu</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://huaronghu.javaeye.com">huaronghu</a>&nbsp;
          链接：<a href="http://huaronghu.javaeye.com/blog/37922" style="color:red;">http://huaronghu.javaeye.com/blog/37922</a>&nbsp;
          发表时间: 2006年12月08日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><font face="Arial"><strong><font color="#ff0000">1、&nbsp;系统架构特点</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp; 1)、系统的数据库是分布式存储设计的，支持海量级数据存储；<br />
&nbsp;&nbsp;&nbsp; &nbsp;2)、引入Session Server和Cache实现，从而来避免频繁数据库访问对系统造成性能瓶颈；<br />
&nbsp;&nbsp;&nbsp; &nbsp;3)、系统是多线程的、异步的<br />
&nbsp;&nbsp;&nbsp;&nbsp; 4)、系统是可被实时监控的，可以实时隔离<br />
&nbsp;&nbsp;&nbsp;&nbsp; 5)、系统是安全的，用户在登录系统后，系统会生成一个随机的、不可伪做的加密串，<br />
　　&nbsp;&nbsp;&nbsp; 后面操作需要获取用户的信息只有通过些加密串来获取；<br />
&nbsp;&nbsp;&nbsp;&nbsp; 6)、系统的扩展是非常灵活的，所有业务功能均可作为组件方式以Webservice标准接口发布出去，<br />
　　&nbsp;&nbsp; 类似 SOA 的作法。</font></p>
<font face="Arial">
<p><br />
<strong><font color="#ff0000">2、　　分布式存储设计</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong> 2.1&nbsp; 索引数据库表设计<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.1.1、首先建立有规则的，可分段管理的ID段</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.1.2、xxx ，因为涉及到商业秘密，所有先去掉了</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
　　<strong>　2.2　数据库分布式存储设计<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 数据库是基于分布式存储设计的，可以支持海量级数据存储；<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 数据库是通过&ldquo;用户号码段&rdquo;的定义，对用户的数据进行分散存储；<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 而号码段表的数据如下：<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id_range&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql instance<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1000~5555555段&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.1.5<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5555556~10000000段&nbsp;&nbsp;&nbsp; 192.168.1.6<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>2.3&nbsp; Session Server 分布式存储设计<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 以分区做法存储 Session 的数据，用户在进入游戏之前，先选择一个区再进入。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这样用户的所有数据就存在选择的Session Server上。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 每个Sesson Server有用户数量要求，当达到一定的用户数量，将拒绝其他用户进入。</p>
<p><br />
<strong><font color="#ff0000">3、&nbsp;安全性</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp; 3.1：存储加密<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用户在登录系统后，系统会生成一个随机的、不可伪做的加密串，即生成一个在线用户及此用户对应的Key(加密串)，<br />
　　其他操作通过此Key来获取用户的信息，包括各人物及人物属性；<br />
　<br />
　　　　　加密串的生成规则如下：<br />
&nbsp;由ID+客户端ip+随机码+当前时间（毫秒）组成，然后通过由Md5加密生成。<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这个加密串只会给一个用户一次登录使用，过期将不再有效。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>3.2：防止恶意攻击<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用户登录成功游戏之后，所有操作都会异步记录到主库的日志表中，已记录用户每天做了什么操作。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这份数据是每天一份，同样也是分布式存储的（具体实现详见高效性章节）。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 防止恶意攻击也是利用这份数据进行统计的，每台Http server的Linux有一定时程序，会定时读取这份数据，<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如果发现某号码符合恶意攻击规则，则会将此号码写入到黑名单中，并拒绝操作；<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 即便被攻破，系统对于关键操作也要留下操作日志到日志文件中，如log4j日志文件，以便事后诸葛；</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
4、&nbsp;高效性<br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong> 4.1　Cache及Session Server的设计<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.1：Cache<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于xxx等不会经常变化的实体信息，可放入Cache中（如OSCache），减少对主数据库的访问；<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.1.2：Session Server<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于xxxxx等实时性要求较高的值，可放入到 Session Server中，每次需要读取或更新<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 值都到Session Server中读取，减少对主数据库的频繁访问。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一个xx第一次登录，会从主数据库中读取它的所有属性出来放到Session Server中，此后只要此xx在线，所有<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx属性的值变更都是与Session Server交互操作，而系统会定时从Session Server取得数据与主数据进行同步。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session Server使用 Mysql Memory（Engine）来实现；同时 Session Server是集群式，有N台Cluster节点进行数据复制备份，保证Session Server的稳健性；<br />
&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;<strong> 4.2&nbsp; 异步处理、队列设计、Socket长连接<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp; 　　 4.2.1 开发思路介绍<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 系统使用 wap表现层+中间件，中间件实现所有业务逻辑，是用异步IO Socket实现的，可以减少线程的创建和discard所带来的性能消耗，在同步Socket中，一般做法是创建一定数量的线程组成线程池，如果数量过多，性能是比较低的，因为当Linux OS在处理超过1000线程时，各线程换页的性能是很低下的。使用异步 IO Socket（即Java NIO）的好处是性能高，由中间件统一管理Session、Cache和Database;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Http server只处理显示页面逻辑部分，而业务逻辑部分是在中间件实现的。Http Server与中间件通过TCp Socket进行通信。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.2 异步处理<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于用户每次操作都需要记录日志的功能，可以使用异步处理的方式来处理，Socket客户端把请求异步<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发送给Socket服务器端，无需等待结果返回，提高性能<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.3 Socket长连接<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于游戏用户，常用的场景是用户长时间停留在系统操作，故客户端应该Keep Socket连接不关闭，减少经常<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 创建Socket所带来的性能消耗;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.2.4 队列设计<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于用户的请求，如果中间件处理不过来，会使用一定数量的队列来存放它，当中间件空闲时，会读取队列进行处理，<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 提高系统吞吐量；<br />
&nbsp;<br />
&nbsp;<br />
<strong><font color="#ff0000">5、&nbsp;健壮性<br />
</font></strong>&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;&nbsp;&nbsp; 5.1 数据库集群和备份</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于基于Memory存储的数据库，可以使用数据库的Cluster机制进行数据实时同步和备份，不会造成单点危险。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于基于disk存储的数据库，可以使用数据库的Cluster机制或采用C-JDBC中间件进行数据实时同步和备份。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>5.2 中间件冗余设计<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 可以在同一服务器上使用不同端口启动同一中间件，从而实现功能冗余<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp; 5.3 Http Server集群</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 利用 移动DNS功能，搭建N个Http Server来提高应用的吞吐量和性能<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
<strong><font color="#ff0000">6、&nbsp;扩展性（SOA）</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>6.1 组件抽象化：<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.1&nbsp; 抽象化组件及定义好接口，所以实现基于接口来开发；组件以接口的方式提供，而实现类是可以随意切换的，这部分使用Ioc容器实现；<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6.1.2 接口需足够灵活，足够抽象，应包揽系统所有功能，并供外部本地JVM调用或远程调用；<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong> 6.2 业务功能可重用：<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 使用远程调用方式，如使用web service或其他远程调用方式，如基于二进制数据传输的hessian或基于xml的burlap。</p>
<p><br />
<strong><font color="#ff0000">7、&nbsp;自适应性</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>7.1 模块可测试<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 应用程序是基于 JDK5.0上开发的，利用JDK5.0自带的JMX功能，可以实时监控到应用程序的运行情况。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong> 7.2 模块自检<br />
</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于关键功能和应用，如果发现故障，系统会自动报故障，以email或手机方式发送给维护人员。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
<strong><font color="#ff0000">8、&nbsp;独立性</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 利用 JMX 可以实时、快速且不影响运行的情况下，隔离有问题的接入系统<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
<font color="#ff0000"><strong>9、&nbsp;&nbsp;&nbsp; 系统基础平台选型</strong></font><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OS: Redhat Enterprise Linux 4<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JDK: Jdk 5.0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mysql: mysql 5<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Servlet Server: tomcat 5<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Web Server: Apache 2.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Database Backup middelware: Mysql Cluster、C-JDBC（备选）<br />
&nbsp;&nbsp;&nbsp; <br />
<strong><font color="#ff0000">10、　　系统软件架构选型</font></strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; View：Wap1.0/Wap 2.0 + FreeMarker<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MVC: Webwork 2.16<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IOC/AOP：Spring 2.0<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORM：IBatis、Hibernate（备选）<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Java NIO：Cindy</p>
</font>
          <br/>
          <span style="color:red;">
            <a href="http://huaronghu.javaeye.com/blog/37922#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 08 Dec 2006 09:49:24 +0800</pubDate>
        <link>http://huaronghu.javaeye.com/blog/37922</link>
        <guid>http://huaronghu.javaeye.com/blog/37922</guid>
      </item>
      <item>
        <title>Suse Linux 下安装 ruby on rails 的问题处理</title>
        <author>huaronghu</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://huaronghu.javaeye.com">huaronghu</a>&nbsp;
          链接：<a href="http://huaronghu.javaeye.com/blog/37918" style="color:red;">http://huaronghu.javaeye.com/blog/37918</a>&nbsp;
          发表时间: 2006年12月08日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <div style="DIRECTION: ltr"><strong>When installing rubygems in Suse linux , I get:</strong><br />
<br />
/usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/custom_require<wbr></wbr>.rb:21:in<br />
`require__': No such file to load -- zlib<br />
(LoadError)<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/custom_require<wbr></wbr>.rb:21:in<br />
`require'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/package.rb:9<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/custom_require<wbr></wbr>.rb:21:in<br />
`require__'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/custom_require<wbr></wbr>.rb:21:in<br />
`require'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/builder.rb:1<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/custom_require<wbr></wbr>.rb:21:in<br />
`require__'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems/custom_require<wbr></wbr>.rb:21:in<br />
`require'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from /usr/local/lib/ruby/site_ruby<wbr></wbr>/1.8/rubygems.rb:61:in `manage_gems'<br />
&nbsp; &nbsp; &nbsp; &nbsp; ... 7 levels...<br />
&nbsp; &nbsp; &nbsp; &nbsp;from setup.rb:887:in `exec_install'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from setup.rb:705:in `invoke'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from setup.rb:674:in `invoke'<br />
&nbsp; &nbsp; &nbsp; &nbsp;from setup.rb:1352<br />
<br />
<strong><font color="#ff0000">and follow that is how I fixed it:</font></strong></div>
<div style="DIRECTION: ltr"><br />
<font color="#0000ff" style="BACKGROUND-COLOR: #ccffcc">rpm -e --nodeps ruby<br />
tar -zxvf ruby-1.8.2.tar.gz<br />
cd ruby-1.8.2<br />
./configure --prefix /usr<br />
make<br />
su<br />
make install<br />
<br />
Installing zlib-devel package using Suse Yast management Center<br />
<br />
tar -zxvf rubygems-xxxx.tar.gz<br />
cd rubygems-xxxx<br />
ruby ./setup.rb</font><br />
<br />
<strong>Should work now</strong><br />
</div>
          <br/>
          <span style="color:red;">
            <a href="http://huaronghu.javaeye.com/blog/37918#comments" style="color:red;">本文的讨论也很精彩，浏览讨论>></a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/106' target='_blank'><span style="color:blue;font-weight:bold;">JavaEye问答大赛开始了！ 从6月23日 至 7月6日，奖品丰厚 ！</span></a></li><li><a href='/adverts/97' target='_blank'><span style="color:blue;font-weight:bold;">Oracle专区上线，有Oracle最新文章，重要下载及知识库等精彩内容，欢迎访问。</span></a></li><li><a href='/adverts/92' target='_blank'><span style="color:red;font-weight:bold;">快来参加7月17日在成都举行的SOA中国技术论坛</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 08 Dec 2006 09:40:30 +0800</pubDate>
        <link>http://huaronghu.javaeye.com/blog/37918</link>
        <guid>http://huaronghu.javaeye.com/blog/37918</guid>
      </item>
  </channel>
</rss>