Docstoc

EXTENDING TUPLE SPACES TOWARDS A MIDDLEWARE FOR eCOMMERCE

Document Sample
EXTENDING TUPLE SPACES TOWARDS A MIDDLEWARE FOR eCOMMERCE Powered By Docstoc
					TOWARDS SCALABILITY
  IN TUPLE SPACES




     Philipp Obreiter, Guntram Gräf
         Telecooperation Office (TecO)
            University of Karlsruhe
    Obreiter/Gräf: Towards Scalability in Tuple Spaces


                        Goals
Scalable tuple space
  – without schematic restrictions

Procedure:
• formalize and classify tuples
• analyze former indexing strategies
• deduce a new indexing strategy
• conceive the architecture and implementation
  of a scalable tuple space
 Obreiter/Gräf: Towards Scalability in Tuple Spaces


Hierarchy of fields (F,matchF)
                         F


       int                             string


1234          5678            “Hello“         “World“
       Obreiter/Gräf: Towards Scalability in Tuple Spaces


    Hierarchy of tuples (,match)
                              
           (int,F)                    (F, string)

(int,(int,int))          (int,string)          (F,“Hello“)
(1234,(56,78))                     (int,“Hello“)

         (1234,string)            (5678,“Hello“)
    Obreiter/Gräf: Towards Scalability in Tuple Spaces


        Taxonomy of schemes
• Degrees of freedom:
  (A) class hierarchy
  (B) instance hierarchy
  (C) semantic tuples
  (D) nested tuples
  (E) tuple hierarchy


• Scheme ABCDE imposes restrictions on
  degrees of freedom
        Obreiter/Gräf: Towards Scalability in Tuple Spaces


             Linda scheme: 23111
                             A
                                0

                                1
B                                                                E
                                2
    0   1                                                    0
               2      3                   1

                            1       1


         C      0                               0    D
        Obreiter/Gräf: Towards Scalability in Tuple Spaces


    TSpaces/JavaSpaces scheme: 00110
                             A
                                0

                                1
B                                                                E
                                2
    0   1                                                    0
               2      3                   1

                            1       1


         C      0                               0    D
    Obreiter/Gräf: Towards Scalability in Tuple Spaces


           Distribution model
• Set of p servers {1,...,p}
• Distribution (W,R) for tuple t
  – writes to W(t) {1,...,p}
  – reads from R(t) {1,...,p}
                              1     2     3     4        5   6

                                    R          W
 condition for correctness
  match(t1,t2)  W(t2)  R(t1)  
      Obreiter/Gräf: Towards Scalability in Tuple Spaces


        Conceiving a distribution
t       W(t)           t                              W(t)
                                         abstract
           R(t)                      representation       R(t)

   directly                            indirectly

Abstract representation
  – uncouples abstraction of tuples and adjustment to p

  – is an efficient data structure
        Obreiter/Gräf: Towards Scalability in Tuple Spaces


       Indexing based on hashing (I)

                            (F)
(printer,F,F)         (F,1200dpi,F)         (scanner,F,F)

(printer,1200dpi,F)                    (scanner,1200dpi,F)

P1                 (F,1200dpi,x.x.x.x)                       S4
       P3                                              S3
  P2        P4     P5                      S1     S2         S5
         Obreiter/Gräf: Towards Scalability in Tuple Spaces


        Indexing based on hashing (II)

                             (F)
(printer,F,F)        (F,1200dpi,F)            (scanner,F,F)

(printer,1200dpi,F)                     (scanner,1200dpi,F)

P1
{1}                 (F,1200dpi,x.x.x.x)                        S4
                                                                {7}
        P3
        {6}                                              S3
                                                         {2}
  P2
  {5}         P4
              {8}   P5
                    {3}                     S1
                                           {12}    S2
                                                   {5}         S5
                                                               {8}
         Obreiter/Gräf: Towards Scalability in Tuple Spaces


       Indexing based on hashing (III)

                             (F)
(printer,F,F)          (F,1200dpi,F)         (scanner,F,F)

(printer,1200dpi,F)
         {3}                             (scanner,1200dpi,F)
                                                   {7}


