joergen7 / cuneiform

Cuneiform distributed programming language
https://cuneiform-lang.org/
Apache License 2.0
232 stars 16 forks source link

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

Closed zampino closed 4 years ago

zampino commented 8 years ago

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.

joergen7 commented 8 years ago

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

zampino commented 8 years ago

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...

joergen7 commented 8 years ago

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

joergen7 commented 4 years ago

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