Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ioquatix
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
Streaming Rack with Falcon
(codeotaku.com)
4 points
by
ioquatix
2y ago
|
0 comments
2.
▲
by
ioquatix
2y ago
Have you actually benchmarked this and published the benchmarks somewhere?
3.
▲
by
ioquatix
3y ago
https://github.com/socketry/async uses coroutines and I think in general it’s been a great model with very few downsides in practice.
4.
▲
by
ioquatix
3y ago
Sounds like a useful feature to me.
5.
▲
by
ioquatix
4y ago
"All Programming is about State". All code is state. All state is code. It's turtles all the way down.
6.
▲
by
ioquatix
4y ago
It's adopted by Ruby: < https://github.com/socketry/io-event > which is used by < https://github.com/socketry/async > which is part of the Ruby 3+ Fiber Scheduler for light weight con
7.
▲
by
ioquatix
5y ago
The fiber scheduler also hooks into the `Timeout` module to provide safe(r) timeouts using the event loop.
8.
▲
by
ioquatix
5y ago
Every task is a promise you can wait on for the result. Concurrent fan out is trivial.
9.
▲
by
ioquatix
5y ago
That's pretty accurate.
10.
▲
by
ioquatix
5y ago
The gem namespace was transferred to me some time around 2017.
11.
▲
by
ioquatix
5y ago
ActiveRecord does work but it’s hugely limited because they have explicit per-thread resource pools which we can’t get around very easily.
12.
▲
by
ioquatix
5y ago
> When designing an API in Rust which performs IO, you have to make a decision whether you want it to be synchronous, asynchronous, or both. Why must that be true? Why can't you write the interface once, and have concurrency be an i
13.
▲
by
ioquatix
5y ago
So what are we going to do about it?
14.
▲
by
ioquatix
5y ago
Extinction :(
15.
▲
by
ioquatix
5y ago
Nope, they are totally different. However, the DB gem is an interface/driver similar to PHP's PDO, while AR is a set of drivers, interfaces and high level ORM interfaces. In theory, one could probably use DB as a driver under AR.
16.
▲
by
ioquatix
5y ago
The fiber scheduler solves this as concurrent execution is now built into the core of Ruby 3.
17.
▲
by
ioquatix
5y ago
Also, it turns out the `pg` is also partially non-blocking. But AR may need to improve their connection pool implementation.
18.
▲
by
ioquatix
5y ago
Non-blocking Postgres https://github.com/socketry/db-postgres Non-blocking MariaDB https://github.com/socketry/db-mariadb
19.
▲
by
ioquatix
5y ago
Yes, it was. It was originally a front end and back end (query server) for CouchDB. But CouchDB 2 really went in a different direction to what I expected with query servers so I gave up and decided to pivot in a different direction with the
20.
▲
by
ioquatix
5y ago
For the lolz: https://github.com/ioquatix/relaxo
21.
▲
by
ioquatix
6y ago
This problem is being addressed in Ruby 3.
22.
▲
by
ioquatix
6y ago
Ruby FFI has been experimenting with provided support for kicking external functions to background threads with a single keyword argument.
23.
▲
by
ioquatix
6y ago
https://github.com/socketry/async-pool
24.
▲
by
ioquatix
6y ago
We can do the same model for Ruby (preemption of event driven fibers) and may choose to do so in the future. We are just taking one step at a time.
25.
▲
by
ioquatix
6y ago
Yes, you run one scheduler per core.
26.
▲
by
ioquatix
6y ago
async/await is a huge anti-pattern IMHO.
27.
▲
by
ioquatix
6y ago
Well, it's not a list. It's just a set of hooks. But that's basically it.
28.
▲
by
ioquatix
6y ago
Actually... I've implemented both client and server side HTTP/2 push and I'd say... it's a hack and we should deprecate it and remove it from the spec.
29.
▲
by
ioquatix
6y ago
Yes, it lets you implement event loop for Ruby. We use fibers to avoid callback hell and avoid rewriting existing code. This is covered in my talk here: https://www.youtube.com/watch?v=qKQcUDEo-ZI
30.
▲
by
ioquatix
6y ago
Latest talk about scheduler: https://www.youtube.com/watch?v=Y29SSOS4UOc Recent summary of scheduler, a little bit out of date (changes to interface): https://www.codeotaku.com/journal/2020-04/ruby
More ›