Skip to main content

There doesn't seem to be much love for the MVSP Java toolkit here. I've put together a demo (with all source code) using MVSP Java with Angular and Tomcat - D3 Demo

The Java API is fast and easy to use IMO, and allows using D3 as though it was "just a database", just as you'd use (for example) Postgresql with JDBC, except with D3
you have an embedded programming environment which is much easier (and flexible) than writing SQL procedures or embedding Java/Javascript functions in an SQL DBMS.

It would be straightforward to create a SPA which makes REST calls to a web server using the same technique as the demo.

MVSP Java also makes it very easy to create desktop Java Swing apps with D3.

I know there's usually a lot of hate for Swing, but it's an extremely well designed UI toolkit. Oracle has committed to keep Swing an integral part of Java, so it'll be around forever, which clearly can't be said for any Javascript frameworks (Angular/React/Vue). Swing can be themed very easily e.g. FlatLaf



------------------------------
Bryan Buchanan
Manager
WebbTide Systems Pty Ltd
Morayfield QLD AU
------------------------------

There doesn't seem to be much love for the MVSP Java toolkit here. I've put together a demo (with all source code) using MVSP Java with Angular and Tomcat - D3 Demo

The Java API is fast and easy to use IMO, and allows using D3 as though it was "just a database", just as you'd use (for example) Postgresql with JDBC, except with D3
you have an embedded programming environment which is much easier (and flexible) than writing SQL procedures or embedding Java/Javascript functions in an SQL DBMS.

It would be straightforward to create a SPA which makes REST calls to a web server using the same technique as the demo.

MVSP Java also makes it very easy to create desktop Java Swing apps with D3.

I know there's usually a lot of hate for Swing, but it's an extremely well designed UI toolkit. Oracle has committed to keep Swing an integral part of Java, so it'll be around forever, which clearly can't be said for any Javascript frameworks (Angular/React/Vue). Swing can be themed very easily e.g. FlatLaf



------------------------------
Bryan Buchanan
Manager
WebbTide Systems Pty Ltd
Morayfield QLD AU
------------------------------

Bryan,

Took a look at the demo. Nice presentation of the data.

Depending on usage, the D3 licensing would potentially be a roadblock. I'll be completely up front, licensing is a real cost.

Maybe a better approach if I wanted to deliver D3 info would be to code an extract program, or an odbc, or rest api to

pull the data into a postgres or other (less licensed) db and expose that to the world.

I'm a lover of all thing IT, so I will for sure snoop at your sample code. I'm a relatively new Java coder, so it will be good to

see some techniques.

Very best,

Bret



------------------------------
Bret Stern
President
Rocket Forum Shared Account
------------------------------

Bryan,

Took a look at the demo. Nice presentation of the data.

Depending on usage, the D3 licensing would potentially be a roadblock. I'll be completely up front, licensing is a real cost.

Maybe a better approach if I wanted to deliver D3 info would be to code an extract program, or an odbc, or rest api to

pull the data into a postgres or other (less licensed) db and expose that to the world.

I'm a lover of all thing IT, so I will for sure snoop at your sample code. I'm a relatively new Java coder, so it will be good to

see some techniques.

Very best,

Bret



------------------------------
Bret Stern
President
Rocket Forum Shared Account
------------------------------

Hi Bret,

Yep, licencing is an issue with all 'non-free' databases. If most of your queries are pretty fast, you don't really need too many DBMS connections. In my sample code, I didn't put a retry (e.g. something like a Thread.sleep(1000)), which means you'd never "run out" of connections, some would just take a little longer to return a result. (I didn't do that because I was specifically wanting to check connection exhaustion).

When I've used Postgresql as the backend, the connection pooling I use normally would have 10 connections.

    DataSource getPool() {

        PoolProperties p = new PoolProperties();
        p.setUrl("jdbc:postgresql://localhost/" + ServerConstants.DBMS);
        p.setDriverClassName("org.postgresql.Driver");
        p.setUsername("XXXXXX");
        p.setPassword("XXXXX");
        p.setJmxEnabled(true);
        p.setTestWhileIdle(false);
        p.setTestOnBorrow(true);
        p.setValidationQuery("SELECT 1");
        p.setTestOnReturn(false);
        p.setValidationInterval(30000);
        p.setTimeBetweenEvictionRunsMillis(30000);
        p.setMaxActive(100);
        p.setInitialSize(10);
        p.setMaxWait(10000);
        p.setRemoveAbandonedTimeout(60);
        p.setMinEvictableIdleTimeMillis(30000);
        p.setMinIdle(10);
        p.setLogAbandoned(true);
        p.setRemoveAbandoned(true);
        p.setJdbcInterceptors("org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer");
        DataSource datasource = new DataSource();
        datasource.setPoolProperties(p);
        return datasource;
    }

I think if Enterprise Licencing worked on Linux, a 5 user licence could probably handle a reasonable load.

Bryan



------------------------------
Bryan Buchanan
Manager
WebbTide Systems Pty Ltd
Morayfield QLD AU
------------------------------