Search code examples
javaruntimeplatform

What's the difference between an "engine" and a "runtime"?


I always think of an "engine" as something that is running, and therefore needs to be started and stopped. But I've also heard the term "runtime" ("Java Runtime Environment", etc.) and this also seems to imply that something is running...

Are these one in the same, or are they different concepts? If so, how are they different and what criteria makes something an "engine" vs a "runtime"?


Solution

  • Engine usually refers to some software component that does the real work. For instance, the database engine abstracts away from the developer all the details of how data is stored and how we search through it efficiently.

    The Java Virtual Machine (JVM) is a virtual computer that runs inside your physical computer. While the JVM certainly does a considerable amount of complicated and low level work, the term Engine usually refers to a higher level software component. We almost think of the JRE as the processor. Instead of a physical CPU running machine code, we have a virtual CPU running bytecode. Again using the database example: A number of databases are written in Java and thus run inside the Java Runtime Environment. The JRE is thus running a database engine to do the work.