Application Architecture Tips

I am going to create a system that will have its own engine, as well as a user interface. I would like to separate these two as much as possible. The engine should be able to receive commands and data, be able to work with this data and return some result. Work for the engine can be long, and the client should be able to request the engine at any time for its current state.

The demarcation interface / back-end system is a new territory for me, and I'm not sure about the best architecture. I want the interface to be based on the web interface. It will send commands to the engine through the forms and display the engine output and current status through all ajax calls. I will most likely be using Spring based web application inside Tomcat.

My question includes a better framework for an engine component. These are the features that I am considering:

  • Deploy the engine as a set of streams and data structures in a web application. The benefits here would be a simpler implementation, and messaging between the web application interface and the engine would be simple (nothing more than some common data structures). The disadvantages would be the tight connection between the front and rear ends, the dependence on the server container for controlling the engine (for example, if the web server or web application crashed, just like the engine).

  • Deploy the back end as a standalone Java application and expose its functions through some service to the TCP port. I like this approach because it is disconnected from the web server. However, I'm not sure about the amount of low-level network / communication code required. I would prefer a higher level of messaging, which is abbreviated as Sockets, etc.

  • OSGi, Spring DM-, -, . , . OSGI -. : OSGi. , , . , , OSGi, .

, RMI - , , - , . JMS?

.

+3
3

-, , , . .

, ( , , ) - :

  • Spring 3
  • -
  • - (WAR);
  • , Ibatis ( ), JPA/Hibernate ( );
  • -. , : (JSF, Seam ..). Tapestry/Wicket , .

A Spring , . , . , Spring beans - , .

, . HTML -. Javascript. jQuery .

, , ( "" ). Google Web Toolkit ( "GWT" ), , -, ​​ JSF ( , ) Javascript, ​​ ExtJS, SmartClient, YUI .

+1

- , API - (WS- * REST).

+2

, , XML JSON .

All other cletus comments may be true for the back, but the client may be blissfully unaware of him. It could even be a .NET implementation for everything she cares. The focus is on use cases and messages, rather than back-end implementations.

It can also be useful in cases where you are using a non-HTML user interface (e.g. Flex).

+1
source

Source: https://habr.com/ru/post/1728867/


All Articles