JNLP Java Application and Database

3

I will start developing a client / server application and in my searches I found Java JNLP. I searched in some forums but did not find the answer to this question:

Knowing that the application will have multiple clients that will work at the same time, how will simultaneous access to the database be? Do I need to manage this or does the architecture already do everything for me?

I'm still doubtful about the database. I'm thinking of using Postgres or Firebird.

Any suggestions?

    
asked by anonymous 27.08.2014 / 14:16

1 answer

2

What is JNLP

JNLP ( Java Network Launch Protocol ) is just a form of distributing a Java desktop program facilitated by a remote class loading mechanism.

In short: it's like a shortcut that downloads your program on time and runs it on the client.

Of course it's not that simple. Program jars need to be digitally signed to be loaded properly. In addition, the JNLP program runs on a sandbox , this is in a protected environment without access, for example, to local files. However, you can request access to the required resources.

What is not JNLP

JNLP is not a development architecture. What your program does and how it accesses data is unrelated to this technology.

Desktop programs commonly access data in two ways:

1. Direct connection to database

The advantage is simplicity. Simultaneous usage issues are handled via database transactions and you generally do not need to worry about pool connections and other complexities of application servers.

The disadvantage is that each workstation needs direct access to the database server via the network (intranet), which makes remote access (internet) unfeasible.

2. Data Access via Web Services

This second form is very interesting. It consists of creating a web application without graphical interface that can receive requests and returns data. It is a very robust solution if implemented with the REST architecture.

So, the desktop system loaded via JNLP (as well as any other client ) makes requests on the services available to send and receive data.

So the architecture gets decoupled and updates to business rules do not necessarily impact client versions.

In addition, this prevents clients from directly accessing the database and causing damage due to old versions of the program, just to name one of the problematic scenarios.

The biggest drawback of this architecture is that you end up with two systems to take care of.

    
27.08.2014 / 15:36