Some of QBit's inspiration:
-AKKA
-Go Channels
-Active Objects
-Apartment Model threading
-Actor
-Mechanical sympathy
-LMAX Disruptor
-Link transfer queue vs disruptor
-Work done by Tim Fox on Vertx
-----------------------------------------------------------
AKKA
AKKA toolkit promise is to make building powerful concurrent and distributed applications more easy.
-AKKA-actors (integration within one machine)
-AKKA remoting and AKKA cluster (integrate between more then one machine withing your suc-system)
-AKKA-HTTP (integration between systems outside you control.
AKKA uses the Actor Model to raise the abstraction level and provide a better platform to build correct, concurrent, and scalable applications.
AKKA adopts the "Let it crash" model (for fault tolerance) which the telecom industry has used with great success to build applications that self-heal and systems that never stop.
Actors also provide the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications.
Go Channels
Go is a programing language that was implemented mainly to make things faster (compiling, building etc..), type-safe and memory-safe, good support for concurrency and communication, and efficient latency-free garbage collection
https://www.youtube.com/watch?v=rKnDgT73v8s
this youtube video is a good intro to the Go language. let's move on to Go Channels.
There are two core Go features that make Go stand out: go routines and channels. Combined, goroutines and channels are Go's take on concurrency. We can think of goroutines as threads.
A channel is used to communicate between goroutines. They can be used to signal or pass data around. Anyone familiar with traditional thread-based programming knows the pain associated with sharing data. You have to carefully manage locks around data, avoiding deadlocks and avoiding serializing your threads. With channels, only one goroutine ever has access to a piece of data at a given time. There's no locking, only communication.
Consider a phone conversation. It can be difficult to coordinate who should talk, especially as more people get added to the conversation. It isn't uncommon for two people to speak at once. Conversly, it also isn't uncommon for one person to do all the talking and not let the others participate. This, to me, is what thread-based programming is like. Channels on the other hand, are more like passing notes in class. Coordination is strictly controlled by the act of passing the note to someone. There's simply no way for you and your friend to write on the same note at the same time.
channels are created with "make". A channel is created to pass a specific type. For example, we can create a channel of integers like so:
c := make(chan int, 1)
This is creating a channel that can be used to pass integers between goroutines. The1 tells us that our channel has 1 value to pass around. This is known as a buffered channel.
Active Objects
challenge: invoke a method in another thread
problem: methods invoked on an object concurrently do not block the entire process
make access to these object easy and intuitive
solution is to use the active object which decouples method execution from method invocation for objects that each reside in their own thread of control.
You can have multiple clients requests running concurrently on a object.
https://www.youtube.com/watch?v=U9Tf7h-etl0 this video is a good intro to active objects.
Apartment Model Threading
STA (single-threaded apartment) and MTA (multi-threaded apartment) are to do with Component Object Model (COM) components can be designed to be accessed by a single thread, in which case it they are hosted in an STA, or they can be made internally thread safe, and hosted in an MTA. A process can have only one MTA, but many STAs. If you're only going to consume COM components all that you really need to know is that you have to match the apartment to the component or nasty things will happen.
Actor Model
this video is a good intro to actor model https://www.youtube.com/watch?v=enJtcusvpzc
The actor model in computer science is a mathematical model of concurrent computation that treats "actors" as the universal primitives of concurrent computation: in response to a message that it receives, an actor can make local decisions, create more actors, send more messages, and determine how to respond to the next message received.
Electronic mail (e-mail) can be modeled as an Actor system. Accounts are modeled as Actors and email addresses as Actor addresses.
continued ....