@pablo It would, but how? I can only access EHRServer but didn’t want to test it since it was superseded by better/faster Atomic which I cannot download.
Testing Atomic over the internet wouldn’t produce results comparable to locally run tests.
This testing began to ensure I can be confident in the performance of a CDR based on a graph database. It is not a sophisticated test
@borut.jures if you can provide a script I can run locally, I can give you the numbers on my machine, it’s not super fast but will give an indicator. I also have a big server and I might get to run your benchmark there, but it’ll be after a client finishes with their tests.
I predict lower inbound performance because of all the data transformation and validations we do, though tolerable. I’m interested on seeing the query ones since we added partial support for AQL (some queries might not run but will run eventually).
I just love that this partly turned into a performance race thread
@rubentalstra perhaps you could also try running something like https://arcadedb.com/ not only postgres under the Rust based hood so that you also can use graph based querying (or some non-JVM-based DB competitor if you don’t like JVMs)
Competition and cooperation between projects is healthy on the community/market and if you find similar good multimodel solutions in the Rust ecosystem we at Karolinska and others will of course have a look.
Perhaps some design thougts from Client Challenge could be used to combine solutions/projects too in a more modular way, but the fastest network call is the one that can be avoided so naive network based containerization lil´kely won’t be performant.
I think several actors will realize that they need to move further up the value stack now when formal specifications combined with AI make CDR construction achieavable. In the AI age a closed source implementation of the basic standards based stack is just asking for open competition
I added AQL to my CDR and included it in the tests:
CDR
Write
Read
AQL
EHRbase
9,14 ms
2741,87 μs
54,68 ms
FerroEHR
5,69 ms
2073,70 μs
timeout *
ArcEHR
13,48 ms
273,01 μs
31,66 ms
My write times increased because data is prepared for AQL queries. Most additional time is spent by the database creating and compacting indexes.
@rubentalstra * FerroEHR 4.1.1 times out on AQL: POST /query/aql failed with 408 Request Timeout: {"error":"Request Timeout","message":"the request exceeded the maximum execution time and was aborted" I see you are doing work on AQL at the moment. I’ll update your result when your changes are completed.
The most interesting AQL query statistics for production use is for stored queries (that any smart system will have pre-translated to DB-native upon storage). So perhaps you want separate tests/times listed for ad hoc and stored queries.
Regarding performance in general you might also be interested in comparing to procurement (mininmum and optional "extra evaluation point"levels) in e.g. the procurement coordinated by Karolinska (that got inspiration for the performance from a Catalonian procurement).
The AQL-to-SQL transpilation takes surprisingly little time compared to the SQL execution time. Stored queries will be faster if reading them from the database (=disk) takes less time than the AQL-to-SQL transpilation (=memory). I will test both scenarios as you suggested.
Remember I didn’t intend to turn this into full-blown benchmarking. My main goal was to avoid developing something slower than other CDRs.
It would be interesting to test the future Catalyst CDR inside Karolinska in a controlled environment. If you decide to build Catalyst on top of ArcadeDB, you should get results similar to mine and compare them with other CDRs you have access to.
I would assume that implementations also use the stored query functionality of the underlying DB they have when the openEHR stored query API is used, that was kindo of a major thought behind introducing it in Applying representational state transfer (REST) architecture to archetype-based electronic health record systems That part could be the major part of performance gain in optimizing databases as compared to sending SQL etc every time instead of just some parameters of a parametric query.
Also note that the architecture in that paper suggests possibilies for pluggable/swappable databases, so that the rest of the implementation stays when you just swap query translator and database.
It seems to me that EHRbase converts any ad-hoc AQL query into a stored query and reuses it for subsequent API calls using the same ad-hoc AQL (AqlQueryRequest.prepareNamed()). This process uses 33% when executed. If I’m correct about this, then the percentages are:
37,5% - parse and convert AQL to SQL
25% - prepare a named query
18,7% - create SQL execution plan
18,7% - execute SQL by the database
This is an unexpected result. Maybe there is something about the gossip @SevKohler
These methods in AqlQueryServiceImp.query() seem to be clear candidates for optimization: