joergen7 / cuneiform

Cuneiform distributed programming language

Home Page:https://cuneiform-lang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow the specific :cf_cre "platform" behaviour to access the full gen_server state

zampino opened this issue · comments

in the easiest form :cf_cre delegates a final (catch-all) handle_info to the implemented behaviour:

in a read only fashion something like:

-- cf_cre.erl

handle_info(request, {Mod, rest_of_state}) ->
  apply(Mod, :info, [rest_of_state]),  
  {no_reply, State}

we could consider also the ability to write back to the state,
with a handle_call but that could imply extra undesired blocking of the process...

use case: allow third party cuneiform interpreters to introspect the current state of the runtime:
e.g. the future cache as well as the map of the computed replies.

I seem to have missed that issue. Sry, I reply just now. You are right, of course. Do you need that feature?

maybe let's keep this issue open, I'll come with more concrete use cases at some point.

With some past commits of yours we can already access (read) the reply-map and the runtime cache.

This issue would be about a more generic way to access the runtime state
and possibly even modify it...

sure, just tell me when you need it. otherwise, I'd rather keep it simple.

I understand what this issue is about. However, my guess is, no one actually needs that anymore.