P1                  (F,1200dpi,x.x.x.x)                       S4
        P3                                              S3
  P2         P4     P5                      S1     S2         S5
      Obreiter/Gräf: Towards Scalability in Tuple Spaces


     Indexing based on hypercubes
• Fields:
  – hierarchical structure  intervals instead of points
  – correctness: matchF(f1,f2)  F(f2)  F(f1)
• Tuples:
  – tuple complex  multi-dimensional index
  – induces transformation  to hypercubes
• Distribution:
  – Partition hyperspace into tuple domains 1,... p
  – (,) permissible with (t) := {q | q(t)   }
      Obreiter/Gräf: Towards Scalability in Tuple Spaces


     disjoint/complete tuple domains
     x1
     5

     4                                         T6
T4
     3
             T5
     2

     1                       T3
T1                                T2
-1       0        1      2        3        4        5      x2
      Obreiter/Gräf: Towards Scalability in Tuple Spaces


     disjoint/complete tuple domains
     x1
     5                 2
     4                                             T6
T4
     3
             T5                           3
     2
1
     1            4            T3                      5
T1                                   T2
-1       0        1         2        3         4         5   x2
       Obreiter/Gräf: Towards Scalability in Tuple Spaces


     Overlapping/incomplete tuple domains
      x1
      5

      4                                         T6
T4
      3
              T5
      2                3
1    1                         T3
T1                                   T2              2
-1        0        1        2        3      4         5     x2
          Obreiter/Gräf: Towards Scalability in Tuple Spaces


    Components of the architecture

 Agent              F -server             -server
 server


                             Agent
                            Agent
                            Agent                            Tuple
                                                            Tuple
                                                           Tuple
Client
Client                                                    Tuple
                                                            Space
Client                         (t)                        Space
                                                           Space
            t                                  (t)    space
                                                            Server
                                                           Server
                                                          Server
                                                          server
    Obreiter/Gräf: Towards Scalability in Tuple Spaces


  Cache validation of the agents

• F-server:
  – read-only cache, hence valid


• -server:
  – subtrees own sequence numbers
  – cache entry invalidated, if contacting TS Server
    with deprecated sequence number
   Extended k-d tree guarantees correctness
       Obreiter/Gräf: Towards Scalability in Tuple Spaces


                         SATUS

•   Implementation of a Scalable Tuple Spaces
•   Management interface
•   Extension to four tiers
•   Built-in standard fields
•   Validated with respect to:
    – Efficiency of the distribution
    – Efficiency of adaptive tuple domains
             Obreiter/Gräf: Towards Scalability in Tuple Spaces


                Adaptive tuple domains
Response time

   2.5

    2

   1.5

    1

    .5

                                                                   n
         0      50    100    150   200    250   300   350    400
Obreiter/Gräf: Towards Scalability in Tuple Spaces


              Questions?
     Obreiter/Gräf: Towards Scalability in Tuple Spaces


                 Nested tuples
• Field complex on itself, hence proposed
  indexing mechanism not directly applicable

• If depth limited, unnest

• Split into several tuples (atomicity?)

• Include complex classes into the field hierarchy
    Obreiter/Gräf: Towards Scalability in Tuple Spaces


                   Scalability
Five dimensions:
• size of tuples
• number of tuples in the tuple space
• number of considered tuple spaces
• throughput of the tuple space
• number of clients
         Obreiter/Gräf: Towards Scalability in Tuple Spaces


                Hierarchy of fields
                        F

     x modulo y                                    fraction
x modulo 3 x modulo 5                             1/2         2/4

 0          1              0       1
     2                 4               2          6/9         4/6
                               3
     Obreiter/Gräf: Towards Scalability in Tuple Spaces


         Tree of tuple domains
               x2 = 0

2                           x1 = 2

        x2 = 3                              x1 = 4

4                     5         3                      2
Rate          Obreiter/Gräf: Towards Scalability in Tuple Spaces


1
         Efficiency of the distribution

.8
                                                                   pruning
.6                                                                   rate

.4


.2
                                                              overhead
                                                                     n
     0   50     100   150    200   250 300      350    400   450 500

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:5/8/2013
language:English
pages:26