Async Black-Box Programming
I am currently writing a black box trading bot and I am in the process of designing the way data is passed around. I realize I want an async sort of architecture. So I have been implementing ActionListeners and ActionPerformers but some of the listeners when they get data need to do calculation which could take a while, so I am wondering if there is an efficient f开发者_C百科ramework that allows me to program async easily and effectively in the most real time way possible.
I basically have two questions: Best way to do async sockets and communication throughout a program Best programming language or framework to write realtime applications
I would use multiple threads rather than multiplexed I/O. Java has very strong support for multithreading. Read Brian Goetz's book "Java Concurrency in Practice".
Try Scala. It has a very nice actor model which makes concurrent programming almost painless. You can read about Scala's actors here
The actor framework makes seance like @Vilius said. There is Scala with Akka, Groovy with GPars, C/C++ with Theron, etc.
See: http://en.wikipedia.org/wiki/Actor_model for more information.
Also there is a open source project on this areas called CEP Trader (http://code.google.com/p/cep-trader/) which perhaps you can volunteer.
精彩评论