Help Asynchronous persistence layer

40 views
Skip to first unread message

Roger Messina

unread,
Apr 8, 2017, 3:24:04 PM4/8/17
to Play framework dev
Hi,

How to ensure that the data is persisted and in cases of error returning to the client

James Roper

unread,
Apr 9, 2017, 6:38:51 PM4/9/17
to Roger Messina, Play framework dev
Hi Roger,

Lagom's persistence layer uses asynchronous IO, but that doesn't mean that operations are done in a fire forget fashion.  All commands return a Java CompletionStage or Scala Future (depending on whether you're using Java or Scala), which you can then transform and/or recover from errors, and return that to the client.

Regards,

James

On 9 April 2017 at 05:24, Roger Messina <rogert...@gmail.com> wrote:
Hi,

How to ensure that the data is persisted and in cases of error returning to the client

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
James Roper
Software Engineer

Lightbend – Build reactive apps!
Twitter: @jroper

Roger Messina

unread,
Apr 10, 2017, 10:11:31 PM4/10/17
to Play framework dev, rogert...@gmail.com
Hi James, thanks.

You have an example code to pass me please

James Roper

unread,
Apr 10, 2017, 10:37:26 PM4/10/17
to Roger Messina, Play framework dev
Hi Roger,

Examples can be found in the Hello service that gets created when you follow the Lagom getting started guide, as well as throughout the online auction sample app, for example:


And there are also comprehensive code example in the documentation:


Regards,

James

On 11 April 2017 at 12:11, Roger Messina <rogert...@gmail.com> wrote:
Hi James, thanks.

You have an example code to pass me please

Em domingo, 9 de abril de 2017 19:38:51 UTC-3, James Roper escreveu:
Hi Roger,

Lagom's persistence layer uses asynchronous IO, but that doesn't mean that operations are done in a fire forget fashion.  All commands return a Java CompletionStage or Scala Future (depending on whether you're using Java or Scala), which you can then transform and/or recover from errors, and return that to the client.

Regards,

James
On 9 April 2017 at 05:24, Roger Messina <rogert...@gmail.com> wrote:
Hi,

How to ensure that the data is persisted and in cases of error returning to the client

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
James Roper
Software Engineer

Lightbend – Build reactive apps!
Twitter: @jroper

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roger Messina

unread,
Apr 12, 2017, 7:40:08 PM4/12/17
to Play framework dev, rogert...@gmail.com
Thanks again James



Em segunda-feira, 10 de abril de 2017 23:37:26 UTC-3, James Roper escreveu:
Hi Roger,

Examples can be found in the Hello service that gets created when you follow the Lagom getting started guide, as well as throughout the online auction sample app, for example:


And there are also comprehensive code example in the documentation:


Regards,

James
On 11 April 2017 at 12:11, Roger Messina <rogert...@gmail.com> wrote:
Hi James, thanks.

You have an example code to pass me please

Em domingo, 9 de abril de 2017 19:38:51 UTC-3, James Roper escreveu:
Hi Roger,

Lagom's persistence layer uses asynchronous IO, but that doesn't mean that operations are done in a fire forget fashion.  All commands return a Java CompletionStage or Scala Future (depending on whether you're using Java or Scala), which you can then transform and/or recover from errors, and return that to the client.

Regards,

James
On 9 April 2017 at 05:24, Roger Messina <rogert...@gmail.com> wrote:
Hi,

How to ensure that the data is persisted and in cases of error returning to the client

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
James Roper
Software Engineer

Lightbend – Build reactive apps!
Twitter: @jroper

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages