Comments (9)
The examples are fixed. I'm sorry, some of the internals were changing and the examples were not kept up to date. I'm going to take some time this week to review where we are w.r.t. a 1.0 rc. If you are doing some development with async (which is awesome BTW) I'd love to hear your feedback and ideas. In particular, pain points for learning now to use async - what things did you find confusing or hard at first (conceptually, programmatically, etc). I can improve documentation for new users by understanding how you get on.
from async.
No worries, thanks for taking a look. FYI, the echo example doesn't work with the latest released version of the gem, but does work with the latest master. The AIO example does appear to work with both.
I was originally looking to implement an HTTP2 server, and was looking for alternatives to Celluloid (since it offers more than I really need...I'm just interested in the async IO and avoiding creating a thread for every connection). I ended up falling back on the HTTP2 support being added to Reel, but am still interested in playing with this to see if I can get a lighter weight server working. I'll definitely let you know if I find anything else, or if the project comes to anything.
I started looking at async to avoid the complexities of Celluloid (I was only really interested in achieving asynchronous IO without threads, not necessarily for all Celluloid offers
from async.
Yes, I'll fix all these issues today.
I'm almost certain that in it's current state, Celluloid will never reach v1.0 - which I think is a problem.
Async is like all the good bits of celluloid, minus the actors. I've been thinking I'll implement something like async-actor
in the future since I like the concept and it's fun to play with. My core interest though is pervasive asynchronous IO.
from async.
So, I've left Async on the back burner for a few weeks while I let my subconscious digest the current API design. Something wasn't sitting right - the way Reactor#async(*ios)
takes IOs, wraps them and passes them to the task just didn't feel quite right.
I prefer explicit resource management, e.g. Socket.accept(server_address) do |peer|
where in all cases the server will be closed after the #accept
call is done. e.g. don't make it the responsibility of the caller to clean up.
I've made a small internal change that has far reaching consequences to the design upstream - no longer async
takes sockets and wraps them. You must do this explicitly. It forces you to be more aware of the design choices and I think ultimately simplifies how things work.
In terms of how this affects you - I've also decided that sockets don't belong in async
. The core async
- once it's done, it should be done. The API is so fundamental, that it shouldn't really be something we expect to change a lot. I don't mind improvements to performance, under the hood, which to some extent are planned (improvements to how timers are handled). But, general changes to the way it works will cause massive upstream disturbances. I also feel like gems with a large surface area never really stabilize and this is detrimental in many ways.
Therefore, there is a new gem which you should depend on, async-socket
. It will depend on async
and expose all the socket related functionality you are expecting. It's not done yet but it will be soon. The benefit of this, is that in theory, if someone didn't like the way async-socket
worked, they could make their own, but the core async
gem wouldn't change, and is the shared foundation of all this work.
from async.
Good to know. I submitted a PR for adding SSL support, but that is probably unnecessary given these changes. Let me know whenever you release async-socket and I'll see if I can get my HTTP2 server working with it instead.
from async.
@rfestag Your PR for SSL support is greatly appreciated and it's definitely something that I want. Shortly, the code for async-socket
will be up and I think if you can rebase your PR on that it would be awesome.
It's also exactly the reason why it can't go into the async
gem. The SSLSocket depends on OpenSSL. I think it's simply wrong to have the dependency so deeply seated.
from async.
Same issue here. I'm interested in playing with this gem for an http2 based server. In my case, I'm running Ruby 2.3.3
$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
from async.
Okay, I'll check what's going on. Sorry about this.
from async.
from async.
Related Issues (20)
- Unhandled Exception does not stop program running HOT 10
- [Enhanchment] Make alternate exception reporting (the colorful one) opt in. HOT 3
- [Question] How to stop a fiber? HOT 4
- Strange timeout bug. HOT 10
- Dynamic concurrency limiter / adaptive semaphore HOT 3
- Configure log level specificly for Async HOT 4
- Segmentation fault HOT 5
- ActiveRecord best practices support or documentation HOT 1
- [Question] What difference between `Async` and `Sync` HOT 1
- bundle error HOT 1
- Catch all Async errors and report to Sentry? (or other error reporting)
- How to wait for `.schedule`'d fibers to finish? HOT 7
- Properly managing interrupts (works for async v 1.31, "breaks" for async v 2.5.6) HOT 3
- Tasks signaling Conditions leave suspended Fibers behind HOT 8
- Error reporting difference between Sync{} and Async{}.wait HOT 2
- Understanding the difference of Sync usage within Falcon HOT 3
- macOS: `Errno::EINVAL: Invalid argument - IO_Event_Selector_KQueue_io_wait:IO_Event_Selector_KQueue_Waiting_register` HOT 18
- Stopping remaining tasks upon completion of one task HOT 2
- Blocking subprocess (popen3) HOT 10
- Sleep Hook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async.