Re: [Pharo-users] Non-blocking IO

2020-04-27 Thread Daniel Turczański
Thanks Sven! Looks good to me. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Non-blocking IO

2020-04-24 Thread Sven Van Caekenberghe
Daniel, > On 24 Apr 2020, at 12:35, Daniel Turczański wrote: > > Thanks. Are there any benchmarks available for Pharo HTTP servers? Is it > possible to achieve a performance similar to node.js? I know the biggest > selling point of Smalltalk is not perf but still I'm curious. Benchmarking is a

Re: [Pharo-users] Non-blocking IO

2020-04-24 Thread Daniel Turczański
Thanks. Are there any benchmarks available for Pharo HTTP servers? Is it possible to achieve a performance similar to node.js? I know the biggest selling point of Smalltalk is not perf but still I'm curious. The Concurrency book [1] says that Pharo's Process is like a fibre and is lightweight. Ho

Re: [Pharo-users] Non-blocking IO

2020-04-24 Thread dturczanski
Thanks for pointing out the difference between non-blocking and async IO. I think in Java NIO there is a thread that constantly calls the [e]poll() in the background and this way the IO becomes non-blocking. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Re: [Pharo-users] Non-blocking IO

2020-04-23 Thread Richard O'Keefe
Asynchronous I/O and non-blocking I/O are very different things. The POSIX aio* functions are asynchronous, not non-blocking. The "conventional" Unix way to do asynchronous I/O is to start a new thread for the transfer. The new thread uses ordinary synchronous I/O and then responds to completion a

Re: [Pharo-users] Non-blocking IO

2020-04-19 Thread tbrunz
I think you can do what you describe if you use #fork to create separate processes for each of your concurrent HTTP calls. Here's an example -- Try the following (from http://forum.world.st/Teaching-fork-td4786444.html) 10 timesRepeat: [ (Delay forSeconds: 1) wait. Transcript show: 'hello'; cr ].

[Pharo-users] Non-blocking IO

2020-04-19 Thread dturczanski
Hi guys, I'm wondering whether Pharo support any form of non-blocking IO. You can find such IO support in Node.js or Java NIO packages and on Linux they use select/poll async IO system calls. An example scenario is to be able to schedule 10 concurrent HTTP calls taking 1-5s and wait for them to f