1

我已经用 Java 实现了遗传算法,我想编写 API/服务层,以便任何开发人员都可以通过某种方式针对自己的问题运行自己的适应度函数,以扩展或将他们的代码推送到云端并调用一些 API 方法,比如 init () 和 start() 以某种异步方式运行并在任务完成时返回结果。

我正在寻找类似http://www.iron.io/worker的东西,而且很可能我会将该代码放在 Google 的 AppEngine 上。

请指导我如何实现这一目标或将我指向任何资源。

4

2 回答 2

2

You could use IronWorker for this, the steps would most likely be something like this:

  • Upload your algorithm as a worker to IronWorker
  • Built your API to allow your users to call whichever function they need
  • Your API would then queue up an IronWorker task for your genetics worker
  • You mentioned you wanted it asynchronous, so once the worker completes, it could callback to an endpoint that your user provides (webhook) with the results (or it could wait and respond synchronously, depending on how long your algorithm takes to run)

Docs on IronWorker: http://dev.iron.io/worker/

于 2014-05-13T15:43:09.930 回答
1

查看 GAE 的模块功能(以前称为后端)。

https://developers.google.com/appengine/docs/java/modules/

将它与任务队列 ( https://developers.google.com/appengine/docs/java/taskqueue/ )等其他功能结合起来,这可能符合您的要求。

于 2014-05-12T14:30:06.490 回答