I am developing a Clojure application that downloads images from the Internet and analyzes them according to certain criteria.
Whatever it means, the important part is that the application will have quite expensive functions that take some time until they are processed.
In the end, an API will appear that provides the application functionality to the web interface. This means that this is the second step.
Since the application has a lot in common with graphics, it makes sense to visualize the results of the functions that I write during the development process. Basically I am looking for an easy way / environment to archive this. More precisely: whenever I created a new function, I want to test its functionality inside the browser: for example. build the output, take a few intermediate steps, maybe create small interactive scripts that will help me control that the algorithms do what I intend. Note. I don’t want to convert functions to ClojureScript and run them in a browser, the browser should be just a “display”.
Some approaches that came to my mind:
Writing a small backend server that provides all the namespace features. Thus, the interface can access all these functions by simply sending an ajax request to the server, which includes the function and parameters in a string, or maybe better in edn format. The internal server receives the request, calls the requested function, and sends the result back whenever the calculation is performed. Maybe already a project that does just that?
Using a project like Gorilla Repl This will be a good option, and maybe I will use it. However, I still could not understand whether this mechanism supports a way of interactively influencing the results. Rather, it works like a worksheet with static visualizations.
, , ? .