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
-
API https secure
-
Encryption of tuple data? https://jisajournal.springeropen.com/articles/10.1186/s13174-017-0070-3
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 #
-
Observation: out() tuple takes longer time if it dont already exist, but if it exist already then it is very, very, fast! :-)
-
tjek https://www.erlang.org/blog/scalable-ets-counters/ for faster implementation?
-
later, test how slow the inforistaspace will be if it works directly with ets disk tables and not just in ram
-
NOTE: if many tuples of same length then the list in tuple_length table will get very long .. maybe an performance issue when searching for a tuple with this length?
COMMUNICATION
-
Remember: communication is the root cause!!!! For everything!!!!!
-
Communication can be shown by actions
-
Interaction is a way of communication
-
Knowledge is shared by communicating
-
What is good communication
-
What is bad communication
-
How to improve communication in an accepted positive way
-
Misunderstanding is because of unclear communication / lak of information / corrupted information
-
Beliefs is shared by communication - why is beliefs often to easily accepted (includes religion)
-
Why is beliefs stronger in a group or society, why can it be hard to question beliefs
-
How can (automated) communication enrich our lives
-
In nature communication is a fundamental property - animals, mushrooms all communicate
-
Percieved communication
-
Bodily communication loss and ageging
-
How to improve your daily communication
-
Communication as a wepon
-
Change of belief - one needs accesibility to other beliefs to be able to change/question ones outlook
-
Communication channels / mediums
-
Exchange of services by communication
-
Communication is an exchange of information packets
-
Communication efficiency, cost, versatility and resilience
-
Truth in communication
-
(https://globalcdt.com/en/why-do-we-need-truth-in-communication/)
-
(https://www.duncanautrey.com/fractalfriends/2019/6/10/the-value-of-speaking-your-truth)
-
(https://www.mindtools.com/a0g6bjj/how-to-spot-real-and-fake-news)