[h2] Re: Best practises for Android (trying to compile for 7, getting class file version errors)

2021-04-25 Thread Evgenij Ryazanov
Hello.

Android is far behind regular Java, some its parts, especially the JDBC API 
are still somewhere on Java 6 level, so you cannot use current H2 on this 
platform, it is not supported by H2 any more.

Android API 26 got various significant improvements for better 
compatibility with Java 7 and 8, but not in the JDBC area. Current H2 
requires at least JDBC 4.2. It was released 7 years ago with Java 8, but 
Android still doesn't support it and has many other limitations. Java 8 by 
itself is not a problem if you don't support very old devices, but various 
missing Java APIs used by non-Android libraries, including the H2, is the 
real problem of this platform.

The simplest solution there is to use some old release of H2 that works for 
you.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/05ec2b33-df92-4019-b92e-f4191aff889cn%40googlegroups.com.


[h2] Best practises for Android (trying to compile for 7, getting class file version errors)

2021-04-25 Thread ciphe...@gmail.com
Hello,

I've been using H2 version 1.4 (which I compiled with Java 6) for such a 
long time that I've almost forgotten the last time I went through this 
hassle.

It looks like the current development version of H2 (2.0.201) requires at 
least Java 8.

If I compile the .jar with OpenJDK 8 and try to integrate it into and 
Android app targeted for Android SDK 26, class file conversion fails 
however - complaining about versions.

What would you do in this situation?

- would you target your app at some newer version of Android? (I cannot go 
past 9, specific hardware is involved.)

- would you try to backport the codebase of H2 to Java 7 and compile it 
somehow? (I have done a similar thing a long time ago and it wasn't fun)

- what flavour of Java have developers traditionally used to compile 
releases? Because somehow, a release binary from 2019 (I assume it's 
1.4.200 or something) works on the required Android device...

I'd be grateful for any ideas or suggestions. :)

Jaan

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/f53d7bf2-d3b4-473d-aedc-fa2c7f19f3b7n%40googlegroups.com.


Re: [h2] using external(cloud) key-value db as backing store

2021-04-25 Thread Andreas Reichel
Hi Alex,

thank you for the explanation.

On Sat, 2021-04-24 at 11:59 -0700, Alex Ramos wrote:

> - But I don't like database servers.   
> - So my idea is to move to embedded H2 with cloud backing store and
> get rid of the database servers, while keeping SQL, JDBC,
> JdbcTemplate, and Hibernate.

This is were you lose me (pardon me,  I am a Unix dinosaur): Would you
not still need a single H2 "server" or service instance somewhere to
dispatch messages between the client and the "cloud-storage"?
Beacause you stated:

> This configuration would still retain an undesirable (to me)
> characteristic of a traditional RDBMS, mainly, that you have one node
> (running H2) that acts as a bottleneck for all data access.
> Here I have an unstated requirement: I want the ability for some
> consumers to "backdoor" and read the data in the cloud backing store
> directly through native APIs without going through H2.

Pardon my ignorance, but to me this looks like contradicting
requirements.
Either you will use "Embedded" mode not sharing, then you can use any
file (wether local or mounted on a network does not matter).
Or you will use "Shared" mode and will rely on a kind of Service
Dispatcher, which is usually the H2 SQL Server over a TCP connection.

Anyway, maybe I am just not understanding it well and  it is certainly
not on me to evangelize you. 
Good luck and cheers

Andreas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/72b9bf99fa2264d862343710e8e826b2ea405a78.camel%40manticore-projects.com.