List Info

Thread: concurrency in IO




concurrency in IO
country flaguser name
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

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Yahoo! Groups HD

The official Samsung

Y! Group for HDTVs

and devices.

Find Enlightenment

Yoga groups and

resources on

Yahoo! Groups.

Re: concurrency in IO
country flaguser name
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
jtregunnablurgle.ca">jtregunnablurgle.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)

<*&gt; To change settings via email:
    iolanguage-digest@yahoogroups.com">mailto:iolanguage-digestyahoogroups.com 
    iolanguage-fullfeatured@yahoogroups.com">mailto:iolanguage-fullfeaturedyahoogroups.com

<*> To unsubscribe from this group, send an email to:
    iolanguage-unsubscribe@yahoogroups.com">iolanguage-unsubscribeyahoogroups.com

<*> Your use of Yahoo! Groups is subject to:


!DSPAM:46a65f6b581095209328925!


__._,_.___
.

__,_._,___
Re: concurrency in IO
country flaguser name
United States
2007-07-24 17:54:20


On Jul 24, 2007, at 9:05 AM, mfidelman wrote:
&gt; Hi Folks,
&gt;
> I just discovered IO. Looks like a very interesting language.
>
&gt; One key question for me: how real are the concurrency features? In
> particular, how does IO compare to Erlang in terms of supporting large
&gt; 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(&quot;Coroutine yieldingCoros size = ", Coroutine yieldingCoros size)

// wait for them to finish

while(Coroutine yieldingCoros size > 1, yield)

// verify they're done

writeln(&quot;Coroutine yieldingCoros size = ", Coroutine yieldingCoros size)

__._,_.___
.

__,_._,___
Re: concurrency in IO
country flaguser name
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
scosolscosol.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
country flaguser name
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
country flaguser name
United States
2007-07-25 14:28:31


On Jul 25, 2007, at 11:45 AM, Miles Fidelman
< mfidelman%40meetinghouse.net">mfidelmanmeetinghouse.net>; wrote:

> Scott Solmonson wrote:
&gt;> 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-
&gt;> (difficult to generate more load than that without a dedicated test
>>; farm)
&gt;>
&gt;> So- I think the logic is solid, and the actor-count is more a
>>; question of
>&gt; memory at this point-
&gt;> 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
country flaguser name
United States
2007-07-25 14:54:06

David Fayram wrote:
&gt; 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.
>
&gt; 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.
>
&gt; The programmer doesn't consider this, however. The runtime abstracts
> all this, just providing the developer with cheap "process" creation.
>
&gt; 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

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Real Food Group

Share recipes,

restaurant ratings

and favorite meals.

Yoga Groups

Exchange insights

with members of

the yoga community.

Re: concurrency in IO
country flaguser name
United States
2007-07-25 19:13:48


On Jul 25, 2007, at 12:28 PM, David Fayram wrote:
&gt; 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.
>
&gt; 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
&gt; processes (which all share no state) execute on top of one of these
&gt; contexts.
>
&gt; The programmer doesn't consider this, however. The runtime abstracts
> all this, just providing the developer with cheap "process" creation.
>
&gt; 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.

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Need traffic?

Drive customers

With search ads

on Yahoo!

Yoga Resources

on Yahoo! Groups

Take the stress

out of your life.

Re: concurrency in IO
country flaguser name
Canada
2007-07-25 19:18:56

On 25-Jul-07, at 3:28 PM, David Fayram wrote:

>
&gt; 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
country flaguser name
United States
2007-07-26 03:27:23

On Wed, 25 Jul 2007 20:18:56 -0400
Jeremy Tregunna < jtregunna%40blurgle.ca">jtregunnablurgle.ca> wrote:

> On 25-Jul-07, at 3:28 PM, David Fayram wrote:
&gt;
> >
>; > 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

__._,_.___
.

__,_._,___
[1-10] [11-20] [21-30] [31-36]

about | contact  Other archives ( Real Estate discussion Medical topics )