Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. The idea is pretty simple, lets imagine.
  2.  
  3. * A single sequence of code (like a single threaded program).
  4. Code is discrete functionality.
  5. It is the change of some state(s) of electric circuits.
  6. Code is usualy IOing or working on a context which is basically data.
  7. Lets forget the IOing for today.
  8.  
  9.  
  10. * Then cut it into functional pieces which are defined by doing exactly one certain change on the context data.
  11. A tick is the piece of functionality neccessary to do a specified change of state/information/data.
  12. For example, the classic clock has three ticks which contain the movement of one of three arrows by 360°/12, 360°/60 and 360°/60 or in short how the projected time(piece of data) is modified. The joke is, its ticking(discrete functionality) abstracts continuous functionality of the clockwork.
  13.  
  14. * The combination of a set of tick(s) acting on certain data is an entity.
  15.  
  16. * The question for realizing complexity is, how to change context in a sequence of ticks which need to act on multiple data. And here we go biology.
  17. A cell in your body is basically a thing getting a signal and doing something within its own system.
  18. This something could also be triggering functionality to send a signal to another cell.
  19. So Tick, Tick, Signal, Tick, Tick, Tick, Signal, Tick, Signal and so on.
  20.  
  21. * Entities are abstractable.
  22. A cell has its contained functionality acting on its contained information.
  23. You sum many cells up and you get a human entity containing more functionality acting on more (contained) information.
  24.  
  25. * These entities are arranged in spaces which are an abstraction.
  26. You could compare them with organs.
  27.  
  28. * When an entity gets a signal, it triggeres a tick.
  29. In my realization A tick can decide if it accepts.
  30.  
  31. * A tick can trigger one or more further ticks or send a signal.
  32. And they can act on the entities context data.
  33. Practiacally synced by a read/write mutex.
  34.  
  35. * Ticks are enqueued in a TaskPool with n threads.
  36. Since multiple signals can trigger ticks at a time, you get a perfect non linear system using n threads for computation of multiple strains of discrete causality.
  37.  
  38. * Yes, load balancing by design.
  39. The challange here is to minimize the times threads spend locked, so you can use as much cputime as possible... if you have to.
  40.  
  41. * Entities building complexes are organized in spaces having a domain name.
  42.  
  43. My problem:
  44.  
  45. Signaling is the big variable in this.
  46. A signal can block and return bool(accepted) or simply send the request out async and return void.
  47.  
  48. A signal can address
  49. * one certain entity listening to that signal type inside its own space
  50. * any listening to that signal type inside own space but only one in total
  51. * all listening to that signal type inside own space
  52. * one certain entity listening in a certain space
  53. * all listening in a pattern matching space like xyz.abc.* (bad idea as blocking)
  54. * any listening in a pattern matching space like xyz.abc.* but only one in total (bad idea at all I think)
  55.  
  56. Within a space there is no problem except a fitting naming. Actually (taken from tcp/ip) unicast(blocking), anycast(blocking) and multicast(nonblocking).
  57.  
  58. Outside its more complicated. Outside could even mean on mars. So blocking seems to be a bad idea at all... or for certain cases not?
  59. I could imagine people having such complexes connected with others over the internet might raise security concerns if transport is not clearly, predictive and KISS designed.
  60. Things which should not happen should be excluded by design, but what is it what should not happen in such a system?
  61. What would be the hack?
  62.  
  63. The code https://github.com/RalphBariz/flow/tree/rework
  64. (actual dev branch, docu is outdated but basically informative)
  65.  
  66. BR
  67. Ralph
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement