Java – feedback on different back ends of GWT

I have to redesign an existing application that uses pylons (Python) on the back end and GWT. Net on the front end

Existing applications:

The existing application was developed using GWT 1.5 (now running on 2.1) and is a multi - host page setup The pylons MVC framework defines a set of controller / host pages with embedded GWT widgets ("classic websites")

The data is stored in the MySQL database and accessed by the backend using Sqlalchemy / elixir Use request Builder (JSON) to complete server / client communication

This application is not a typical business, such as an application with complex crud function (transaction, locking, etc.) or complex permission system (requiring simple ACL)

The application is used for visualization of scientific data (charts, tables) The client interface is mainly used to display data in read-only mode There may be some crud functionality, but it is not a major aspect of the application Only part of the scientific data will be transferred to the client interface, but this subset is generated from large data sets The existing backend uses numpy / SciPy to read data from db / files, create matrices and filter them The number of users accessing or using the application is relatively small, but the back-end burden per user / request is very high because it must read and filter large data sets

Requirements for the new system:

I want to move from multi - host page setup to MVP architecture (one host page) Therefore, the back end only provides a host page and acts as the data source for Ajax calls The data will still be stored in a relational database (PostgreSQL, not MySQL) There will be a simple ACL (defining who can see what data) and some crud functions (but it is not a priority) The size of the dataset will increase, so the burden on the back end may be higher There are not many concurrent requests, but there are few concurrent back - end requests that can be processed quickly The hardware (RAM and CPU) of the back - end server is not a problem

Possible back-end solutions:

Python (Sqlalchemy, pylons or Django):

Benefits:

>Rapid prototyping. > Reuse parts of existing applications > numpy / SciPy for handling large datasets

Disadvantages:

>Weakly typed languages – > debugging can be painful > server / client communication (JSON parsing or using third-party libraries). > Python Gil – > concurrent request scaling? > Server language (Python) < > client language (Java)

Java (hibernate / JPA, spring, etc.)

Benefits:

>One language for client and server (Java) > "easier" debugging. > Server / client communication (requestfactory, RPC) is easy to implement. > Performance, multithreading, etc. > requestfactory can be transferred. > Crud "easy" implementation > multitear architecture (function)

Disadvantages:

>Multitear architecture (complexity, requiring a large number of configurations) > processing arrays / matrices (it is uncertain whether there is a suspension of numpy / SciPy in Java). > Not all the features of the Java Web application layer / framework are used (overkill?)

I didn't mention any other back-end systems (ROR, etc.) because I think these two systems are the most feasible for my use case To be honest, I'm not new to Java, but I'm relatively new to the Java Web application framework I know my way in pylons, although not many pylons functions (MVC, template) will be used in the new settings, because it may only be used as Ajax backend

If I use a Java backend, I have to decide whether to execute restful services (and explicitly separate the client from the server) or use requestfactory (more rigorous coupling) "Restfulness" has no specific requirements In the case of Python backend, I might use restful backend (because I have to handle client / server communication)

Although it mainly displays scientific data (not part of any domain object graph), the relevant metadata will also be displayed on the client (which will benefit requestfactory) In the case of python, I can reuse the code used to load and filter scientific data In the case of Java, I will have to re - implement this part

Both back - end systems have their advantages and disadvantages I would appreciate any further feedback Perhaps someone has experience with backend and / or use cases

Thank you in advance

Solution

We have encountered the same difficulties in the past

We mainly decided to use Java, so we can use a single language in the whole stack Since the same person works on the client and server, working in a single language reduces the need for context switching when moving from client code to server code (for example, during debugging) Afterwards, I think we proved to be right. It was a good decision

We use RPC. As you mentioned, you can certainly simplify the implementation of C / s communication I can't say I like it a lot Rest JSON feels more correct, at least creating better decoupling between the server and the client I think you have to decide whether you want to re - implement the client or server independently in the future If this is unlikely, I will use the kiss principle, so using RPC can keep it simple in this particular case

As for the shortcomings of Java you mentioned, I tend to agree with the principle (I prefer ROR), but not the details Multi tier and configuration architecture is not a real problem. IMO - spring and Hibernate are now simple enough IMO has the advantage of using java across clients and servers in this project over the relative ease of using python, and you will introduce complexity into the interface (i.e. compared with native RPC through rest)

I can't comment on numpy / SciPy and any Java alternatives I have no experience

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>