User Community for HCL Informix
  • Home
  • Blogs
  • Forum
  • About
  • Contact
  • Resources
  • Events

HCL Informix Java Driver 4.10.JC8 Features

5/23/2017

8 Comments

 
Picture
                                                                                                            Updated: 8/30/18

The HCL Informix 4.10.JC8 Java driver is one of the largest updates to an HCL Informix client in years. The number of improvements is pretty impressive.  All of them around making the Java driver better, faster, easier to use.

JDBC 4.0 Standards Compliance
Application programmers rejoice! The HCL Informix Java driver has been JDBC 3.0 compliant for years.  With 4.10.JC8 and newer versions we are now 4.0 compliant!  What does that mean?  That means more API's are available, and better working API's when you program against our driver. How often would one call a method in our JDBC driver to get a runtime error that "Method not supported".  You should see less of that as we have implemented over 100 new API's and fixed many others. Want to use long values when you upload a blob object? Now you can!  You see that createBlob() API off of your Connection Interface and wonder if it would actually make one for you?  Now it will!

With so many additions, I won't list them here.  At the bottom is a link to the IIUG presentation that has many more details on the actual API's we added/fixed.

Packaging
We decided to clean house with JDBC 4.10.JC8, combining or removing pieces that are no longer needed. Part of this is the combination of ifxjdbc.jar and ifxjdbcx.jar.  We have merged the files from ifxjdbcx.jar into ifxjdbc.jar.  Now you just have 1 jar file.  We also pulled out the SQLJ code, SQLJ hasn't been a viable standard for a decade and the code has not been maintained or updated in that time.  It's still in older builds if someone still needs it.

Little Things
Our focus on ease of use spans both the large (4.0 compliance) and little things.  IfxDriver.connect no longer needs a properties object.  It's a small change, but it annoyed me to have to provide an empty object there so it might have bothered you too.

Want to know more?
The IIUG presentation of the new features for 4.10.JC8 is posted on SlideShare https://www.slideshare.net/BrianHughes70/informix-java-driver-improvements-410jc8
​
Picture
Brian Hughes
Software Engineer
HCL Informix
Connect with me on LinkedIn

Informix is a trademark of IBM Corporation in at least one jurisdiction and is used under license.
​

8 Comments
Techubi link
8/15/2017 01:29:44 pm

Java driver is the best software as it provides some good things to code

Reply
Xavier link
12/26/2017 12:54:40 pm

Brian,

We have found this driver returns 0 when reading a Clob/Blob input stream that is not null but has 0 size.

This may generate an infinite loop as a typical read is

InputStream in = blob.getBinaryStream();
while ((nRead = in.read(data)) != -1) {
// consume
}

From Java Doc
InputStream.read()

Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

We have fixed apps to prevent this infinite loop, but I think it's not correct to return 0 to signal end of stream.

Thanks in advance

Reply
Brian Hughes
1/3/2018 12:15:01 pm

You are correct we should never return 0 in this case. I reviewed the source and there are a couple cases where we can potentially return 0 (a zero byte array passed into the read(...) is a quick way to do it). I have fixed the code in the driver for the next release.

Reply
xavier link
12/26/2017 01:07:41 pm

Brian,

Testing this new driver we have found some spurious exceptions when closing a ResultSet.

java.sql.SQLException: The cursor has been previously released and is unavailable.

I'm pretty sure, Statement is not closed before calling close.
Even more, I can assure ResultSet.isClosed() returns false just before calling ResultSet.close.

Same code runs perfect using 3.7

Any idea ?

Thanks in advance.
Xavier

Reply
Brian Hughes
1/3/2018 01:26:02 pm

I don't have anything that I've encountered that would relate to this problem. Without a solid reproduction I don't have much to go on for this unfortunately. You are welcome to contact our support team to assist in tracking down a reproduction for this issue you are seeing. Sorry I can't more with this one.

Reply
xavier link
12/26/2017 01:42:19 pm

Brian,

What about an extension in JDBC to make async calls ?

Let me explain why:

I've a framework that can send a query to a grid on informix databases.

I have 100 docker informix instances, each one with 10 databases on several computers.

So I have 1000 databases.

But I can scale to 10K databases by simply increasing the number of docker instances or databases.

I have a way to manage all databases as one, deploy the same set of tables, procedures, etc from a centralized console.

Then I take data from large dataset (4 B rows) and send to the grid using a constant hash algorithm with some kind of replica factor (dynamo).

Then, I want to send a query to the grid using a connection pool where we have 1000 connections ready.

So I send 1000 querys in parallel, then get results into a local temporary table in a specific database.

A node can fail, no problem, I can give the degree of accuracy (some systems may fail, or can be down) from 0 (all down) to 1 (all nodes respond).

Simple, nice and promising .. but:

I need 1000 threads to get the 1000 databases running a query in parallel. And most of the time those threads are idle waiting I/O from a remote computer.

I can not use green threads/fibers, not even continuations as all get blocked on IO.

Obviously I can use a executor queue, but the I have remote computers doing nothing while the should be working to solve the query.

The system works perfectly, but consumes a lot of CPU
on client for nothing.

With async call I need only one thread to perform the query and a few to handle results as the are coming.

Postgress has is using rx observables.

https://github.com/alaisi/postgres-async-driver

And it's in roadmap of Java
A new non-blocking API for connecting to a
database

https://static.rainfocus.com/oracle/oow16/sess/1461693351182001EmRq/ppt/CONF1578%2020160916.pdf


Thanks in advance,

Xavier






Reply
Brian Hughes
1/3/2018 01:43:05 pm

An async driver sounds pretty neat but I'm not sure we would build one until Java has a standard API for it. We will be watching the new non-blocking API's as it matures in Java and keeping tabs on user interest in this area.


Thanks!

Reply
things to do link
6/15/2020 01:06:02 am

You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!! Go with site to find Top 10 Mediterranean food in Bastia, Corsica, France

Reply



Leave a Reply.

    Archives

    November 2019
    September 2019
    May 2019
    April 2019
    February 2019
    January 2019
    October 2018
    July 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Business
    Technical

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blogs
  • Forum
  • About
  • Contact
  • Resources
  • Events