These are chat archives for akkadotnet/akka.net

11th
Jun 2015
Marc Piechura
@marcpiechura
Jun 11 2015 08:01
@Horusiath can you please check your sql-server snapshot plugin, in the query builder the SelectSnapshot method, I think there is a bug
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 08:02
where?
Marc Piechura
@marcpiechura
Jun 11 2015 08:02
When you check the time stamp, you append sequencenr <= to the query builder instead of the time stemp check
blob
maybe some copy paste bug ;)
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 08:05
I can't check it right now, but as I see variable maxTimeStamp probably stands there for a reason ;)
Marc Piechura
@marcpiechura
Jun 11 2015 08:06
yes the maxTimestamp is correct, I mean the resulting sqlcommand
because you add sb.Append(" AND SequenceNr <= @SequenceNr "); to the query
and then the timestemp parameter
sqlCommand.Parameters.Add(new SqlParameter("@Timestamp", SqlDbType.DateTime2) { Value = maxTimestamp });
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 08:07
yes I see now
I can fix it, when I'll go back home (I'm in work right now), but maybe you want to take a contribution? ;)
Marc Piechura
@marcpiechura
Jun 11 2015 08:14
I could try, but I'm currently working on a mongodb plugin so my fork contains all the uncompleted stuff for the plugin.
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 08:15
ok, np - I'll fix that later
Marc Piechura
@marcpiechura
Jun 11 2015 08:16
great
Marc Piechura
@marcpiechura
Jun 11 2015 09:40
I have a problem with the event journal plugin, the replayMessagesAsync method provides the max parameter, which is a long, but the method for limiting the number of documents from mongodb accepts only a integer. If max is >= int.maxvalue I use int.MaxValue otherwise the long it's cast to an integer
And I would like to know if that's fine or could cause some problems
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 09:52
only for more than 4kkk events per persistent actor :P
Marc Piechura
@marcpiechura
Jun 11 2015 09:53
hehe ok, i will add a note to the readme to be save ;)
Stuart Blackler
@sblackler
Jun 11 2015 10:41
What's the best way of inspecting an actors mailboxes size given then path to the Actor?
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 10:46
you can be sure only for local actors: ((ActorRefWithCell) actorRef).Underlying.NumberOfMessages
(ofc. actor Ref must be local and underlying actor cell must be attached)
for remote actors, you'll never be sure and it doesn't have much sense anyway (at the point when you're asking remote actor about it's mailbox size, any response will be outdated for a long time)
Stuart Blackler
@sblackler
Jun 11 2015 10:53
Yeah it's all local. Will try that, thanks :)
Marc Piechura
@marcpiechura
Jun 11 2015 11:13
if a actor is saving a snapshot for the second time and after the first snapshot the actor hasn't saved any events, has the second snapshot then the same SequenceNr like the first one?
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:22
yes, snapshot sequence nr and event journal sequence nr are by default the same value, which could be incremented only when new event is persisted
Marc Piechura
@marcpiechura
Jun 11 2015 11:22
thx, thats explains the erros ;)
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:23
but it's up to snapshot implementation to decide how to deal with snapshot save requests having the same pid and sequence numbers
I don't remember if akka test kit gives some opinionated test on that behavior
btw @Silv3rcircl3 do you use Akka.Persistence.TestKit?
Marc Piechura
@marcpiechura
Jun 11 2015 11:24
jep all tests are passing :)
I'm testing it actualy with an persistence actor that saves a snapshot for every message he receives ...
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:25
not nice
Marc Piechura
@marcpiechura
Jun 11 2015 11:26
is only for testing the plugin, but without I haven't found the issue
because mongodb throws an exception if I insert a document with the same ID (persistanceId_sequenceNr) twice
and this behaviour isn't covered by the tests
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:28
it will throw an exception, but it will be cached by SnapshotStore implementation and changed into SaveSnapshotFailure message send back to sender
Marc Piechura
@marcpiechura
Jun 11 2015 11:30
that's right but is that the correct behaviour? I would assume the store overrides the existing snapshot?
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:31
without persisting event? ;)
Marc Piechura
@marcpiechura
Jun 11 2015 11:31
jep
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:31
then you've broken your actor's consistency
Marc Piechura
@marcpiechura
Jun 11 2015 11:32
ok, I haven't used cqrs and event sourcing so I don't know what's wright or wrong in this case ^^
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 11:34
persistent actor should be able to recreate it's whole state depending solely on persisted events - snapshots are only optimization technique in case when actor's event log will grow too big
Marc Piechura
@marcpiechura
Jun 11 2015 11:37
ok, I unterstand, in this case I will let it throw :)
while it works this way with your sql plugin ;-)
Marc Piechura
@marcpiechura
Jun 11 2015 11:48
yeah, works like a charm now, thanks!
Marc Piechura
@marcpiechura
Jun 11 2015 12:30
So, I think it's done, I have created a readme, nuspec and all tests are passing. What are the next steps?
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 12:32
if it uses some custom config, it's good if it's documented too.
@Aaronontheweb @rogeralsing would you create a new repo for Akka.Persistence.MongoDb plugin?
@Silv3rcircl3 we are slowly moving custom Persistence plugins out of akka core - they mostly introduce some dependencies on external services, and we want to keep core repo clean from that
Oleg Gavrilov
@OlegGavrilov
Jun 11 2015 12:38
is there any common way of storing actor paths? right now Im forced to hardcode magic strings in all projects, to resolve actors over the network
Marc Piechura
@marcpiechura
Jun 11 2015 12:38
I copied your sql readme, so the configuration paramter a documented ;) as well as the edge cases we talked about (more then 2,147,483,647 events per persistanceID and the snpashot behaviour)
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 12:39
@OlegGavrilov what do you need it for?
Oleg Gavrilov
@OlegGavrilov
Jun 11 2015 12:50
@Horusiath i have multiple projects, where I resolve one actor from one other project, right now I have: system.ActorSelection("akka.tcp://magic-path-string-here"); in
I thought that maybe there is better way
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 12:52
you mean multiple actor systems?
Oleg Gavrilov
@OlegGavrilov
Jun 11 2015 12:53
yes, and they all need actor from one other "main" actor system
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 12:55
if all they need is a single actor (working i.e. as a discovery service), then you may write it's address in the config file
Oleg Gavrilov
@OlegGavrilov
Jun 11 2015 13:26
will try that, thanks!
By the way, is it wrong to store ActorSystem as a static field?
Roger Johansson
@rogeralsing
Jun 11 2015 13:49
depends on use case, but say in an asp.net site, its absolutely ok to do that
Oleg Gavrilov
@OlegGavrilov
Jun 11 2015 13:51
my case is console app
Roger Johansson
@rogeralsing
Jun 11 2015 13:53
it should be fine in most cases tbh. but in the case of an win service, you probably store it in an instance field of the service
tstojecki
@tstojecki
Jun 11 2015 14:22
i am trying to adapt the webcrawler sample to use within our project and i am getting this error: akka.tcp://actorsystem@127.0.0.1:16666: Error [No transport is loaded for protocol: [akka], available protocols: [akka.tcp]] [ at kka.Remote.Remoting.LocalAddressForRemote
i have moved most of the actors and the solution is set up in a similar way (webapi for a web layer and a console app for a worker) with all the config settings in web.config and app.config
any quick tips on where to look?
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 14:23
you probably didn't specify protocol for akka remote connections
how does your HOCON config file looks like?
tstojecki
@tstojecki
Jun 11 2015 14:24
looks identical what is in the sample
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 14:25
which sample?
tstojecki
@tstojecki
Jun 11 2015 14:25
it is a bit lenghty, not sure if i should paste that in
sorry, webcrawler sample from akka.net
for hocon that is
i do have lighthouse running that is reporting both web and crawler nodes joining
in the controller, i am sending CommandProcessor.Tell(new CommandProcessor.AttemptCollection(item.Id));
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 14:31
I don't know how much did you change, but statement simply says that your actor system has not configured the right value of the used transport protocol akka.remote.helios.tcp.transport-protocol
Marc Piechura
@marcpiechura
Jun 11 2015 14:32
are there any updates about the PersistanceView actor in context of the discussion on the mailing list a few month ago with greg young ? I mean for example that a PersistanceView can process events not only for one PerstistanceActor?
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 17:31
nope, right now it's bound to a single persistent actor
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 17:37
right now event broadcasting is doable by journal/snapshot store implementations and in the future possibly by upgrading persistence plugin to use reactive streams
new git history animation for akka.net :)
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 18:20
nice! :)
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 18:37
@Aaronontheweb we need to make Akka.Persistence.Sql.Common a separate nuget package. When we publish it I'll move akka persistence plugins to their dedicated repos
Roman Golenok
@shersh
Jun 11 2015 19:55
@rogeralsing , what tool did you using for present thos awesome git history? :+1:
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 20:00
I got some versioning problem, I'm writting lib using akka and I want to increment Newtonsoft.Json to use beta3 version 7.0 (current used by akka is 6). But on Serialization try I get runtime exception on akka default NewtonsoftJsonSerializer
Aaron Stannard
@Aaronontheweb
Jun 11 2015 20:18
@Horusiath I'll take care of that - just finished delivering my first Akka.Cluster training
Bartosz Sypytkowski
@Horusiath
Jun 11 2015 20:19
ok ;)
any FsCheck professionals here?
Aaron Stannard
@Aaronontheweb
Jun 11 2015 20:23
@rogeralsing I love the massive PR that @SeanKileen did when he added the Apache 2.0 license to every file - it looked like he nuked the entire project in that video :p
Natan Vivo
@nvivo
Jun 11 2015 20:52
@shersh it's done with https://code.google.com/p/gource/
Sean Gilliam
@sean-gilliam
Jun 11 2015 21:20
he nuked it from orbit. it was the only way to be sure.