Maybe some more explanation on what I see problematic with the current 
connection cache.
>From the documentation on a first glance, it looks as if it works this way:
https://plc4x.apache.org/users/tools/connection-cache.html

However, when using it you need to create a dedicated CachedDriverManager for 
every connection string.
Which you then again ask for “getConnection” and pass in the same connection 
string.

I think the cache should simply decorate a normal connection manager and handle 
any connection url.

Chris


From: Christofer Dutz <christofer.d...@c-ware.de>
Date: Sunday, 8. January 2023 at 12:46
To: dev@plc4x.apache.org <dev@plc4x.apache.org>
Subject: Working on a new Scraper and Connection Cache
Hi all,

we currently support two variants of the Pool/Cache I guess our users are a bit 
unsure about how to use them and which to use.
I recently implemented a connection-cache for PLC4Go and having just used the 
Java version of the cache, I admittedly am not very happy with the API.
It was pretty confusing to say the least.

So, I am thinking of implementing a cache with a similar API as the PLC4Go 
version. Here you create it sort of as a decorator for the DriverManager … you 
simply ask this for “getConnection” and you get one back, just the same way you 
would with the driver-manager.

Also, I would finally like to start working on a new Scraper. The old one I was 
hoping for someone to step up and help improve it, but I’m sort of giving up on 
that idea.

Unfortunately, the cache and the scraper are sort of the core for all 
integration modules that we have and it will be even more important for my work 
on the Apache Historian.

So, my plans are to build something where you can provide sets of resources to 
read and the triggers that cause the set of resources to be read. This trigger 
can be polling an address, subscribing to an address or a timer-based thing.

Just to give you folks a heads-up on this. The final goal of this is to replace 
the old scraper and remove the connection pool and the connection cache. So 
I’ll be working on a branch till I’m finished.


Chris

Reply via email to