Introduction

If easy process communication, coordination, parallel computing, syncronisation and more, is what you seek - then the powerfull inforistaspace shared memory structure is ready to help you.

I made this special build of a tuplespace to facilitate easier process communication, notification and distributed computing.

Kind regards, Ulrik Vendelbo

Copyright 2023 - you are not allowed to copy, use, sell or anytning without my explicit aprovement.

Tuple format

  • What is a tuple, and how to use it. A tuple is a data structure with one or more elements like {element1, element2, element3, elementN} an element can be whatever you decide, a list, a string, an integer, a boolean, a tuple, a bitsyntax etc ..

  • Identical tuples, there is no limit on how many times the same unike tuple can be put into, out’ed (saved), to the inforistaspace.

  • Template search with '?'

  • Wrong datatypes and errors; just try, the system will automatically give you an error if the values you put in the tuples is not allowed. Reserved symbol is '?' .. used for search.

  • Relevans value, to automatically remove tuples after some time or make "scent" based systems

API interface

Security

Performance

  • Speed

  • Space

  • Consistency - Atomic and Isolated

  • Use of priority value

Inforistaspace operations

out()

  • Writes a tuple to inforistaspace ex. out({a,b})

  • Writes a tuple to inforistaspace with priority value ex. out([{a,b},1000])

in()

  • Looks into inforistaspace for a tuple, if found remove the tuple from inforistaspace ex. in({a,b,alphabet}) or in({a,?,?}), else block calling process until tuple maybe later shows up.

  • Blocking operation

  • Template search allowed

inp()

  • Removes a tuple from inforistaespace, return false, if no tuple is found.

  • Template search allowed

rd()

  • Blocking operation - read the value of a tuple in inforistaspace.

  • Template search allowed

rdp()

  • Read the value of a tuple in inforistaspace, return false if no tuple is found.

  • Template search allowed

antird()

  • Blocking operation blocks until tuple disappears from inforistaspace. Return true when tuple disappears.

find()

  • Blocking operation - return value from first tuple there is matching the find() statement ex. find({?,horse,?}) returns the first tuple of length 3 and where the second value is horse.

  • Template search allowed

findp()

  • Return value from first tuple there is matching the find() statement ex. find({invoice,?}) returns the first tuple of length 2 and where the first value is "invoice". Returns false if no tuple is found.

  • Template search allowed

findall()

  • Returns a list of all the tuples in inforistaspace where the search match ex. findall({invoice, ?, company, ?, amount}), returns false if no tuple is found. Returns the tuple {all_found_false, {first 1000 found tuples}} or {all_found_true, {all found tuples}}

  • Template search allowed

findpriority()

  • Returns a list of the tuples in inforistaspace where the priority value is between the search pattern. Ex. findpriority({100,2000}) .. returns the tuples where priority value is equal to or greather than 100 and less than or equal to 2000. If no tuples is found, false, is returned.

co()

  • Blocking operation - wait for two or more tuples to be simultaneously present in inforistaspace ex. co({a,b}, {invoice, company, 12}). When all is present at the same time, return true.

notco()

  • Blocking operation - wait for two or more tuples not to be simultaneously present in inforistaspace ex. notco([{invoice, 123}, {a}, {start}]). When not all is present at same time then return "true".

antico()

  • Blocking operation - wait for none of the tuple is present ex. antico([{tuple1}, {tuple2}, {tuple3}]), return "true" when all tuples in the list is not there.

antinotco()

  • Blocking operation - at least two tuples present, return "true" if two or more tuples is present.

Inforistaspace handling

is:start()

  • Starts up a new inforistaspace.

is:disksave()

  • Save a copy of the running inforistaspace to disk.

is:diskread()

  • Read a inforistaspace file from disk into ram and make the system ready to use this inforistaspace.

is:diskdelete()

  • Delete existing inforistaspace files from disk.

is:usedisk()

  • setting inforistaspace to use disk instead of ram.

is:tuplecount()

  • return the total amount of tuples in tuplespace.

is:info()

  • show global statistic for the inforistaspace.

Examples of use

Master Worker tasks (parallel computing)

Alert system

Process coordination

Internet of things

Supply chain coordination

As a database system

Load balancing system

Distributed data structure

  • eg. a two dimmensional array A can be made by a series of tuples such as:

    • {A,1,1,(element data)}

    • {A,1,2,(element data)}

    • {A,2,1,(element data)}

    • {A,2,2,(element data)}

Fault tolerance

  • se downloaded fil (papers folderen): Using mobile code to provide fault tolerance in tuple space based coordination languages.pdf

Timing

  • Out a tuple with priorty seconds, then Antird() the same tuple to get noticed when it disapears.

# Jobs to do #

COMMUNICATION