Java JNLP Application and Database

Asked

Viewed 283 times

3

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

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

I’m still having doubts about the database. I’m thinking about using Postgres or Firebird.

Any suggestions?

1 answer

2


What is JNLP

JNLP (Java Network Launch Protocol) is only a form of distribution of a Java desktop program facilitated by a class loading engine remotely.

In short: it’s like a shortcut that downloads your program instantly 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 programme executes in a sandbox, that is, in a protected environment without access, for example, to local archives. However, it is possible to request access to the necessary 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 the database

The advantage is simplicity. Concurrent use problems are handled via database transactions and it is usually not necessary much concern with pool connections and other application server complexities.

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

2. Access to data via Web Services

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

Then, the desktop system loaded via JNLP (like also any other client) requests for services provided to send and receive data.

So architecture is decoupled and updates to business rules don’t necessarily impact customer versions.

In addition, this prevents customers from directly accessing the database and causing havoc by using older versions of the program, just to name one of the troublesome scenarios.

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

  • 2

    Thanks for the great reply @utluiz. It was very helpful for me.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.