Skip to content

Running 1.2.1 on clojars, curious if it's possible to send forms for distributed eval #9

@joinr

Description

@joinr

I know there is a 1.6 snapshot, but it's not published currently. This problem may be changed by now.

Since we can send arbitrary functions, why can't I send something like...

(partial eval '(defn say [arg] (println arg)))

?

This is serializable. It should be interpreted on the cluster instance. Basically should provide a means to patch things at runtime and distribute stuff over the cluster. As it stands, nothing seems to happen. Certainly no changes to the namespace, but no errors either. I do get errors if I send a repl-generated function, like (fn [] ...) as a Runnable, since the classloader complains. Again, this could be a function of older versions though.

In principle it seems like this should be possible, and it would add a degree of flexibility (e.g. I don't have to AOT compile everything and distribute as a dependency to ensure identical classes, etc.). I guess the other option is to have a simple function/message handler that uses ns-resolve to find the function and the like.

Just curious if I am running against architectural constraints or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions