Re: [akka-user] out-of-the-box support for json serialization for akka persistence?

2016-09-22 Thread Jan-Pieter van den Heuvel
Hi Tim,

You might also have a look at Stamina 
. Keep in mind that this only has 
support for spray-json.

Kind regards,
Jan-Pieter

Op woensdag 21 september 2016 22:02:47 UTC+2 schreef Patrik Nordwall:
>
> For Lagom I wrote json serializer that is using Jackson. You can look at 
> it for inspiration. It's stored in Cassandra as bytes, but how it's stored 
> is less important as far as I can see.
>
> /Patrik
> ons 21 sep. 2016 kl. 17:58 skrev Tim Pigden  >:
>
>> Hi Justin
>> Thanks for the comments. However, as I said I have decided that I do want 
>> to use json asa format, so I'm really looking to see who has direct 
>> experience of that. 
>> The serialization format is less orthogonal that you might expect, given 
>> that the database table layouts are all part of the plugin and as far as I 
>> can see, all use blob rather than json format with no obvious way to change 
>> that.
>> And yes the json-ness does make a difference to me. Without going into 
>> elaborate CQRS "Q" coding, it will enable the developers to find out about 
>> how the system is being used, what sort of messages are being created with 
>> what payloads, through simple sql. My increased data volumes are extremely 
>> unlikely to burden a single server db in the short to medium term.
>>
>> Tim
>>
>>
>> On Wednesday, September 21, 2016 at 2:58:27 PM UTC+1, Justin du coeur 
>> wrote:
>>
>>> A few general reactions (personally, I'm using Kryo over Cassandra, so I 
>>> can't address the direct questions):
>>>
>>> Keep in mind that json is a relatively bulky serialization format -- 
>>> it's going to take rather more disk space than more typical options like 
>>> protobuf.
>>>
>>> In *general*, the serialization format and database are pretty 
>>> orthogonal concerns.  It's possible that json might have specific 
>>> advantages when used with a json-native DB like Mongo, but AFAICT the 
>>> Cassandra driver is the most mature in general.  Are you planning on using 
>>> the json-ness in some particular way?
>>>
>>> Finally, remember that json doesn't save you from all the complications 
>>> of schema evolution: you're still going to need to think about how you deal 
>>> with missing fields, name changes, and stuff like that.  It's probably a 
>>> bit easier than Kryo, but only a bit.  Schema evolution is a real bear -- 
>>> making sure I can deal with it took most of my effort in getting 
>>> Persistence up and running...
>>>
>> On Wed, Sep 21, 2016 at 9:16 AM, Tim Pigden  wrote:
>>>
>> Hi
 Reading 

 http://doc.akka.io/docs/akka/2.4.10/scala/persistence-schema-evolution.html

 and thinking about what we currently do, I've concluded that I'd like 
 to serialize my events as json.
 The article suggests I should check the list of plugins to see which 
 specifically support json. But I can't find clear indications that any of 
 them do from the respective github pages (apologies if I've missed 
 something). Most seem to want the target database tables to be a BLOB with 
 no option of a native json type.

 My current database target is Postgres (because we use postgis for 
 mapping and because I need a proper sql database for data warehouse). 
 However, for the event serialization I could certainly contemplate 
 something else if it made the current development path quicker and easier. 
 MongoDB or Cassandra are obvious possible targets.

 So my question is: is anyone actually using json as a serialization 
 format, and if so
 a) what database and driver?
 b) is the database-native json support being used (if any?)
 c) how much effort was it? I can already serialize everthing to json 
 that needs to go in the persistence journal or snapshots.

 it's got to be something with active support/interest.

 Thanks
 tim

>>> -- 
 >> Read the docs: http://akka.io/docs/
 >> Check the FAQ: 
 http://doc.akka.io/docs/akka/current/additional/faq.html
 >> Search the archives: 
 https://groups.google.com/group/akka-user
 --- 
 You received this message because you are subscribed to the Google 
 Groups "Akka User List" group.

>>> To unsubscribe from this group and stop receiving emails from it, send 
 an email to akka-user+...@googlegroups.com.
 To post to this group, send email to akka...@googlegroups.com.
>>>
>>>
 Visit this group at https://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To 

[akka-user] ReceiveTimeout and akka.test.timefactor

2015-11-04 Thread Jan-Pieter van den Heuvel
Hi,

I'm running into a problem when performing asynchronous integration tests 
for an actor on a Jenkins build server. As suggested in the documentation 
(http://doc.akka.io/docs/akka/2.3.9/scala/testing.html#Accounting_for_Slow_Test_Systems)
 
I am using akka.test.timefactor to increase the timeouts. It seems however 
that the ReceiveTimeout that is set in the actor using 
context.setReceiveTimeout is not multiplied by this factor. Is this 
expected behaviour or might this be a bug?
I am running on Akka 2.3.9; the release notes of newer versions do not 
mention fixing an issue regarding this.

Kind regards,
Jan-Pieter

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] ReceiveTimeout and akka.test.timefactor

2015-11-04 Thread Jan-Pieter van den Heuvel
Hi Konrad,

Thanks for your answer. I thought the timefactor was applied to all 
timeouts, for example also to the timeout used for akka.pattern.ask inside 
the actor you are testing. I was using a timeout on an ask of 100ms, the 
tests on the build server failed, but using akka.test.timefactor seems to 
have solved that. Did I misunderstand?

Kind regards,
Jan-Pieter

Op woensdag 4 november 2015 16:09:05 UTC+1 schreef Konrad Malawski:
>
> Hi Jan!
> Thanks for asking,
>
> This is expected behaviour though, not a bug.
> The akka.*test.timefactor* affects only the testing utilities, like 
> expectMsg and it's friends.
>
> If you want to you can apply dilation manually, based on env variables to 
> your timeouts (in prod code).
>
> Thanks and happy hakking!
>
> -- 
> Cheers,
> Konrad 'ktoso’ Malawski
> Akka <http://akka.io> @ Typesafe <http://typesafe.com>
>
> On 4 November 2015 at 16:06:47, Jan-Pieter van den Heuvel (
> jpi...@gmail.com ) wrote:
>
> Hi,
>
> I'm running into a problem when performing asynchronous integration tests 
> for an actor on a Jenkins build server. As suggested in the documentation (
> http://doc.akka.io/docs/akka/2.3.9/scala/testing.html#Accounting_for_Slow_Test_Systems)
>  
> I am using akka.test.timefactor to increase the timeouts. It seems however 
> that the ReceiveTimeout that is set in the actor using 
> context.setReceiveTimeout is not multiplied by this factor. Is this 
> expected behaviour or might this be a bug?
> I am running on Akka 2.3.9; the release notes of newer versions do not 
> mention fixing an issue regarding this.
>
> Kind regards,
> Jan-Pieter
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+...@googlegroups.com .
> To post to this group, send email to akka...@googlegroups.com 
> .
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>>>>>>>>>  Read the docs: http://akka.io/docs/
>>>>>>>>>>  Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] ReceiveTimeout and akka.test.timefactor

2015-11-04 Thread Jan-Pieter van den Heuvel
Then it must have been magic and not this configuration parameter that made 
the tests pass :)
Thanks for your clear and fast reply!

Op woensdag 4 november 2015 16:27:32 UTC+1 schreef Konrad Malawski:
>
> As I mentioned, akka*.test.*timefactor only affects test utilities 
> (expectMsg and friends), 
> not ask nor any other Timeouts that you may have set in your application.
> Time dilation is documented in the TestKit section AFAIR, and that's where 
> it applies, not to the entirety of Akka :-)
>
>
> You can manually (or write a .dilated function) do the same in application 
> code, but it's not something we provide.
> If you really want dilation to apply to app level timeouts, you can use 
> something like:
>
> def dilated(d: FiniteDuration)(implicit system: ActorSystem): FiniteDuration =
>   (duration * 
> system.settings.config.getDouble("akka.test.timefactor")).asInstanceOf[FiniteDuration]
>
> to write `myDuration.dilated`.
>
>
> Happy hakking!
>
> -- 
> Cheers,
> Konrad 'ktoso’ Malawski
> Akka <http://akka.io> @ Typesafe <http://typesafe.com>
>
> On 4 November 2015 at 16:22:15, Jan-Pieter van den Heuvel (
> jpi...@gmail.com ) wrote:
>
> Hi Konrad,
>
> Thanks for your answer. I thought the timefactor was applied to all 
> timeouts, for example also to the timeout used for akka.pattern.ask inside 
> the actor you are testing. I was using a timeout on an ask of 100ms, the 
> tests on the build server failed, but using akka.test.timefactor seems to 
> have solved that. Did I misunderstand?
>
> Kind regards,
> Jan-Pieter
>
> Op woensdag 4 november 2015 16:09:05 UTC+1 schreef Konrad Malawski: 
>>
>> Hi Jan!
>> Thanks for asking,
>>
>> This is expected behaviour though, not a bug.
>> The akka.*test.timefactor* affects only the testing utilities, like 
>> expectMsg and it's friends.
>>
>> If you want to you can apply dilation manually, based on env variables to 
>> your timeouts (in prod code).
>>
>> Thanks and happy hakking!
>>
>> -- 
>> Cheers,
>> Konrad 'ktoso’ Malawski
>> Akka <http://akka.io> @ Typesafe <http://typesafe.com>
>>
>> On 4 November 2015 at 16:06:47, Jan-Pieter van den Heuvel (
>> jpi...@gmail.com) wrote:
>>
>> Hi,
>>
>> I'm running into a problem when performing asynchronous integration tests 
>> for an actor on a Jenkins build server. As suggested in the documentation (
>> http://doc.akka.io/docs/akka/2.3.9/scala/testing.html#Accounting_for_Slow_Test_Systems)
>>  
>> I am using akka.test.timefactor to increase the timeouts. It seems however 
>> that the ReceiveTimeout that is set in the actor using 
>> context.setReceiveTimeout is not multiplied by this factor. Is this 
>> expected behaviour or might this be a bug?
>> I am running on Akka 2.3.9; the release notes of newer versions do not 
>> mention fixing an issue regarding this.
>>
>> Kind regards,
>> Jan-Pieter
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to akka-user+...@googlegroups.com.
>> To post to this group, send email to akka...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+...@googlegroups.com .
> To post to this group, send email to akka...@googlegroups.com 
> .
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>>>>>>>>>  Read the docs: http://akka.io/docs/
>>>>>>>>>>  Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.