More Related Content
Proxy, chain of responsibility, command pattern ์์ ๋ก ๋ณด๋ Pattern ์ฐ์๋ฒ Proxy_design_pattern_in_Java_SYS4U Viewers also liked (20)
๊ฒ์ ๊ฐ๋ฐ์ ์์ฃผ ์ฌ์ฉ๋๋ ๋์์ธ ํจํด ๋ธ๋๋ณด๋ ๊ฐ๋ฐ ์ค์ธ ๊ธฐ๋ฅ Publish Subscriber messaging pattern Team10:TenTen for blackboard Design pattern study 6 command pattern Scalable system design patterns Design patterns ์คํฐ๋ - Singleton ํจํด Design patterns ์คํฐ๋ -Decorator ํจํด Api design for c++ pattern Design patterns ์คํฐ๋ -strategyํจํด Arquitetura da plataforma com o Biztalk Server Publisher subscriber pattern Similar to Proxy pattern (20)
[2022]Flutter_IO_Extended_Korea_แแ
ฅแฏแแ
ตแแ
ฉแแ
ฒแฏแแ
ณแฏแแ
ชแฏแแ
ญแผแแ
กแซแแ
ณแฏแ
แ
ฅแแ
ฅแแ
ณแฏแ
แ
ตแซแแ
กแแ
ตแแ
ฆแจแแ
ฅ_... GS Neotek aws_Amazon_CloudFrontDay2018_session4 [123] electron แแ
ตแทแแ
ฅแผแแ
ฎแซ High performance networking in chrome Mcollective orchestration tool ์๊ฐ ํ๋์จ์ด ์คํํธ์
์ ์ํํธ์จ์ด ์ด์ผ๊ธฐ 1st-BE-sideproject-GDGonCampus_KyungHee_Univ.pdf Spring Framework - Inversion of Control Container Node.js์์ ๊ณต๊ณตAPI๋ฅผ ํ์ฉํด์ ๊ฐ๋ฐํ๊ธฐ ํ์ดํผ๋ ์ ํจ๋ธ๋ฆญ ์ค์ต์๋ฃ [112]clova platform ์ธ๊ณต์ง๋ฅ์ ์ฎ๋ ๊ธฐ์ Dropbox์ ๊ฐ์ ์์คํ
์ ํ์ผ์ ์ด๋ป๊ฒ ์ ์ฅํ ๊น? Java scriptแแ
ด แแ
ตแแ
ข ์น์๋ฒ ๋ถํํ
์คํธ ์ค์ ๋
ธํ์ฐ ์ค์ ์๋ฒ ๋ถํํ
์คํธ ๋
ธํ์ฐ More from scor7910 (11)
๋๊ท๋ชจ ์๋น์ค๋ฅผ ์งํฑํ๋๊ธฐ์ Ch14 Head first statistics ch15 Head first statistics ch.11 ์ดํ ๊ฐ๋ฐ์์ ์๋ฒ๊ฐ๋ฐ ์ฝ์ง๊ธฐ Mining the social web ch8 - 1 Mining the social web ch3 Proxy pattern
- 4. Problem
โข Component ๋ฅผ ์ฌ์ฉ / ์ ๊ทผ ํ๋๋ฐ ์์ ํด
์ผ ํ๋ค .
โข ํด๋ผ์ด์ธํธ ์
์ฅ์์ ํ๊ฒฝ (OS, ์ธ์ดโฆ )
์ ์๊ด์์ด ๋์์ด๋ ๊ตฌ๋ฌธ์ด ๋น์ทํด์ผ
ํ๋ค .
โข ํ๊ฒฝ์ ์ํ ์ฑ๋ฅํ๋ฝ์ด๋ ๋น์ฉ ์์ค์
๊ณ ๋ฏผํด์ผ ํ๋ค .
- 5. Solution
โข ํด๋ผ์ด์ธํธ๊ฐ Component ์ ์ง์ ์ ๊ทผ
ํ์ง ์๊ณ ๋๋ฆฌ์๋ฅผ ํตํด ์ํ๋ ๋์์ด
๋ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์ ์๊ฒ ํ๋ค .
โข ๋๋ฆฌ์๋ Component ์ Interface ๋ฅผ
์ ๊ณตํ๊ณ , ํด๋ผ์ด์ธํธ๊ฐ ์ํ๋ ๊ฐ / ๋
์์ ๋ํ์ฌ ์์ ํ๊ฒ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์
์๋๋ก ์ถ๊ฐ์ ์ธ ์์
์ ํด์ผ ํ๋ค .
- 6. Structure
Class
โขClient
ํ๋ ฅ์
โขProxy
์ฑ
์
โข Proxy ๋ฅผ ํตํด ์ธํฐํ์ด์ค
๋ฅผ ์ฌ์ฉ .
โข์์ฒด ์์
์ ์ํ .
Class
โขAbstractOriginal
ํ๋ ฅ์
์ฑ
์
โข Proxy ์ ์๋ณธ ํด๋์ค
์ ์ถ์ base ํด๋์ค
.
Class
โขProxy
ํ๋ ฅ์
โขOriginal
์ฑ
์
โข ์๋ณธ (Original) ์ธํฐํ
์ด์ค๋ฅผ Client ์ ์ ๊ณต .
โข์์ ํ๊ฒ ์ ๊ทผํ๊ณ ์ฌ๋ฐ
๋ฅธ ๋์์ ๋ณด์ฅํด์ผ ํ๋ค
.
Class
โขOriginal
ํ๋ ฅ์
์ฑ
์
โข ํน์ ์๋น์ค , ๋์์
๊ตฌํ ํ๋ค .
- 8. Implementation
โข Proxy ์์ ์ฒ๋ฆฌํ ๊ฒ๊ณผ Original ์์ ์ฒ
๋ฆฌํ ํญ๋ชฉ์ ํ์
ํ๋ค .
โข ์ถ์ ๊ธฐ๋ณธ ํด๋์ค์์ Original ๊ณผ Proxy
ํด๋์ค๋ฅผ ํ์ฑํ๋ค .
โข Proxy ํด๋์ค์ ๋์์ ๊ตฌํํ๋ค .
โข Proxy ํด๋์ค์ ์ฎ๊ฒจ์ง ์์
์ด Client ์
Origin ํด๋์ค์ ์ค๋ณต๋์ด์๋ค๋ฉด ์ ๊ฑฐํ๋ค
.
โข Proxy ํด๋์ค์ Origin ํด๋์ค๋ฅผ ์ฐ๊ฒฐํ
๋ค .
โข Origin ๊ณผ ํด๋ผ์ด์ธํธ๊ฐ ์ง์ ์ ์ธ ๊ด๊ณ๋ฅผ
์ ๊ฑฐ ํ๋ค .
- 9. Variant(1)
โข Remote Proxy : ์๋ณธ์ ๋ฌผ๋ฆฌ์ ์์น๋ฅผ
์ ์ฅํ๊ณ ํด๋ผ์ด์ธํธ๋ Proxy ๋ฅผ ์ด์ฉํด
์๋ณธ๋ฐ์ดํฐ๋ฅผ ์ป์ด์ฌ ์ ์๋ค .
โข Protection Proxy : ๊ถํ์ด ํ์ํ ์
์
์ด๋ ๋ฐ์ดํฐ๋ฅผ ์์ธ์ค ํ ๋ ํ๋ก์๊ฐ
๊ถํ์ ๊ฒ์ฌํ๊ณ ๊ฒฐ๊ณผ๋ฅผ ํด๋ผ์ด์ธํธ์๊ฒ
์ค๋ค .
- 10. Variant(2)
โข Cache Proxy : Proxy ๋ ์๋ณธ
(Original) ์ ๋ฐ์ดํฐ๋ฅผ ๋ฏธ๋ฆฌ ๋ฐ์ ๋๊ณ
Client ๋ ๋น ๋ฅด๊ฒ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌ ํ ์
์๋ค . Proxy ๋ ๋ฐ์ดํฐ์ ์ ํจ์ฑ ๊ฒ์ฌ๋
Client ์ ๋ฐ๋ณต์ ์ธ ๋ฐ์ดํฐ ์์ฒญ์ ๋ํ
์ฒ๋ฆฌ๊ฐ ํ์ํ๋ค .
- 11. Variant(3)
โข Synchronization Proxy : ๋ค์์ ์ฐ๋ ๋๊ฐ ์๋ณธ ๋ฐ์ดํฐ์ ์ ๊ทผ
ํ๋ ค ํ ๋ ๋๊ธฐํ ์์
์ Proxy ์์ ์ํ ํ๋๋ก ํ๋ค .
template <class T>
class LockingProxy
{
public:
LockingProxy(T* pObj) : pointee_ (pObj)
{ pointee_->Lock(); }
~LockingProxy()
{ pointee_->Unlock(); }
T* operator->() const
{ return pointee_; }
private:
LockingProxy& operator=(const LockingProxy&);
T* pointee_;
};
์ถ์ฒ : Modern C++ Design
- 12. Variant(4)
โข Counting Proxy : ์ด๋ค instance ์ ์ฌ
์ฉ counting ์ Proxy ์์ ๊ณ์ฐํ๊ณ
์์ฑ / ์ญ์ ์์
์ ํ๋ ๊ตฌ์กฐ์ ์ฌ์ฉ
๋ ์ ์๋ค .
โข Virtual Proxy : client ๊ฐ ๋ฐ์ดํฐ๋ฅผ ์
์ฒญํ๋ฉด Proxy ๋ ๋ก์ปฌ์ ์ ์ฅ๋ ๋ฐ์ดํฐ
๋ฅผ ํด๋ผ์ด์ธํธ์ ์ฃผ๊ณ , ์กด์ฌํ์ง ์๋
๋ฐ์ดํฐ๋ ์๋ณธ์ ์์ฒญํ์ฌ ํ์ํ ๋ฐ์ด
ํฐ๋ฅผ ์ป์ด์จ๋ค .
- 13. Variant(5)
โข Firewall Proxy : ์ธ๋ถ ๋คํธ์ํฌ๋ก๋ถํฐ
๋ค์ด์ค๊ณ ๋๊ฐ๋ ํจํท์ Proxy ์์ ๋ด
๋ถ ๋ณด์ ์ค์ ์ ํ์ธํ์ฌ ์ธ๋ถ ๋คํธ์ํฌ
๋ง๊ณผ ํต์ ์ ๊ด๋ฆฌํ๋ค .
- 14. Known Use
โข NeXTSTEP
โข OMG โ CORBA(Common Object Request
Broker Architecture)
โข World Wide Web
โข OLE(Object Linking & Embedding)
- 15. Consequence โ ์ฅ์ -
โข ํจ์จ์ ํฅ์ ์ํค๊ณ ๋น์ฉ์ ๊ฐ์์ํจ๋ค .
โข ์๋ฒ Component ์ ์์น์ Client ๊ฐ ๋ถ
๋ฆฌ๋์ด ๋คํธ์ํฌ๊ฐ ๋ณ๊ฒฝ์ด ๋๋๋ผ๋
Client ๋ ๊ฑฐ๊ธฐ์ ์๊ด์์ด ์ฝ๋๋ฅผ ์์
์ ์ผ๋ก ์ฌ์ฉํ ์ ์๋ค .
โข Proxy ํด๋์ค๋ก ์ธํด Client ๊ฐ ์ํํด
์ผํ ๋ถํ์ํ ์ฝ๋๋ฅผ ๋์ด์ค๋ค .
- 16. Consequence โ ๋จ์ -
โข ์ฐํ ๋ฐฉ์์ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ฑ๋ฅ์ด ์
ํ๋๋ค .
โข ์ง๋์น๊ฒ ์ฌ์ฉํ๋ฉด ๊ณผ๋ถํ๋ฅผ ๊ฐ์ ธ์ฌ์
์๋ค .