12 March 2009

erlIDE internals: What is a backend?

The term "backend" is used often in erlIDE, but it might be unclear what it really means.

What we call a backend is an Erlang runtime that we're connected to via an internal Java node. This connection requires some erlIDE code to be installed and running on the Erlang side.

There are two kinds of backends: managed and standalone. Managed ones have their lifecycle controlled by erlIDE. Standalone ones use already started runtimes.

Inside erlIDE, backends are used for several purposes:
  • for the IDE internals: scanning, parsing, etc. This is always a managed backend.
  • for compiling code
  • for running and debugging the applications
There are several reasons for having them separated. One is to isolate functionality (especially in early erlIDE varsions, it was easy to have the IDE hang for some crash in the builder, or the other way around). Another is that one might want to run the IDE on the latest and greatest Erlang version, but compile the project for some older version, while still testing it on all newer versions available.


Anonymous said...

The weird thing is that if Erlang runtime is broken or misconfigured you can not even get to Preferences page in Eclipse, it just hangs.

Vlad said...

@timanovsky: Thanks for the info! We are only testing with a working or a non-existing runtime, didn't consider the case of an existing but non-functional one. I will add an issue on this.

Vlad said...

Fixed! Now we only try to restart a crashed runtime once. Fix will be available in the next build.

Anonymous said...

Vlad, thank you for fixing this so fast! Very good product I use in my everyday work.

Vlad said...

You're welcome. If there's anything more that isn't as it should, please let me know directly. However, there's no guarantee that the fix will come as fast as today's :-)