Possible to use OptaPlanner from golang?

25 views
Skip to first unread message

Brett Tofel

unread,
Nov 23, 2022, 10:53:21 AM11/23/22
to OptaPlanner development
I was trying to understand how OptaPlanner might be used as a constraint solving engine for a golang-based app? Perhaps if Opta is running on the cluster you can talk to it via Kafka?

Thanks,
Brett

Lukáš Petrovický

unread,
Nov 24, 2022, 2:12:21 AM11/24/22
to optapla...@googlegroups.com
 Hey there,

no matter what technology is chosen, you'll have to build a Java wrapper around OptaPlanner that can either handle REST calls or any kind of messaging (ActiveMQ, Kafka...). Once you have that, you can integrate this service with any ecosystem you like.

We have several quickstarts showing you how to build that wrapper.

This one shows you an application that persists solutions to a database, and works with a REST API:

This one shows you an application that works off messaging:

In this particular case, we use ActiveMQ, because we need to be able to send large messages, as OptaPlanner solutions may be large. Kafka doesn't particularly like that. That said, technically there is nothing preventing you from replacing ActiveMQ with Kafka.

We also have a full cloud integration, but if you just want to run a single instance of OptaPlanner somewhere, that may be overkill for you:

To summarize: once you expose OptaPlanner via some kind of remote API, it becomes completely language agnostic. There is no avoiding Java (or Kotlin) to build that remote API or to model the OptaPlanner domain and constraints.

--
You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/optaplanner-dev/1fd30d6c-da66-46b2-8bfd-8dc3cd0464f5n%40googlegroups.com.


--

Lukáš Petrovický

OptaPlanner Project Lead

lukas.pe...@redhat.com

My work week is Monday to Thursday.
No need to respond outside of your working hours.

Brett Tofel

unread,
Nov 24, 2022, 5:39:28 AM11/24/22
to optapla...@googlegroups.com
Okay thank you for the detailed reply. Yeah it's an all golang team. I can't propose this as a solution for constraint solving unless, or until, the wrapper can done in golang or maybe an API to create the model is exposed in some way that is just accessible via an endpoint.

Thanks,
Brett

You received this message because you are subscribed to a topic in the Google Groups "OptaPlanner development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/optaplanner-dev/ATqYLHLWq0M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to optaplanner-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/optaplanner-dev/CAEs6%2BmxOzr72DSWdrqHEePm3fTDh46qy%3DZ1D6wLw8BAdMvXC4Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages