This section introduces you to E programming concepts. For more information, refer to the E Programmer's Manual.
E is a set of extensions to Java designed for writing distributed applications. It enhances your Java code by offering security and communications extensions.
E is designed for programmers writing network applications, such as groupware, publishing systems, games and multimedia.
E enhances and improves your Java code in the following areas:
- Optimistic programming
These features mean that you will not have to work as hard to maintain security and communication when designing networked applications. E does it for you.
This tutorial introduces you to these concepts while you learn E.
Java's security model is based on an "all-or-nothing" approach: it assumes that all code that originated on the local hard disk is trusted, and all code that originated from the network is not trusted. This model can be very secure, but it does have loopholes. For example, since local code is "trustworthy", it is given access to resources that it may not need. This can increase the chances of viruses and trojan horses infecting your machine. Also, Java does not allow you to assign access selectively, on an as-needed basis.
E closes many of these security holes by letting you selectively assign privileges. "Trustedness" is granted in as much or as little detail as you choose. For example, you could deny your application the ability to write anywhere in the file system, but allow it to add a limited number of records to a database. Since you assign these privileges directly in the application, they are preserved regardless of where the application originates-whether on the network or on your local drive.
By creating a trusted object that implements limited capabilities, and giving an untrusted object the ability to send messages to this new object, you can obtain more functionality from the untrusted code without compromising security. You also do not have to rely on third-party security mechanisms to assign privileges for your application.
E features a built-in model for remote object communications. It lets you automatically establish connections between objects without having to deal directly with the underlying network protocols. This lets machines talk directly, with messages directed only to specific objects.
Other languages can require a lot of effort to establish remote communications. For example, Java requires many sockets to be built just to establish a pipe between two machines, and the result is not as secure. In contrast, E lets you do this easily with just a few keywords.
All distributed systems experience the problems of deadlock and race conditions. E resolves this by letting your program send a message and still continue execution in other code blocks, letting that message's associated code block execute later when a reply is received. This functionality forms the basis for E's model of optimistic computation.