These are chat archives for akkadotnet/akka.net

8th
Sep 2017
Joshua Garnett
@joshgarnett
Sep 08 2017 15:37
@alexvaluyskiy is your plan to add the dotcore support to the MySQL plugin before pushing to nuget?
Alex Valuyskiy
@alexvaluyskiy
Sep 08 2017 15:37
yes
Joshua Garnett
@joshgarnett
Sep 08 2017 15:37
Cool
Hopefully that’s not too painful
Alex Valuyskiy
@alexvaluyskiy
Sep 08 2017 15:37
but something is going wrong with Mysql.Data
System.IO.FileLoadException : Could not load file or assembly 'MySql.Data, Version=8.0.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
only in .NET 4.5 build, but it works fine with .Net Standard build
Joshua Garnett
@joshgarnett
Sep 08 2017 15:40
huh
@alexvaluyskiy I think I see the issue, they are only including a dll for 452, my guess is if you up the project version to that it’ll work
Alex Valuyskiy
@alexvaluyskiy
Sep 08 2017 15:47
mysql.data.6.10.3-rc contains a dll for net452 and for netstandard1.3
The problem is - netstandard one works fine, but net452 - not
Joshua Garnett
@joshgarnett
Sep 08 2017 15:48
hmm you are right
weird
Alex Valuyskiy
@alexvaluyskiy
Sep 08 2017 15:50
MySql.Data 6.9.9 works fine, but it does not support Net Standard
Joshua Garnett
@joshgarnett
Sep 08 2017 15:51
it supports .netstandard1.3
Akka.net is 1.6, right?
Alex Valuyskiy
@alexvaluyskiy
Sep 08 2017 15:52
MySql.Data 6.9.9 - support only net45
MySql.Data 6.10.3-rc, MySql.Data 8.0.8-dmr - support both .NET 4.5.2 and .NET Standard 1.3, but does not work
Joshua Garnett
@joshgarnett
Sep 08 2017 15:53
Interesting, so I just pulled down your changes and was able to run the tests without any problems
This is within an editor though
Nick Chamberlain
@heynickc
Sep 08 2017 19:02
@alfredherr sorry for the late response, but this PR on the dev branch of Lighthouse has a .NET Core compatible version as a separate project petabridge/lighthouse#37
Boban
@bobanco
Sep 08 2017 19:24
anyone using cluster sharding and mysql persistence with 1.3.1 version?
Joshua Garnett
@joshgarnett
Sep 08 2017 19:24
Yes
You need to be using the latest mysql persistence changes from the dev branch there, the nuget package hasn’t been updated yet
Boban
@bobanco
Sep 08 2017 19:34
@joshgarnett thanks :+1:
Boban
@bobanco
Sep 08 2017 20:30
@Horusiath i did some performance testing on cluster sharding with mysql as a persistence , the performance which i got was 312.5 entities per sec
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:31
@bobanco what and how you were testing? Mind to send a sample?
Boban
@bobanco
Sep 08 2017 20:31
my dev machine specs:
CPU: i7 4790k
RAM: 16GB
SSD: 250 GB Samsung
basicly i was trying to see the performance of how many entities we can allocate per second
and also each entity is persistent and persists its state
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:32
but entities with remember-entities=on? all entities in one shard or maybe one entity for each shard?
Boban
@bobanco
Sep 08 2017 20:32
mb this is not the true performance testing of the sharding itself
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:33
without batching, event journals are still pretty slow
Boban
@bobanco
Sep 08 2017 20:34
hm does batching helps even if each persistent entity is unique?
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:34
especially then - batching is applicable, when many persistent entities are trying to persist their events at the same time
Boban
@bobanco
Sep 08 2017 20:35
hm..how i can use batcing journal? or there is not ready one?
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:36
i've tested it on sqlite, sqlserver and postgres on various settings - using current defaults, I was getting around 400-700 events/sec (simply limits of full connection rountrips on ADO.NET), with batching journal - 8000-12000 events/sec
it's part of shared persistence sql lib, but it needs implementation per each concrete provider
Boban
@bobanco
Sep 08 2017 20:37
does postgres has implemented it?
i mean the postgres persistence implementation
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:38
there was PR (not merged) made long ago ;) It needs to be updated
AkkaNetContrib/Akka.Persistence.PostgreSql#32
this is the PR
console app for stress tests is attached
Boban
@bobanco
Sep 08 2017 20:39
will take a look
with jvm lagom framework whihc under the hood is using akka sharding and persistence i was getting troughput > 3k
same workload
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:42
lagom with cassandra?
Boban
@bobanco
Sep 08 2017 20:42
oh yes
i forgot abt the cassandra
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:42
their cassandra plugin also implements some sort of request batching
Boban
@bobanco
Sep 08 2017 20:47
any idea when postgres PR will get merged?
if i can get better troughput mb i can avoid convincing my team and also myself to use jvm for this microservice, cuz entire ecosystem is running on .net
and akka.net
i also made prototype on a top of orleans, it was even worse the mysql storage provider was falling :smile:
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 20:54
I guess mysql is not a top used storage in .net - probably most of the implementations in all libraries will end up pretty buggy
Boban
@bobanco
Sep 08 2017 20:56
i can switch to postgres or cassandra
if i can avoid this issue
sharding together with persistence will give awesome scalability, only need now to find the right persistence :)
@Horusiath SqlServer persistence has implemented this batching journal right? can i use it in 1.3.1?
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 21:01
@bobanco not yet - I'm updating a related PR right now
I hope I'll made it in time before 1.3.1 release
Boban
@bobanco
Sep 08 2017 21:03
@Horusiath thank you man
Bartosz Sypytkowski
@Horusiath
Sep 08 2017 21:04
also if it's an option for you, you may want to use redis, even just for sharding-related data
@alexvaluyskiy put some work there
Joshua Garnett
@joshgarnett
Sep 08 2017 21:06
@bobanco if it helps I’m going to be launching a game with Akka.Net + MySQL, so will likely be contributing improvements to that plugin. On a previous game we were using the JVM Akka + MySQL (Aurora to be specific) and targetting 50K/journals per second. With db sharding in place we were close to hitting that target
Boban
@bobanco
Sep 08 2017 21:11
@joshgarnett thanks for the info, are u planing to implement the batching journal or i should take the contribution on it? 50k events per second is fairly good enough for my case
Joshua Garnett
@joshgarnett
Sep 08 2017 21:11
I’m probably a month out from digging further into the changes needed, so if you need something sooner, you should give it a go
Boban
@bobanco
Sep 08 2017 21:12
yh i will work on it tonight as i need to close this prototyping by the end of this week
Joshua Garnett
@joshgarnett
Sep 08 2017 21:13
Good luck
Boban
@bobanco
Sep 08 2017 21:13
tx :smile:
@Horusiath redis persistence is updated to be used in the last version?
Boban
@bobanco
Sep 08 2017 23:32

@Horusiath i have implemented the batcing journal but it doesn't work :smile: am getting null reference exception here is log

[ERROR][08-Sep-17 23:30:19][Thread 0008][akka://system/system/akka.persistence.journal.mysql] Object reference not set to an instance of an object.
Cause: [akka://system/system/akka.persistence.journal.mysql#1985097534]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Akka.Persistence.Sql.Common.Journal.BatchingSqlJournal`2.PreStart()
   at Akka.Actor.ActorBase.AroundPreStart()
   at Akka.Actor.ActorCell.<>c__DisplayClass168_0.<Create>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

here is the repo

@Horusiath Please take a look what is missing