|
List Info
Thread: concurrency in IO
|
|
| concurrency in IO |
  United States |
2007-07-24 11:05:20 |
|
Hi Folks,
I just discovered IO. Looks like a very interesting language.
One key question for me: how real are the concurrency features? In
particular, how does IO compare to Erlang in terms of supporting large
numbers of actors (say 1000s to 10s of 1000s)?
Thanks much,
Miles Fidelman
__._,_.___
|
| Re: concurrency in IO |
  Canada |
2007-07-24 16:41:49 |
|
Coroutines in Io are very lightweight in terms of memory and switching overhead. Actors are implemented with coroutines.
For instance, I've tested up as high as 10 thousand coros operating simultaniously with no noticable sluggishness. I can dig up the test code and provide details if you so desire. -- Jeremy Tregunna jtregunna blurgle.ca">jtregunna blurgle.ca
On 24-Jul-07, at 12:05 PM, mfidelman wrote: Hi Folks,
I just discovered IO. Looks like a very interesting language.
One key question for me: how real are the concurrency features? In particular, how does IO compare to Erlang in terms of supporting large numbers of actors (say 1000s to 10s of 1000s)?
Thanks much,
Miles Fidelman
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: (Yahoo! ID required)
<*> To change settings via email: iolanguage -digest@yahoogroups.com">mailto:iolanguage-digest yahoogroups.com iolanguage -fullfeatured@yahoogroups.com">mailto:iolanguage-fullfeatured yahoogroups.com
<*> To unsubscribe from this group, send an email to: iolanguage -unsubscribe@yahoogroups.com">iolanguage-unsubscribe yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
!DSPAM:46a65f6b581095209328925!
__._,_.___
.
__,_._,___
|
| Re: concurrency in IO |
  United States |
2007-07-24 17:54:20 |
|
On Jul 24, 2007, at 9:05 AM, mfidelman wrote:
> Hi Folks,
>
> I just discovered IO. Looks like a very interesting language.
>
> One key question for me: how real are the concurrency features? In
> particular, how does IO compare to Erlang in terms of supporting large
> numbers of actors (say 1000s to 10s of 1000s)?
Here's some sample code you can play with to test things out:
// create 1000 objects and send each an async message
a := list()
1000 repeat(a append(Object clone))
a foreach( type)
// Verify that the coroutines are there and yielding (waiting to be run)
writeln("Coroutine yieldingCoros size = ", Coroutine yieldingCoros size)
// wait for them to finish
while(Coroutine yieldingCoros size > 1, yield)
// verify they're done
writeln("Coroutine yieldingCoros size = ", Coroutine yieldingCoros size)
__._,_.___
.
__,_._,___
|
| Re: concurrency in IO |
  United States |
2007-07-25 02:23:35 |
Unfortunately there's little "real-world" tests of
this for Io-
But- with my own appserver testing I saw no problems at the
500-actor
level-
(difficult to generate more load than that without a
dedicated test farm)
So- I think the logic is solid, and the actor-count is more
a question of
memory at this point-
I will be implementing a system that is on the order of
10s-of-thousands
of actors/Objects shortly, and will report back
--
Scott Solmonson
V: 408.718.6290
scosol scosol.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://grou
ps.yahoo.com/group/iolanguage/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://
groups.yahoo.com/group/iolanguage/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:iolanguage-digest@yahoogroups.com
mailto:iolanguage-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
iolanguage-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|
|
| Re: concurrency in IO |
  United States |
2007-07-25 13:45:36 |
Scott Solmonson wrote:
> Unfortunately there's little "real-world"
tests of this for Io-
>
> But- with my own appserver testing I saw no problems at
the 500-actor
> level-
> (difficult to generate more load than that without a
dedicated test farm)
>
> So- I think the logic is solid, and the actor-count is
more a question of
> memory at this point-
> I will be implementing a system that is on the order of
10s-of-thousands
> of actors/Objects shortly, and will report back
>
>
thanks to all who answered my question re. concurrency
a followup, if you will - anybody here played with Erlang?
any
comments, comparisons?
Thanks,
Miles
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://grou
ps.yahoo.com/group/iolanguage/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://
groups.yahoo.com/group/iolanguage/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:iolanguage-digest@yahoogroups.com
mailto:iolanguage-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
iolanguage-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|
|
| Re: concurrency in IO |
  United States |
