Akka 또는 원자로 [닫힘]
새 프로젝트 (자바 기반)를 시작하는 중입니다. 모듈 식, 분산 형 및 탄력적 인 아키텍처로 구축해야합니다.
따라서 비즈니스 프로세스가 서로 통신하고 상호 운용 가능할뿐만 아니라 독립적이기를 원합니다.
나는 지금 나이 차이 외에도 두 가지 다른 견해를 표현하는 두 가지 프레임 워크를보고 있습니다.
- Akka ( http://akka.io )
- 리액터 ( https://github.com/reactor/reactor )
위의 프레임 워크 중 하나를 선택할 때 고려해야 할 사항은 무엇입니까?
내가 지금까지 이해하는 한, Akka는 여전히 어떻게 든 연결되어 있지만 (메시지를 보낼 배우를 '선택'해야하는 방식으로) 매우 탄력적입니다. Reactor가 느슨한 동안 (이벤트 게시를 기반으로 함).
누군가가 적절한 결정을 내리는 방법을 이해하도록 도울 수 있습니까?
최신 정보
Akka 의 Event Bus 를 더 잘 검토 한 결과 , Reactor에서 표현한 기능 이 이미 Akka에 포함되어 있다고 생각 합니다.
예를 들어 https://github.com/reactor/reactor#events-selectors-and-consumers에 문서화 된 구독 및 이벤트 게시 는 Akka로 다음과 같이 표현할 수 있습니다.
final ActorSystem system = ActorSystem.create("system");
final ActorRef actor = system.actorOf(new Props(
new UntypedActorFactory() {
@Override
public Actor create() throws Exception {
return new UntypedActor() {
final LoggingAdapter log = Logging.getLogger(
getContext().system(), this);
@Override
public void onReceive(Object message)
throws Exception {
if (message instanceof String)
log.info("Received String message: {}",
message);
else
unhandled(message);
}
};
}
}), "actor");
system.eventStream().subscribe(actor, String.class);
system.eventStream().publish("testing 1 2 3");
따라서 두 가지의 주요 차이점은 다음과 같습니다.
- Akka, 더 성숙하고 Typesafe에 바인딩
- 원자로, 초기 단계, 봄에 바인딩
내 해석이 맞습니까? 그러나 Akka의 Actor와 Reactor의 Consumer의 개념적 차이점은 무엇 입니까?
Reactor는 아직 스케치이고 나 (Akka 기술 책임자)는 그것이 어디로 갈지에 대한 통찰력이 없기 때문에이 시점에서 말하기는 어렵습니다. Reactor가 Akka의 경쟁자가되는지 보는 것은 흥미로울 것입니다. 우리는 그것을 기대하고 있습니다.
내가 볼 수있는 한, 요구 사항 목록에서 Reactor에는 복원력 (즉, Akka에서 감독이 제공하는 것)과 위치 투명성 (즉, 로컬 또는 원격 메시징을 통해 추상화 할 수있는 방식으로 활성 엔티티 참조)이 없습니다. "분산"을 의미). "모듈 식"의 경우 Reactor에 대해 충분히 알지 못합니다. 특히 활성 구성 요소를 찾고 관리하는 방법에 대해 잘 모릅니다.
지금 실제 프로젝트를 시작하고 첫 번째 문장을 만족시키는 것이 필요하다면,이 시점에서 Akka를 추천하는 것이 논란의 여지가 없을 것이라고 생각합니다 (Jon도 언급했듯이). SO 또는 akka-user 메일 링리스트 에 더 구체적인 질문을 자유롭게 물어보십시오 .
Reactor는 Spring에 묶여 있지 않으며 선택적 모듈입니다. 우리는 Reactor가 Jon이 설명한 것처럼 휴대용이되기를 원합니다.
I won't be confident about pushing in production as we are not even Milestone (1.0.0.SNAPSHOT), in that regard, I would have a deeper look at Akka which is a fantastic asynchronous framework IMO. Also consider Vert.x and Finagle which might be adapted if you look either for a platform (the former) or for composable futures (the latter). If you look after a wide range of asynchronous patterns, maybe GPars will provide you a more complete solution.
In the end, we might certainly have overlaps, in fact we're leaning toward a mixed approach (flexible composable eventing, distributed, and not bound to any dispatching strategy) where you can easily find bits from RxJava, Vert.x, Akka etc. We are not even opinionated by the language choice, even if we are strongly committed to Groovy, people have already started Clojure and Kotlin ports. Add to this mix the fact that some requirements are driven by Spring XD and Grails.
Many thanks for your witnessed interest, hopefully you'll have more comparison points in a couple of months :)
This is an excellent question and the answer will change over the weeks to come. We can't make any promises of what inter-node communication will look like right now just because it's too early. We still have some pieces to put together before we can demonstrate clustering in Reactor.
With that said, just because Reactor doesn't do inter-node comms OOTB doesn't mean it can't. :) One would only need a fairly thin network layer to coordinate between Reactors using something like Redis or AMQP to give it some clustered smarts.
We're definitely talking about and planning for distributed scenarios in Reactor. It's just too early to say exactly how it's going to work.
If you need something that does clustering right now, you'll be safer choosing Akka.
참고URL : https://stackoverflow.com/questions/16595393/akka-or-reactor
'developer tip' 카테고리의 다른 글
| f : viewAction / preRenderView 대 PostConstruct를 언제 사용합니까? (0) | 2020.09.10 |
|---|---|
| 친구에게 비공개 메시지 보내기 (0) | 2020.09.10 |
| AMI 저장 비용 (0) | 2020.09.10 |
| PostgreSQL : CREATE TABLE 정의에서 인덱스를 생성 할 수 있습니까? (0) | 2020.09.10 |
| 팬더 적용 함수에서 행의 인덱스 가져 오기 (0) | 2020.09.10 |