2009年7月10日

          c++ difference from java
          1. take charge of object management , negotiate ownershiop ,use scoped_ptr,
             not to transfer other's ownership
          2. use c++ template to express seperation corncern ,such as (static)polymorphy and policy
          3. disable copy constructor and assign operator by yourself
          4. polymorphy by pointer
          5. 使用 template ,macro 取得類似動(dòng)態(tài)語(yǔ)言的能力
          6. 偏好無(wú)狀態(tài)的 函數(shù)
          posted @ 2010-02-03 11:43 西津渡 閱讀(264) | 評(píng)論 (0)編輯 收藏
           
              只有注冊(cè)用戶登錄后才能閱讀該文。閱讀全文
          posted @ 2010-01-15 12:22 西津渡 閱讀(102) | 評(píng)論 (0)編輯 收藏
           

          Myisam is preferred without transaction and little update(delete)

          Big than 4G datafile can user Myisam merge table.

          InnoDB with auto_increment primary key is preferred.

          Few storage process

          Guess: 20m records max per table , 500G data max per tablespace , 256 tables per database (may problem)

          Use prepared statement and  batch

          Optimize Your Queries For the Query Cache

          // query cache does NOT work
          $r = mysql_query("SELECT username FROM user WHERE signup_date >= CURDATE()");
           
          // query cache works!
          $today = date("Y-m-d");
          $r = mysql_query("SELECT username FROM user WHERE signup_date >= '$today'");

          EXPLAIN Your SELECT Queries

          LIMIT 1 When Getting a Unique Row

          Index and Use Same Column Types for Joins

          Do Not ORDER BY RAND()

          Avoid SELECT *

          t is a good habit to always specify which columns you need when you are doing your SELECT’s.

          Use ENUM over VARCHAR

          Use NOT NULL If You Can

          Store IP Addresses as UNSIGNED INT (?)

          Fixed-length (Static) Tables are Faster

          Vertical Partitioning

          Vertical Partitioning is the act of splitting your table structure in a vertical manner for optimization reasons.

          Example 1: You might have a users table that contains home addresses, that do not get read often. You can choose to split your table and store the address info on a separate table. This way your main users table will shrink in size. As you know, smaller tables perform faster.

          Example 2: You have a “last_login” field in your table. It updates every time a user logs in to the website. But every update on a table causes the query cache for that table to be flushed. You can put that field into another table to keep updates to your users table to a minimum.

          But you also need to make sure you don’t constantly need to join these 2 tables after the partitioning or you might actually suffer performance decline.

          Split the Big DELETE or INSERT Queries

          If you have some kind of maintenance script that needs to delete large numbers of rows, just use the LIMIT clause to do it in smaller batches to avoid this congestion.

          Smaller Columns Are Faster

          Use an Object Relational Mapper

          f you do not need the time component, use DATE instead of DATETIME.

          Consider horizontally spitting many-columned tables if they contain a lot of NULLs or rarely used columns.

          Be an SQL programmer who thinks in sets, not procedural programming paradigms

          InnoDB can’t optimize SELECT COUNT(*) queries. Use counter tables! That’s how to scale InnoDB.

          Prefer MM with hive

          refer :

          http://blog.tuvinh.com/top-20-mysql-best-practices/

          posted @ 2010-01-05 13:38 西津渡 閱讀(392) | 評(píng)論 (0)編輯 收藏
           
              只有注冊(cè)用戶登錄后才能閱讀該文。閱讀全文
          posted @ 2010-01-04 15:11 西津渡 閱讀(79) | 評(píng)論 (0)編輯 收藏
           

          從時(shí)序圖中可以看到,createNewIO()就是新建了一個(gè)com.mysql.jdbc.MysqlIO,利用 com.mysql.jdbc.StandardSocketFactory來(lái)創(chuàng)建一個(gè)socket。然后就由這個(gè)mySqlIO來(lái)與MySql服務(wù)器進(jìn)行握手(doHandshake()),這個(gè)doHandshake主要用來(lái)初始化與Mysql server的連接,負(fù)責(zé)登陸服務(wù)器和處理連接錯(cuò)誤。在其中會(huì)分析所連接的mysql server的版本,根據(jù)不同的版本以及是否使用SSL加密數(shù)據(jù)都有不同的處理方式,并把要傳輸給數(shù)據(jù)庫(kù)server的數(shù)據(jù)都放在一個(gè)叫做packet的 buffer中,調(diào)用send()方法往outputStream中寫(xiě)入要發(fā)送的數(shù)據(jù)。


          useServerPreparedStmts置為true的話,mysql驅(qū)動(dòng)可以通過(guò)PreparedStatement的子類ServerPreparedStatement來(lái)實(shí)現(xiàn)真正的PreparedStatement的功能




          第一位表示數(shù)據(jù)包的開(kāi)始位置,就是數(shù)據(jù)存放的起始位置,一般都設(shè)置為0,就是從第一個(gè)位置開(kāi)始。第二和第三個(gè)字節(jié)標(biāo)識(shí)了這個(gè)數(shù)據(jù)包的大小,注意的是,這個(gè)大小是出去標(biāo)識(shí)的4個(gè)字節(jié)的大小,對(duì)于非最后一個(gè)數(shù)據(jù)包來(lái)說(shuō),這個(gè)大小都是一樣的,就是splitSize,也就是maxThreeBytes,它的值是 255 * 255 * 255。
          最后一個(gè)字節(jié)中存放的就是數(shù)據(jù)包的編號(hào)了,從0開(kāi)始遞增。
          在標(biāo)識(shí)位設(shè)置完畢之后,就可以把255 * 255 * 255大小的數(shù)據(jù)從我們準(zhǔn)備好的待發(fā)送數(shù)據(jù)包中copy出來(lái)了,注意,前4位已經(jīng)是標(biāo)識(shí)位了,所以應(yīng)該從第五個(gè)位置開(kāi)始copy數(shù)據(jù)

           # packetToSend = compressPacket(headerPacket, HEADER_LENGTH,    
          #                 splitSize, HEADER_LENGTH); 

          LoadBalancingConnectionProxy
          package java.lang.reflect 。 proxy .


          http://developer.51cto.com/art/200907/137823.htm

          http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-implementation-notes.html

          PreparedStatements are implemented by the driver, as MySQL does not have a prepared statement feature. Because of this, the driver does not implement getParameterMetaData() or getMetaData() as it would require the driver to have a complete SQL parser in the client.

          Starting with version 3.1.0 MySQL Connector/J, server-side prepared statements and binary-encoded result sets are used when the server supports them.


          但這是不是說(shuō)PreparedStatement沒(méi)用呢?不是的,PreparedStatement有其他的好處:
          1.代碼的可讀性和可維護(hù)性
          2.最重要的一點(diǎn)是極大地提高了安全性,可以防止SQL注入

          然后我又看了一些網(wǎng)上其他人的經(jīng)驗(yàn),基本和我的判斷一致,有兩點(diǎn)要特別提請(qǐng)大家注意:

          1.并不是說(shuō)PreparedStatement在所有的DB上都不會(huì)提高效率,PreparedStatement需要服務(wù)器端的支持,比如在 Oracle上就會(huì)有顯著效果。上面說(shuō)的測(cè)試都是在MySQL上測(cè)試的,我找到了一個(gè)MySQL架構(gòu)師的帖子,比較明確地說(shuō)明了MySQL不支持 PreparedStatement。

          2.即便PreparedStatement不能提高性能,在少數(shù)使用時(shí)甚至?xí)档托剩匀粦?yīng)該使用PreparedStatement!因?yàn)槠渌? 處實(shí)在是太大了!當(dāng)然,當(dāng)SQL查詢比較復(fù)雜時(shí),可能PreparedStatement好處會(huì)更大,只是我沒(méi)有測(cè)試,不敢肯定。

          3.既然PreparedStatement不能提高效率,那PreparedStatement Pool也就沒(méi)有必要了。但可以看到每次新建Connection的開(kāi)銷實(shí)在很大,因此Connection Pool絕對(duì)必要。



          posted @ 2009-12-30 12:41 西津渡 閱讀(385) | 評(píng)論 (0)編輯 收藏
           
          download ,annatation and tools 兩個(gè)項(xiàng)目。
          添加相關(guān)的 jar.

          <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="master.classpath" />

          <target name="create_table">

          <hibernatetool destdir="${script.dir}">
              <annotationconfiguration configurationfile="src/hibernate.cfg.xml" />
              <hbm2ddl export="false" create="true" delimiter=";" format="true" outputfilename="create-tables.sql" />
          </hibernatetool>

          </target>

          <!DOCTYPE hibernate-configuration PUBLIC
              "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
              "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

          <hibernate-configuration>
              <session-factory name="logi">
                  <property name="show_sql">true</property>
                  <mapping class="com.tt.logi.target.Target"/>
             
              </session-factory>
          </hibernate-configuration>

          import java.io.Serializable;

          import javax.persistence.Basic;
          import javax.persistence.Entity;
          import javax.persistence.Id;

          @Entity
          public class Target implements Serializable{
             
              private Long id;
              private String name;
              @Id
              public Long getId() {
                  return id;
              }
              public void setId(Long id) {
                  this.id = id;
              }
              @Basic
              public String getName() {
                  return name;
              }
              public void setName(String name) {
                  this.name = name;
              }
             
             
             

          posted @ 2009-12-14 19:04 西津渡 閱讀(101) | 評(píng)論 (0)編輯 收藏
           
          wget ftp://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.1/mysql-5.1.41.tar.gz
          tar -xzf



          ./configure --prefix=/usr/local/mysql51m --without-debug  --enable-local-infile --enable-assembler --enable-thread-safe-client --with-plugins=all

          make
          su -
          make install


          groupadd mysql
          useradd -g mysql mysql


          bin/mysql_install_db --user=mysql  --datadir=/var/lib/mysql51m/data

          chown -R mysql /var/lib/mysql51m/
          chgrp -R mysql /var/lib/mysql51m/


          cp share/mysql/my-innodb-heavy-4G.cnf my.cnf
          vi my.cnf

          datadir = /var/lib/mysql51m/data

          .bin/mysqld_safe --defaults-file=/usr/local/mysql51m/my.cnf &

          bin/mysql  --defaults-file=my.cnf -uroot

          ./mysqladmin -u root password ‘humber’
          grant all on *.* to root@% identified by 'humber'

          default-character-set=utf8
          init_connect='SET NAMES utf8'
          default-storage-engine = INNODB

          posted @ 2009-12-14 14:44 西津渡 閱讀(118) | 評(píng)論 (0)編輯 收藏
           
          jmap -heap 16761
          jstat -gcutil 16761
          jmap -finalizerinfo 16761
          jmap -histo 16761
          jstack -l 16761
          jinfo 16761

          Examine the fatal error log file. Default file name is hs_err_pidpid.log in the working-directory.

          -XX:+HeapDumpOnOutOfMemoryError
          java -agentlib:hprof=heap=dump,format=b application
          $ jmap -dump:format=b,file=snapshot.jmap process-pid

          1、在jvm啟動(dòng)時(shí)加上:-agentlib:hprof=heap=sites,file=heap.txt  ,然后執(zhí)行一段時(shí)間后執(zhí)行 kill -3 <pid>,就可以獲取jvm的內(nèi)存鏡像。類似的通過(guò)-agentlib:hprof=cpu=samples,file=cpu.txt查 看cpu的狀況。

          http://java.sun.com/javase/6/webnotes/trouble/other/matrix6-Unix.html


          Quick Troubleshooting Tips on Solaris OS and Linux for Java SE 6

          This "Quick Start Guide" gives you some quick tips for troubleshooting. The subsections list some typical functions that can help you in troubleshooting, including one or more ways to get the information or perform the action.

          These tips are organized as follows:

          Hung, Deadlocked, or Looping Process
          Post-mortem Diagnostics, Memory Leaks
          Monitoring
          Actions on a Remote Debug Server
          Other Functions

          Hung, Deadlocked, or Looping Process

          • Print thread stack for all Java threads:
            • Control-"
            • kill -QUIT pid
            • jstack pid (or jstack -F pid if jstack pid does not respond)
          • Detect deadlocks:
            • Request deadlock detection: JConsole tool, Threads tab
            • Print information on deadlocked threads: Control-"
            • Print list of concurrent locks owned by each thread: -XX:+PrintConcurrentLocks set, then Control-"
            • Print lock information for a process: jstack -l pid
          • Get a heap histogram for a process:
            • Start Java process with -XX:+PrintClassHistogram, then Control-"
            • jmap -histo pid (with -F option if pid does not respond)
          • Dump Java heap for a process in binary format to file:
            • jmap -dump:format=b,file=filename pid (with -F option if pid does not respond)
          • Print shared object mappings for a process:
            • jmap pid
          • Print heap summary for a process:
            • Control-"
            • jmap -heap pid
          • Print finalization information for a process:
            • jmap -finalizerinfo pid
          • Attach the command-line debugger to a process:
            • jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=pid

          Post-mortem Diagnostics, Memory Leaks

          • Examine the fatal error log file. Default file name is hs_err_pidpid.log in the working-directory.
          • Create a heap dump:
            • Start the application with HPROF enabled: java -agentlib:hprof=file=file,format=b application; then Control-"
            • Start the application with HPROF enabled: java -agentlib:hprof=heap=dump application
            • JConsole tool, MBeans tab
            • Start VM with -XX:+HeapDumpOnOutOfMemoryError; if OutOfMemoryError is thrown, VM generates a heap dump.
          • Browse Java heap dump:
            • jhat heap-dump-file
          • Dump Java heap from core file in binary format to a file:
            • jmap -dump:format=b,file=filename corefile
          • Get a heap histogram for a process:
            • Start Java process with -XX:+PrintClassHistogram, then Control-"
            • jmap -histo pid (with -F option if pid does not respond)
          • Get a heap histogram from a core file:
            • jmap -histo corefile
          • Print shared object mappings from a core file:
            • jmap corefile
          • Print heap summary from a core file:
            • jmap -heap corefile
          • Print finalization information from a core file:
            • jmap -finalizerinfo corefile
          • Print Java configuration information from a core file:
            • jinfo corefile
          • Print thread trace from a core file:
            • jstack corefile
          • Print lock information from a core file:
            • jstack -l corefile
          • Attach the command-line debugger to a core file on the same machine:
            • jdb -connect sun.jvm.hotspot.jdi.SACoreAttachingConnector:javaExecutable=path,core=corefile
          • Attach the command-line debugger to a core file on a different machine:
            • On the machine with the core file: jsadebugd path corefile
              and on the machine with the debugger: jdb -connect sun.jvm.hotspot.jdi.SADebugServerAttachingConnector:debugServerName=machine
          • libumem can be used to debug memory leaks.

          Monitoring

          Note: The vmID argument for the jstat command is the virtual machine identifier. See the jstat man page for a detailed explanation.

          • Print statistics on the class loader:
            • jstat -class vmID
          • Print statistics on the compiler:
            • Compiler behavior: jstat -compiler vmID
            • Compilation method statistics: jstat -printcompilation vmID
          • Print statistics on garbage collection:
            • Summary of statistics: jstat -gcutil vmID
            • Summary of statistics, with causes: jstat -gccause vmID
            • Behavior of the gc heap: jstat -gc vmID
            • Capacities of all the generations: jstat -gccapacity vmID
            • Behavior of the new generation: jstat -gcnew vmID
            • Capacity of the new generation: jstat -gcnewcapacity vmID
            • Behavior of the old and permanent generations: jstat -gcold vmID
            • Capacity of the old generation: jstat -gcoldcapacity vmID
            • Capacity of the permanent generation: jstat -gcpermcapacity vmID
          • Monitor objects awaiting finalization:
            • JConsole tool, VM Summary tab
            • jmap -finalizerinfo pid
            • getObjectPendingFinalizationCount method in java.lang.management.MemoryMXBean class
          • Monitor memory:
            • Heap allocation profiles via HPROF: java -agentlib:hprof=heap=sites
            • JConsole tool, Memory tab
            • Control-" prints generation information.
          • Monitor CPU usage:
            • By thread stack: java -agentlib:hprof=cpu=samples application
            • By method: java -agentlib:hprof=cpu=times application
            • JConsole tool, Overview and VM Summary tabs
          • Monitor thread activity:
            • JConsole tool, Threads tab
          • Monitor class activity:
            • JConsole tool, Classes tab

          Actions on a Remote Debug Server

          First, attach the debug daemon jsadebugd, then execute the command:

          • Dump Java heap in binary format to a file: jmap -dump:format=b,file=filename hostID
          • Print shared object mappings: jmap hostID
          • Print heap summary : jmap -heap hostID
          • Print finalization information : jmap -finalizerinfo hostID
          • Print lock information : jstack -l hostID
          • Print thread trace : jstack hostID
          • Print Java configuration information: jinfo hostID

          Other Functions

          • Interface with the instrumented Java virtual machines:
            • Monitor for the creation and termination of instrumented VMs: jstatd daemon
            • List the instrumented VMs: jps
            • Provide interface between remote monitoring tools and local VMs: jstatd daemon
            • Request garbage collection: JConsole tool, Memory tab
          • Print Java configuration information from a running process:
            • jinfo pid
          • Dynamically set, unset, or change the value of certain Java VM flags for a process:
            • jinfo -flag flag
          • Print command-line flags passed to the VM:
            • jinfo -flags
          • Print Java system properties:
            • jinfo -sysprops
          • Pass a Java VM flag to the virtual machine:
            • jconsole -Jflag ...
            • jhat -Jflag ...
            • jmap -Jflag ...
          • Print statistics of permanent generation of Java heap, by class loader:
            • jmap -permstat
          • Report on monitor contention.
            • java -agentlib:hprof=monitor=y application
          • Evaluate or execute a script in interactive or batch mode:
            • jrunscript
          • Interface dynamically with an MBean, via JConsole tool, MBean tab:
            • Show tree structure.
            • Set an attribute value.
            • Invoke an operation.
            • Subscribe to notification.
          • Run interactive command-line debugger:
            • Launch a new VM for the class: jdb class
            • Attach debugger to a running VM: jdb -attach address
            http://www.aygfsteel.com/justinchen/archive/2009/01/08/248738.html
          posted @ 2009-12-07 14:16 西津渡 閱讀(431) | 評(píng)論 (0)編輯 收藏
           
          netstat -n | awk '/^tcp/ {++state[$NF]} END {for(key in state) print key,""t",state[key]}'

          posted @ 2009-12-07 13:42 西津渡| 編輯 收藏
           
          set nocompatible
          set autoindent
          set smartindent
          set ignorecase
          syntax enable
          set wrap
          set showmatch
          set foldmarker={{{,}}}
          set tabstop=4
          set shiftwidth=4
          set ruler
          set expandtab
          set backspace=eol,start,indent
          set whichwrap+=<,>,h,l
          set nobackup
          setlocal noswapfile
          set bufhidden=hide
          syntax on
          set tags=./tags,~/apsara/tags
          set path+=/usr/include/c++/**,~/apsara/include/**
          filetype plugin on
          filetype indent on
          autocmd filetype java,c,cpp setlocal textwidth=100
          set pastetoggle=<F7>

          nmap <F2>  :set nonumber!<CR>
          nmap <F8>  :TlistToggle<CR>
          imap <F11> <C-x><C-p>
          map <F12>  :!ctags -R --c++-kinds=+p --fields=+iaS --exclude=build --extra=+q .<CR>
          map <F6> :w<CR>
          imap <F6> <ESC>:w<CR>a
          map <F3> /<C-R><C-W><CR>

          有 c support 支持,很棒。

          posted @ 2009-10-29 11:42 西津渡 閱讀(243) | 評(píng)論 (0)編輯 收藏
           

          1. 避免對(duì)shared_ptr所管理的對(duì)象的直接內(nèi)存管理操作,以免造成該對(duì)象的重釋放
            shared_ptr并不能對(duì)循環(huán)引用的對(duì)象內(nèi)存自動(dòng)管理(這點(diǎn)是其它各種引用計(jì)數(shù)管理內(nèi)存方式的通病)。

          2. 不要構(gòu)造一個(gè)臨時(shí)的shared_ptr作為函數(shù)的參數(shù)。
            如下列代碼則可能導(dǎo)致內(nèi)存泄漏:
            void test()
            {
                foo(boost::shared_ptr<implementation>(new    implementation()),g());
            }
            正確的用法

            void test()
            {
                boost::shared_ptr<implementation> sp    (new implementation());
                foo(sp,g());
            }
          3. Employee boss("Morris, Melinda", 83000);

            Employee* s = &boss;

            This is usually not a good idea. As a rule of thumb, C++ pointers should only refer to objects allocated wth new.


          copy:http://www.diybl.com/course/3_program/c++/cppjs/20090403/163770.html
          posted @ 2009-10-27 18:54 西津渡 閱讀(298) | 評(píng)論 (0)編輯 收藏
           
          抄錄備忘:
          其實(shí)沒(méi)有.h也能很好的工作,但是當(dāng)你發(fā)現(xiàn)一個(gè)外部鏈接的函數(shù)或外部變量,需要許多份

          聲明,因?yàn)閏++這種語(yǔ)言,在使用函數(shù)和變量的時(shí)候,必須將他聲明,為何要聲明?聲明之后才

          知道他的規(guī)格,才能更好的發(fā)現(xiàn)不和規(guī)格的部分.你別妄想一個(gè)編譯單元,會(huì)自動(dòng)從另一個(gè)

          編譯單元那里得到什么信息,知道你是如何定義這個(gè)函數(shù)的.

              所以說(shuō),只要使用到該函數(shù)的單元,就必須寫(xiě)一份聲明在那個(gè).cpp里面,這樣是不是很麻煩,

          而且,如果要修改,就必須一個(gè)一個(gè)修改.這真讓人受不了.


          .h就是為了解決這個(gè)問(wèn)題而誕生,他包含了這些公共的東西.然后所有需要使用該函數(shù)的.cpp,只需要

          用#include包含進(jìn)去便可.以后需要修改,也只是修改一份內(nèi)容.


          請(qǐng)注意不要濫用.h,.h里面不要寫(xiě)代碼,.h不是.cpp的倉(cāng)庫(kù),什么都塞到里面.

          如果在里面寫(xiě)代碼,當(dāng)其他.cpp包含他的時(shí)候,就會(huì)出現(xiàn)重復(fù)定義的情況,

          比如將函數(shù)func(){printf};放到頭文件a.h,里面還有一些a.cpp需要的聲明等;

          然后你發(fā)現(xiàn)b.cpp需要用到a.cpp里面的一個(gè)函數(shù),就很高興的將a.h包含進(jìn)來(lái).

          注意,#include并不是什么申請(qǐng)指令,他就是將指定的文件的內(nèi)容,原封不動(dòng)的拷貝

          進(jìn)來(lái).


          這時(shí)候?qū)嶋H上a.cpp和b.cpp都有一個(gè)func()函數(shù)的定義.

          如果這個(gè)函數(shù)是內(nèi)部鏈接static的話,還好,浪費(fèi)了一倍空間;

          如果是extern,外部鏈接(這個(gè)是默認(rèn)情況),那么根據(jù)在同一個(gè)程序內(nèi)不可出現(xiàn)

          同名函數(shù)的要求,連接器會(huì)毫不留情給你一個(gè)連接錯(cuò)誤!

          http://www.cnblogs.com/shelvenn/archive/2008/02/02/1062446.html



          posted @ 2009-10-27 11:13 西津渡 閱讀(194) | 評(píng)論 (0)編輯 收藏
           
           一.    Perspective and Metaphor

          Platform
          Kernel
          Framework
          二.    Philosophy and discipline
          Be aware of context
          Extreme maintenance
          Be pragmatic
          Extreme abstract: Program to an interface (abstraction), not an implementation
            
          Extreme separation of concerns
          Extreme readability
          Testability
          No side effect
          Do not repeat yourself
          三.    Principle
          DIP ,dependency inversion of control
          OCP , open close
          LSP , liskov substitute
          ISP , interface segregation
          SRP , single responsibility
          LKP, Lease knowledge principle
          四.    design pattern
          Construction
          Behavior
          Structure

          五.    anti-pattern、bad smell
          Long method
          Diverse change
              Repeated code
              Talk to stranger
              Pre optimize
          六.    algorithms
           nLongN
           Divided and conqueror
           

          七.    architecture
          Hierarchal
          Pipes and filter
          Micro kernel
          Broker
          Black Board
              Interpreter
             
          八.    Distributed & concurrent
          What to concurrent

          Scalability
              Stretch key dimensions to see what breaks
          九.    languages
          Ruby
          Erlang
          assemble
          C
          C++
          Java
          Python
          Scala

          Be ware of different program paradigms.
          十.    Performance
           Minimize remote calls and other I/O
           Speed-up data conversion
           release resource as soon as possible 

          十一.    architectures' future
          軟件設(shè)計(jì)思想的發(fā)展邏輯,大致是提高抽象程度 ,separation of concern 程度。
              fn(design )=  fn1(abstraction )+ fn2(separation of concern).

          由于大規(guī)模數(shù)據(jù)處理時(shí)代的來(lái)臨,下一代設(shè)計(jì)范式的重點(diǎn):
          1.    將是如何提高distributed(--concurrent) programing 的抽象程度 和 separation of concern 程度。
          2.    dsl ,按照以上的公式,也確實(shí)是一個(gè)好的方向。
          十二.    Reference
          <art agile software development>
          <prerefactor>
          <design patterns>
          <beautiful architecture>
          <refactor>
          <pattern oriented software architecture>
          <extreme software development>
          <beautiful code>
          <patterns for parallel programming>
          <java concurrent programming in practice>
          <java performance tuning>
          <the definite guide to hadoop>
          <greenplum>
          <DryadLINQ>
          <software architecture in practice>
          <97 things architecture should known>
          http://en.wikipedia.org/wiki/Programming_paradigm



          posted @ 2009-10-16 13:13 西津渡 閱讀(2092) | 評(píng)論 (0)編輯 收藏
           
          拷貝
          mingliu.ttc  simsun.ttf  SURSONG.TTF  tahomabd.ttf  tahoma.ttf  verdanab.ttf  verdanai.ttf  verdana.ttf  verdanaz.ttf

           #mv simsun.ttc /usr/share/fonts/local/simsun.ttf
          #cd /usr/share/fonts/local/
          sudo mkfontscale
          sudo mkfontdir

          sudo fc-cache
          cp fonts.scale fonts.dir
          sudo chmod 755 *
          sudo chkfontpath --add /usr/share/fonts/local/

          #/etc/init.d/xfs restart
          查檢是否安裝成功

          fc-list |grep Sim

           NSimSun:style=Regular
          SimSun:style=Regular
          SimSun\-PUA:style=Regular




          posted @ 2009-08-14 17:48 西津渡| 編輯 收藏
           
          experience learned.

          1. first think algorithm before concurrent
          2. first solve top problem
          3. memory can be problem with huge data processing
          4.  not to use refletion frequently
          5. prefering strategy that can optimize both cpu and memory .

          technical
          1. thread synchronizing is how to queuing
             be sure to use "while(!Thread.currentThread.isInterupted())

          2. prefer high level  synchronizing facility to low level methodology such as await,notify

          3. dedicated sorter is much faster


           








          posted @ 2009-07-22 18:07 西津渡 閱讀(151) | 評(píng)論 (0)編輯 收藏
           
          以前聽(tīng)過(guò)用友的牛人關(guān)于軟件設(shè)計(jì)范型的時(shí)代劃分,記得不太準(zhǔn)確,不過(guò)基本上是業(yè)界公認(rèn)的。
          大致上是:過(guò)程式、面向?qū)ο蟆⒔M件、面向服務(wù)。
          未來(lái)呢?我忘記了,抑或是 dsl ?

          我以往也沒(méi)有自己的認(rèn)識(shí),不過(guò),最近我有自己的看法

          軟件設(shè)計(jì)思想的發(fā)展邏輯,大致是提高抽象程度 ,seperation of concern 程度。
              fn(design )=  fn1(abstraction )+ fn2(seperation of concern).


          由于大規(guī)模數(shù)據(jù)處理時(shí)代的來(lái)臨,下一代設(shè)計(jì)范式的重點(diǎn):

          1. 將是如何提高concurrent programing 的抽象程度 和 seperation of concern 程度。
          2. 至于dsl ,我研究不多,不過(guò),按照以上的公式,也確實(shí)是一個(gè)好的方向。

          對(duì)于英文詞語(yǔ)的使用,是因?yàn)椋蚁敫鼙磉_(dá)我的意思,不至于誤解。見(jiàn)諒。
          歡迎批評(píng)指正!
          posted @ 2009-07-13 12:33 西津渡 閱讀(1226) | 評(píng)論 (1)編輯 收藏
           
              只有注冊(cè)用戶登錄后才能閱讀該文。閱讀全文
          posted @ 2009-07-10 13:40 西津渡 閱讀(1019) | 評(píng)論 (6)編輯 收藏
           
          主站蜘蛛池模板: 广东省| 武汉市| 张北县| 天津市| 仁寿县| 武定县| 宣汉县| 离岛区| 彭州市| 中牟县| 永新县| 尚志市| 革吉县| 安吉县| 德令哈市| 澄迈县| 乌审旗| 肇庆市| 牙克石市| 平乐县| 承德市| 济阳县| 曲阳县| 尚志市| 南澳县| 日喀则市| 沙雅县| 临西县| 如皋市| 淮南市| 诸暨市| 孝感市| 高淳县| 太仆寺旗| 常山县| 禄劝| 重庆市| 麻江县| 新乡市| 搜索| 天峨县|