-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please implement pull / push model in asynchronous way #127
Comments
Additionally, the kernel of operating system can be made based on this. |
using Reactive, Base.Test
s = Signal(3)
push!(s, 4)
@test value(s) == 3 # note it's not 4 yet
yield()
@test value(s) == 4 |
Check out the source code and see how the message queue is handled. |
I will check it in detail. |
I tried:
The operations are performed before I |
That's because you're running it interactively, and the command prompt |
script:
result:
The same? |
|
OK, I got the expected answer. |
I have found several issues (#103, #104, #99, #82), they are talking about the same thing.
The asynchronous pull / push model
Have you read the ReactiveX? If not, please take some time to read it.
I would provide some solutions to these issues.
#103 mentioned the pull / push model directly, and the lazy evaluation can be achieved.
Lazy evaluation, is an important property in functional programming.
On top of functional programming, reactive programming surely is.
With this, one can assign the whole pipeline to some scheduler, e.g. process scheduler, to achieve concurrency.
#104, the reactive programming is based on the pull / push model, then the signals are generated in demand.
Utilizing the property of
Task
, the operations can be plugable, because the operations wrapped inTask
are independent to each other, then one can rearrange the operations as needed.Task
keeps the function or operation in it.When the data is not pull (or push) to the
Task
, the data stream stops.#99 The pull / push model, is similar to signal / slot pattern.
If the operations are plugable, then signal / slot pattern is easy to achieve.
With signal / slot pattern, website data binding and graphic user interface would be easy to implement.
We can even make a package like D3.js, and a good data binding contributes a lot.
#82 is the basic of
Task
.About one year ago, it's the timing this package emerged, I have used and studied the documentation.
I found that this may not implemented in asynchronous way and I was disappointed then.
When I getting into the reactive programming and functional programming, I realize the power of asynchronous, and it should be BRING TO JULIA.
Further, I found that ReactiveX is the one I pursued......no, it can be more powerful.
The basic of concurrency programming is
Task
(or coroutine).Reactive programming can make data processing, web animation, and GUI easy.
So, I make my own one, ReactiveExtensions.jl, in order to bring ReactiveX to julia.
But there are still some necessary features not implemented:
Finally, I suggest you to add pull / push model into this package and my package provides as an example.
The text was updated successfully, but these errors were encountered: