On promising consequence of such compiler daemonization I have always had in mind since got familiar with the concept is that you can have convenience of separate compilation system AND speed of single step compilation at the same time, even if no stuff is actually distributed network-wise.

Dicebot, Sönke, how about a vibe.d based compiler ? :P

Compilation stages could be pipelined/distributed through localhost or distant url calls (of course it shouldn't go through the network stack in case of local calls). We could even make use of resource caching to speedup the compilation. Maybe it's a crazy idea but I see vibe.d as an excellent framework for a parallel compiler (local and distributed). Also it becomes almost trivial to distribute over a farm if you see a compilation stage as a web resource. Lexing could be streamed to a Parsing url. Semantic analysis could be done in parallel and load balanced, Linking of course... well... linking is the brutally sequential part - nothing fancy here. I'm not familiar enough with vibe.d to see if it could work, it's just an idea.

The RestFul model act as an interface and allows for thinking in terms of services (or components) and abstracts away the execution location as well as the implementation. Each url could be seen as a pure function, allowing for caching (memoizing). And with no state (restful) : distribution becomes almost free. It's a very simplistic view of a compiler and Walter will surely have myriads of objections, but I wanted to share my thoughts. This kind of infrastructure could pay on massive codebase compilation ( like at Facebook or Google )

--
Guillaume

Reply via email to