Trace:
Differences
This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
jvx:communication:connections [2018/02/01 10:35] admin created |
jvx:communication:connections [2018/02/01 10:36] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~Title: HttpConnection vs. VMConnection vs. DirectServerConnection~~ | ~~Title: HttpConnection vs. VMConnection vs. DirectServerConnection~~ | ||
- | JVx is generally used to develop multi-tier applications, with an emphasis on databases. To facilitate data exchange between client and enterprise tier, a transport layer is required. This transport layer not only has a very abstract definition in JVx, but an implementation based on http(s) also already exists. | + | Mit JVx werden üblicherweise Multi-Tier Anwendungen entwickelt, mit dem Schwerpunkt auf Datenbanken. Um den Datenaustausch zwischen Client und Enterprise Tier zu ermöglichen, wird eine Transportschicht benötigt. Diese ist in JVx einerseits sehr abstrakt definiert und andererseits wurde bereits eine Implementierung basierend auf http(s) umgesetzt. |
- | The transport or communication layer was designed protocol-independent. It is therefore possible to use the communication classes for different protocol implementations without adaption. | + | Die Transport- bzw. Kommunikationsschicht wurde Protokoll unabhängig designed. Dadurch ist es problemlos möglich, die Kommunikationsklassen, ohne Anpassungen, für unterschiedlichste Protokoll Implementierungen wiederzuverwenden. |
- | The following is an example of protocol-independent use: | + | Nachfolgend ein Beispiel für die Protokoll unabhängige Verwendung: |
<file java> | <file java> | ||
Line 17: | Line 17: | ||
</file> | </file> | ||
- | The http protocol defines that a web or application server has to be used. This makes development more difficult, since an application server always has to be launched before the actual business logic can be tested. | + | Durch das http Protokoll wird definiert, das ein ein Web- bzw. Applikationsserver eingesetzt werden muss. Dieser Umstand erschwert natürlich die Entwicklung, da immer ein Applikationsserver gestartet werden muss bevor die eigentliche Business Logik getestet werden kann. |
- | Of course lightweight application servers are available, such as Jetty or the Eclipse WTP with integrated Tomcat support. Nonetheless relationships have to be considered and configurations have to be made. | + | Natürlich gibt es mit Jetty einen leichtgewichtigen Applikationsserver oder auch die Eclipse WTP mit integrierter Tomcat Unterstützung. Dennoch müssen Abhängigkeiten berücksichtigt und Konfigurationen durchgeführt werden. Darauf kann auch gerne verzichtet werden. |
- | This is something we would rather live without, especially the search for communication errors. The fewer components have to be considered, the easier the search will be. | + | Vor allem wenn es um die Lokalisierung von Kommunikationsfehlern geht. Je weniger Komponenten berücksichtigt werden müssen, umso besser gestaltet sich die Suche. |
- | To support the developer as much as possible, JVx includes the VMConnection and the DirectServerConnection in addition to the HttpConnection. | + | Um den Entwickler bestmöglich zu unterstützen enthält JVx neben der HttpConnection auch die VMConnection und DirectServerConnection. |
- | The VMConnection can be seen as equivalent to the HttpConnection with the only difference that the communication happens without an application server and without http protocol. The server is automatically started in the current VM and, just as with the HttpConnection is accessed via streams. The transferred objects are always serialized. | + | Die VMConnection kann als pendant zur HttpConnection gesehen werden, mit dem Unterschied |
+ | das die Kommunikation ohne Applikationsserver und one das http Protokoll auskommt. Der Server wird automatisch in der aktuellen VM gestartet und wird wie auch bei der HttpConnection über Streams angesprochen. Die zu übertragenden Objekte werden immer serialisiert. | ||
- | This type of communication makes the developer´s work much easier, but there is an even better way. | + | Für den Entwickler ist diese Art der Kommunikation schon eine enorme Vereinfachung, doch es |
+ | geht noch etwas besser. | ||
- | Both the VMConnection and the HttpConnection serialize and de-serialize the objects. However, if the server is running on the same VM as the client, serialization would not be necessary. | + | Sowohl die VMConnection als auch die HttpConnection serialisieren bzw. deserialisieren die Objekte. Wenn der Server bereits in der selben VM wie der Client läuft, könnte auf die Serialisierung doch ganz verzichtet werden. |
- | In this case the DirectServerConnection is used, which means that server functions are called directly via the server class and objects are passed on to methods directly. There is no serialization, which positively affects performance. | + | Genau für diesen Fall wird die DirectServerConnection verwendet. Damit werden Server Funktionen direkt über die Server Klasse aufgerufen und Objekte direkt an Methoden übergeben. Die Serialisierung entfällt und das wirkt sich natürlich auch positiv auf die Performance aus. |
- | <fs 20px>Note</fs> | + | <fs 20px>Hinweis</fs> |
- | At no point the developer has to take the communication protocol into account, since it is encapsulated by JVx. However, we have to be aware of the difference in operation between DirectServerConnection and VMConnection or HttpConnection, since the object serialization has to be considered during troubleshooting. | + | Der Entwickler muss zu keiner Zeit auf das Kommunikationsprotokoll Rücksicht nehmen, da dieses von JVx gekapselt wird. Er muss sich jedoch bewusst sein, daß zwischen DirectServerConnection und VMConnection bzw. HttpConnection ein Unterschied im produktiven Betrieb besteht. Denn die Objekt Serialisierung muss bei der Fehlersuche berücksichtigt werden. |
- | In addition, during a VMConnection or a DirectServerConnection, with implicitly started server, the server is stopped when the application is stopped. | + | Außerdem wird bei VMConnection und der DirectServerConnection, mit implizit gestartetem Server, der Server beim Applikationsende ebenfalls beendet. |
- | During the development process we recommend the use of the DirectServerConnection. If special serializers have to be implemented or serialization errors have to be debugged there is no way around the VMConnection. | + | Im Entwicklungsprozess empfehlen wir den Einsatz der DirectServerConnection. Wenn spezielle Serializer implementiert oder Serialisierungsfehler debugged werden sollen, führt kein Weg an der VMConnection vorbei. |
- | During productive operation, the HttpConnection or a special IConnection implementation is required. | + | Im produktiven Betrieb ist die HttpConnection oder eine spezielle IConnection Implementierung notwendig. |