
파이썬 비동기 프로그램을 위한 문법은 어떻게 될까? 아래에 잘 정리된 문서가 있었다. 한번 알아보자 🐲 speed up your python program with concurrency python concurrency method : threading vs asyncio vs multiprocessing thread, task, process 세가지 모두 => sequence of instructions that run in order high level에서 본다면 세가지 모두 다음과 같은 공통점이 있음 : cpu에서 실행하고, 중간 상태를 저장하고 멈췄다가 나중에 그 지점부터 다시 실행할 수 있는 instruction+메타 데이터 묶음(?)이라는 것. 그렇지만 multiprocessing만 진짜로 시..

🌻 ⬇️ https://refactoring.guru/design-patterns/factory-method Factory Method / Design Patterns / Creational Patterns Factory Method Also known as: Virtual Constructor Intent Factory Method is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objec refactoring.guru 📝 한 줄 정리 A.k.a. Virtual Constructor Factory 인터페이..

🦄위키피디아 설명에 따르면 class-based 언어 => 클래스가 먼저 정의되어 있고, 객체는 클래스를 기반으로 인스턴스화 되어 생성된다. 만약 두 객체 "사과", "오렌지"가 과일 클래스의 인스턴스라면 이 둘은 본질적으로 과일이고, 같은 방식으로 핸들링할 수 있음을 보장한다. (개발자는 color, sugar_content, is_ripe 같은 동일한 attribute를 가지고 있음을 예상할 수 있다) prototype-based 언어 => 객체가 primary entity 이다. 클래스는 존재하지 않음 (그래도 자바스크립트 es6에 클래스 키워드는 있음. 내부적으로 class-based 언어의 클래스와 완전 동일하게 동작한다고 말할 수는 없지만) 어떤 객체의 프로토타입은 해당 객체가 연결되어 있는 ..

🐶prototype Prototype / Design Patterns / Creational Patterns Prototype Also known as: Clone Intent Prototype is a creational design pattern that lets you copy existing objects without making your code dependent on their classes. Problem Say you have an object, and you want to refactoring.guru 📝한 줄 정리 클라이언트 코드에서는 클래스를 신경 쓸 필요 없이 객체에 내장된 clone 인스턴스 메소드를 호출하여 해당 객체를 손쉽게 클론한다. clone 메소드 동작 방식 : 자기 클..

관련 있는 이전 발행글 2021.03.23 - [언어와 프레임워크/javascript] - 반복문 비동기 처리 ( + Event Loop, Promise ) 2021.11.29 - [이론/동시성모델] - 서버는 여러개의 request를 어떻게 감당할까? 2022.02.02 - [이론/동시성모델] - [문서정리] I/O Bound 서버를 스케일링 하기 위한 리액터 패턴 참고자료 server architecture (thread-base, event-base, SEDA) Performance and scalability analysis of Java IO and NIO based server models, their implementation and comparison 1) thread-based serve..

=> 이거 완전 그냥 노드 얘기임 😎 👾 ⬇️ Reactor Pattern for Scaling I/O Bound Server 아이유가 당신의 플랫폼으로 팬들과 소통하겠다고 얘기해서 엄청나게 유명해진 채팅 서버를 운영해야 하는 상황이라고 가정해보자. 당신은 10K 정도의 동시 접속이 이루어지고 있다는 것을 깨달았다. 1개의 단순한 서버라면 이것을 어떻게 핸들링 할까? 두가지 측면에서 생각해 볼 수 있다. - 싱글 스레드를 써야 할까 멀티스레드로 해야 할까? 프로세스는 싱글? 멀티? - 어떤 reading 매커니즘을 서야 할까? Blocking IO? Non-Blocking IO? 아니면 Demultiplexer? (참고) * 아래의 5 IO model을 적용하며 읽어보세요~ 🌹🌻🌸 ⬇️ blocking ..

👾아래 문서 정리 ⬇️ https://engineering.universe.com/introduction-to-concurrency-models-with-ruby-part-ii-c39c7e612bed Introduction to Concurrency Models with Ruby. Part II In the second part of our series we will take a look at more advanced concurrency models such as Actors, CSP, STM and of course Guilds engineering.universe.com 파트2에서는 Actor, CSP, STM, Guild 같은 심화된 동시성 모델을 살펴볼 것이다. 야호 😎💃 🐶 Actor Acto..

👾 아래 문서 정리 ⬇️ https://engineering.universe.com/introduction-to-concurrency-models-with-ruby-part-i-550d0dbb970 Introduction to Concurrency Models with Ruby. Part I In this first post, I would like to describe the differences between Processes, Threads, what the GIL is, EventMachine and Fibers in Ruby. engineering.universe.com 🐶 프로세스 concurrency => 한사람이 한손으로만 여러개의 공을 저글링하고 있는 것. 어떻게 보이든지 간에 이 사람은..