[
https://issues.apache.org/jira/browse/ISIS-661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13886387#comment-13886387
]
ASF subversion and git services commented on ISIS-661:
------------------------------------------------------
Commit 6b014b328551c1b5c1b8451128a1e98e4692d521 in branch refs/heads/master
from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=6b014b3 ]
ISIS-661, also fixes for ISIS-660,ISIS-658,ISIS-624.
ISIS-661: BackgroundTaskService
- with JDO implementation
ISIS-660: refinements to Interaction context
- and rename Transactional to HasTransactionId
- introduce non-API for MementoServiceDefault to switch off encoding
ISIS-658: fix length for timestamp panel, show milliseconds
- and extend WicketViewerSettings, to have a timestamp setting property
ISIS-624: fix for @Digits, honour scale when *not* annotated with @Column
In addition:
- fix for wicket viewer, show @Prototype actions if associated with properties
(ie as additional links)
> BackgroundService and BackgroundTaskService as a way of creating mementos to
> execute jobs asynchronously
> --------------------------------------------------------------------------------------------------------
>
> Key: ISIS-661
> URL: https://issues.apache.org/jira/browse/ISIS-661
> Project: Isis
> Issue Type: New Feature
> Components: Core, Objectstore: JDO
> Affects Versions: objectstore-jdo-1.3.0, core-1.3.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Fix For: objectstore-jdo-1.4.0, core-1.4.0
>
>
> BackgroundService is the service that creates the mementos, with a default
> implementation in isis-core.
> usage:
> public void submitInvoices() {
> for(Customer customer: customerRepository.findCustomersToInvoice()) {
> backgroundService.execute(customer).submitInvoice();
> }
> }
>
> @javax.inject.Inject
> private BackgroundService backgroundService;
> Here the service creates a javassist proxy through which it can figure out
> the arguments. The MementoService and BookmarkService can be used to create
> the memento string (XML).
> ~~~~~~~~~~~~~
> BackgroundTaskService is the service that persists the mementos, with a
> default implementation in objectstore-jdo. Each persisted BackgroundTask
> should be associated with the transactionId of the Interaction (see ISIS-660).
> ~~~~
> also:
> - require separate "contributions" service to add in the BackgroundTask
> collection to the Interaction.
> ~~~~
> NB: the docs should indicate that an alternative implementation for
> BackgroundTaskService could be webhooks. Per Maurizio's comment:
> a web hook is basically an HTTP callback
> An example of web hook is available on the Google infrastructure, where task
> longer than 30 sec. are not allowed.
> This is similar to your idea of background service:
> public void calculateInvoices() {
> for(Customer customer: customerRepository.findCustomersToInvoice()) {
> Queue queue = QueueFactory.getDefaultQueue();
> queue.add(withUrl("/worker").param("id", customer.getId()));
> }
> }
> Tasks added to the queue will execute by calling the request handler at the
> URL /worker with the parameter id at a given task rate.
> https://developers.google.com/appengine/docs/java/taskqueue/overview-push
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)