Git Product home page Git Product logo

Comments (9)

ioquatix avatar ioquatix commented on May 17, 2024 2

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.

rfestag avatar rfestag commented on May 17, 2024 1

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.

ioquatix avatar ioquatix commented on May 17, 2024 1

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.

ioquatix avatar ioquatix commented on May 17, 2024 1

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.

rfestag avatar rfestag commented on May 17, 2024 1

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.

ioquatix avatar ioquatix commented on May 17, 2024 1

@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.

rfestag avatar rfestag commented on May 17, 2024

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.

ioquatix avatar ioquatix commented on May 17, 2024

Okay, I'll check what's going on. Sorry about this.

from async.

tarcieri avatar tarcieri commented on May 17, 2024

from async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.