Recommendation? Engine Java API vs. Engine REST API

176 views
Skip to first unread message

Melissa Palmer

unread,
Mar 5, 2015, 5:24:56 AM3/5/15
to camunda-...@googlegroups.com
Hi

What is the best practice recommendation in terms of access History Data on an engine? 
Would this be to use the Engine Java API or Engine REST API? 

Our setup currently includes: 
- using the Camunda OOB tasklist/cockpit/admin apps. 
- custom implementation of ReadOnlyIdentity provider on a shared engine

Thanks in Advance
Melissa

thorben....@camunda.com

unread,
Mar 5, 2015, 12:37:30 PM3/5/15
to camunda-...@googlegroups.com
Hi Melissa,

the REST API is a wrapper around the Java API. Due to that design, the REST API will always slightly lag behind the Java API during development. However, we try to expose every history query that exists in the Java API also in the REST API. From the point of feature coverage, I think both are equally rich.

The Java API has one feature that we do not expose in the REST API which is native queries [1], that means queries where the application provides the SQL statement and parameters. That feature can be useful if you need a very specific query for which no API exists and that is unlikely to become API in the future.

So my recommendation would be to use the API that is more convenient for your use case. There is no general preference for one over the other.

Cheers,
Thorben

[1] http://docs.camunda.org/latest/guides/user-guide/#process-engine-process-engine-api-native-queries

Melissa Palmer

unread,
Mar 6, 2015, 12:59:20 AM3/6/15
to camunda-...@googlegroups.com
Hi Thorben, 

Thank you for the answer here. Could I be correct to say that if using the REST API performance wise I'd be
- making the rest (network) call 
- which in turn then queries the DB
where as with the Java API
- I'm only querying the DB 

Thanks
Melissa

Daniel Meyer

unread,
Mar 6, 2015, 3:04:51 AM3/6/15
to camunda-...@googlegroups.com
Hi Melissa,

it is good to consider performance. Y could
1) try to get a feeling of how many requests per second / minute... you
need to be able to handle
2) benchmark it
3) decide

Daniel


Melissa Palmer

unread,
Mar 6, 2015, 3:13:37 AM3/6/15
to camunda-...@googlegroups.com
Thanks Daniel, fair enough that is a generic answer to a performance question. I am wanting to know the difference between Camunda REST API and JavaAPI  in terms of: 

Does the REST API require 
- making the rest (network) call 
- which in turn then queries the DB
where as with the Java API
- I'm only querying the DB 

Thanks

Daniel Meyer

unread,
Mar 6, 2015, 3:28:42 AM3/6/15
to camunda-...@googlegroups.com
Hi Melissa,

yes that is correct, if you use the rest api, you need to do a Http /
network call.
If you worry aubout the performance aspect you could benchmark in order
to get some hard data ;)

Daniel

Reply all
Reply to author
Forward
0 new messages