2007-07-25 14:28:31 |
|
On Jul 25, 2007, at 11:45 AM, Miles Fidelman
< mfidelman%40meetinghouse.net">mfidelman meetinghouse.net> wrote:
> Scott Solmonson wrote:
>> Unfortunately there's little "real-world" tests of this for Io-
>>
>> But- with my own appserver testing I saw no problems at the 500-actor
>> level-
>> (difficult to generate more load than that without a dedicated test
>> farm)
>>
>> So- I think the logic is solid, and the actor-count is more a
>> question of
>> memory at this point-
>> I will be implementing a system that is on the order of 10s-of-
>> thousands
>> of actors/Objects shortly, and will report back 
>>
>>
> thanks to all who answered my question re. concurrency
>
> a followup, if you will - anybody here played with Erlang? any
> comments, comparisons?
>
> Thanks,
>
> Miles
I've worked with erlang pretty extensively, and concurrency is one
area where Erlang is pretty much unparalleled. Threads are pre-emptive
and executed in native context. Its reall y quite inspiring.
The general idea is that on VM start, Erlang sets up N execution
threads, where N is the number of cores on the device. Erlang
processes (which all share no state) execute on top of one of these
contexts.
The programmer doesn't consider this, however. The runtime abstracts
all this, just providing the developer with cheap "process" creation.
Its approach is really different from io's mostly on the lack of
global state (which Io must have unless it changes its inheritance
scheme to be more like Self's), its real underlying native threads,
and its pure arbitrary-data asynch message passing.
- dlf
__._,_.___
.
__,_._,___
|
| Re: concurrency in IO |
  United States |
2007-07-25 14:54:06 |
|
David Fayram wrote:
> I've worked with erlang pretty extensively, and concurrency is one
> area where Erlang is pretty much unparalleled. Threads are pre-emptive
> and executed in native context. Its reall y quite inspiring.
>
> The general idea is that on VM start, Erlang sets up N execution
> threads, where N is the number of cores on the device. Erlang
> processes (which all share no state) execute on top of one of these
> contexts.
>
> The programmer doesn't consider this, however. The runtime abstracts
> all this, just providing the developer with cheap "process" creation.
>
> Its approach is really different from io's mostly on the lack of
> global state (which Io must have unless it changes its inheritance
> scheme to be more like Self's), its real underlying native threads,
> and its pure arbitrary-data asynch message passing.
>
>
Thanks! That's sort of what I was wondering about. Now if someone
would write a language that's a cross between self and Erlang (or a
morphic interface to Erlang), that would be sweet.
Miles
__._,_.___
|
| Re: concurrency in IO |
  United States |
2007-07-25 19:13:48 |
|
On Jul 25, 2007, at 12:28 PM, David Fayram wrote:
> I've worked with erlang pretty extensively, and concurrency is one
> area where Erlang is pretty much unparalleled. Threads are pre-emptive
> and executed in native context. Its reall y quite inspiring.
>
> The general idea is that on VM start, Erlang sets up N execution
> threads, where N is the number of cores on the device. Erlang
> processes (which all share no state) execute on top of one of these
> contexts.
>
> The programmer doesn't consider this, however. The runtime abstracts
> all this, just providing the developer with cheap "process" creation.
>
> Its approach is really different from io's mostly on the lack of
> global state (which Io must have unless it changes its inheritance
> scheme to be more like Self's), its real underlying native threads,
> and its pure arbitrary-data asynch message passing.
Erlang is based on communicating processes which can be implemented
in any language. Erlang's value seems to be in putting this in a
package that makes it easier to use and more efficient for certain uses.
That said, I would be interested to see how one would go about
implementing an application that depends heavily on object
inheritance and code reuse (such as a GUI framework) in such a
system. If one has to end up implementing complex synchronization
code or running into complexity and overhead wrt communication then
it might be worth considering the trade-offs involved with such
solutions and whether they make sense for your application.
__._,_.___
|
| Re: concurrency in IO |
  Canada |
2007-07-25 19:18:56 |
|
On 25-Jul-07, at 3:28 PM, David Fayram wrote:
>
> On Jul 25, 2007, at 11:45 AM, Miles Fidelman
>
> Its approach is really different from io's mostly on the lack of
> global state (which Io must have unless it changes its inheritance
> scheme to be more like Self's), its real underlying native threads,
> and its pure arbitrary-data asynch message passing.
Well, Io has no notion of globals, only locals. What you're seeing is
due to the fact that Io only has one Lobby. I would stipulate that it
has "shared" state in some corner cases, but state is local to the
object its being called on 99 times out of 100.
> - dlf
--
jer
__._,_.___
.
__,_._,___
|
| Re: concurrency in IO |
  United States |
2007-07-26 03:27:23 |
|
On Wed, 25 Jul 2007 20:18:56 -0400
Jeremy Tregunna < jtregunna%40blurgle.ca">jtregunna blurgle.ca> wrote:
> On 25-Jul-07, at 3:28 PM, David Fayram wrote:
>
> >
> > On Jul 25, 2007, at 11:45 AM, Miles Fidelman
> >
> > Its approach is really different from io's mostly on the lack of
> > global state (which Io must have unless it changes its inheritance
> > scheme to be more like Self's), its real underlying native threads,
> > and its pure arbitrary-data asynch message passing.
>
> Well, Io has no notion of globals, only locals. What you're seeing is
> due to the fact that Io only has one Lobby. I would stipulate that it
> has "shared" state in some corner cases, but state is local to the
> object its being called on 99 times out of 100.
Is this really true? You're tracing back to Object for all sorts of things. Every if(), every setSlot(), every updateSlot(), every method(), etc. I would think the 99% figure you give is probably closer to 10%. If it is 99%, I'm wasting a lot of time with Courier by having every object have its own persistent, total environment. I think Miles is correct in that Erlang is really quite different from Io.
- John
__._,_.___
.
__,_._,___
|
|
|