Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew0928 committed Sep 15, 2016
1 parent 8170778 commit 9a5648c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _posts/2016-09-15-microservice-case-study-01.md
Expand Up @@ -69,18 +69,21 @@ library / component 的方式,把 code / binary 組裝成一個大型的 appli
從這些根本的差異,其實就看的出來它們的特性,跟適用的情境了。從軟體開發的角度來看,我把 code reuse 的方式分為幾種:

1. **source code**

> 使用的時候,必須拿到要被重複利用的 source code。
> code snippet, design patterns, scripts 等等都屬於這種。
> reuse 的層級只在 compile time, 且限定為同一種語言 (廢話), 需要 develop team 重新編譯發行才能使用。
> 若 source code 有異動,application 通常得經過重新編譯及之後的所有程序 (如測試、發行等等) 才能升級。
2. **binary code**

> 常見於元件(component)、套件(package)、插件(plugins)或是涵式庫(library / class library)。編譯過後的 library 通常有
> 一定的規範,例如 java jar, 或是 .net 的 assembly (.dll) 等等。reuse 的層級在 develop time, 不過 binary code
> 通常有較完整的規範,若不影響對外的介面 (如 c external signature, 或是 .net public class 等等),可以直接替換 binary
> 而不需要經過重新編譯等過程。
3. **Service**

> 更高層級的 reuse. 你使用的已經是個完整的服務了,只是你必須透過事先定義的 API or protocol 來使用他。最典型的例子就是 database.
> 你是架設好之後,開個 database, 就可以連線使用了。以 Microsoft SQL server 為例,他有他專屬的 protocol (TCP port 1433),
> 你甚至必須使用對應的 library (data provider) 才能使用。若服務的
Expand Down

0 comments on commit 9a5648c

Please sign in to comment.