Forum: Ruby Rinda::TupleBag

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alex V. Breger (Guest)
on 2007-04-30 19:48
(Received via mailing list)
Hello

In the current version of Ruby
(http://svn.ruby-lang.org/repos/ruby/trunk/lib/rind...)
Rinda::TupleBag is implemented with hash by tuple size and then with
array.
This realization is simple and fast on very small amount of data, but
scales very bad (especially in searching).

How will it be rewritten? Is there any attempts to make faster the
standard version?
Alex V. Breger (Guest)
on 2007-10-15 20:30
(Received via mailing list)
Hello

In the current version of Ruby
(http://svn.ruby-lang.org/repos/ruby/trunk/lib/rind...)
Rinda::TupleBag is implemented with hash by tuple size and then with
array.
This realization is simple and fast on very small amount of data (e.g.
on writing), but
scales very bad in reading and searching.

How can it be rewritten?
May be other realizations of tuplespaces are more scalable and fast?
Is there any attempts to make faster the standard version?
Eric H. (Guest)
on 2007-10-16 09:55
(Received via mailing list)
On Oct 15, 2007, at 09:29 , Alex V. Breger wrote:
> In the current version of Ruby
> (http://svn.ruby-lang.org/repos/ruby/trunk/lib/rind...)
> Rinda::TupleBag is implemented with hash by tuple size and then
> with array.
> This realization is simple and fast on very small amount of data (e.g.
> on writing), but
> scales very bad in reading and searching.
>
> How can it be rewritten?

I have heard of attempts at backing TupleSpace with a database, but
I've not heard of any being completed.

> May be other realizations of tuplespaces are more scalable and fast?
> Is there any attempts to make faster the standard version?

In ruby, not to my knowledge.
Young H. (Guest)
on 2007-10-17 00:04
(Received via mailing list)
On Oct 15, 2007, at 9:29 AM, Alex V. Breger wrote:

> Is there any attempts to make faster the standard version?
I'm working on creating a faster tuple space implementation called
Marinda that is completely independent of Rinda, though it won't be
ready for release in the near future.  All the tuple space
functionality is implemented, and I'm using it in a production
setting, but the scalable tuple space matching algorithm isn't
implemented (which is the main reason why I haven't released it
yet).  A scalable algorithm is challenging, but it should be more
doable with my implementation than in Rinda since I restrict tuples
to be values rather than allowing object references (via DRb) like
Rinda does.  I'm currently reading the literature for some insights
on a suitable algorithm.  Unfortunately, I have a number of things to
work on so implementing a scalable algorithm is lower down in my
priorities.  Anyway, for details on the design, see my talk slides at

   http://www.caida.org/publications/presentations/2007/
young_ark_syslunch/

  --Young
Shawn A. (Guest)
on 2007-10-24 21:02
(Received via mailing list)
I've thrown something together that uses KirbyBase (flat text ruby DBMS)
as
the back end.  Let me know if that interests you.

This does NOT support transactions.

/Shawn
Wayne C. (Guest)
on 2007-10-24 22:23
Shawn A. wrote:
> I've thrown something together that uses KirbyBase (flat text ruby DBMS)
> as
> the back end.  Let me know if that interests you.
>
> This does NOT support transactions.
>
> /Shawn

Sorry to disturb the entire list.

Shawn,

I'd like to see your implementation in KirbyBase.

I'm at: WayneFChin @ gmail DOT com

Thanks,

--Wayne
Alex V. Breger (Guest)
on 2007-10-25 19:35
(Received via mailing list)
I think we need a rewrite of standard rinda's implementation, e.g.
with Hashes, not by arrays.
We need faster verison in ruby, because current version is too slow
even on not so big databases.
Joel VanderWerf (Guest)
on 2007-10-25 21:46
(Received via mailing list)
Alex V. Breger wrote:
> I think we need a rewrite of standard rinda's implementation, e.g.
> with Hashes, not by arrays.
> We need faster verison in ruby, because current version is too slow
> even on not so big databases.

Is this even possible? IIRC, rinda uses #=== to match each element of
the tuples. Hash won't do that.
Eric H. (Guest)
on 2007-11-01 06:12
(Received via mailing list)
On Oct 25, 2007, at 08:35 , Alex V. Breger wrote:

> I think we need a rewrite of standard rinda's implementation, e.g.
> with Hashes, not by arrays.

Last I read the code, Rinda would work with either an Array or a Hash
as the underlying data structure.  I seem to recall that anything
supporting #each would work, but I'm not sure.

> We need faster verison in ruby, because current version is too slow
> even on not so big databases.

Don't rewrite, profile.
ara.t.howard (Guest)
on 2007-11-01 17:04
(Received via mailing list)
On Oct 15, 2007, at 11:54 PM, Eric H. wrote:

> I have heard of attempts at backing TupleSpace with a database, but
> I've not heard of any being completed.

i've backed it by sqlite, but not all functionality works due to the
requirements of remote objects being connected in memory to other
host in the current impl - i hacked in 'reconnect/unmarshal'
functionality but it's not fully tested.  it's *way* faster for big
objects and persistent.  ultimately i decided that a total rewrite
based on sqlite would be the way to go.

cheers.


a @ http://codeforpeople.com/
Alex V. Breger (Guest)
on 2007-11-02 01:01
(Received via mailing list)
@hash[size] ||= []
      @hash[size].push(ary)

Hashed by sizes and array for storing tuples of one size

Can we use tree of hashes here instead of hash of arrays? It can be
useful for any hierarchical data pushed into TupleBag, if we have a
lot of tuples with same length (e.g. rdf or xml data).
This topic is locked and can not be replied to.