Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 14 10:16

    mofirouz on master

    Set new development version. (compare)

  • Oct 14 10:15

    mofirouz on v2.0.2

    (compare)

  • Oct 14 10:15

    mofirouz on master

    Nakama-Java 2.0.2 release. (compare)

  • Oct 14 09:46
    mofirouz closed #26
  • Oct 14 09:46

    mofirouz on mhf-update-270

    (compare)

  • Oct 14 09:45

    mofirouz on master

    Add support for changes in Naka… (compare)

  • Oct 14 09:09
    mofirouz synchronize #26
  • Oct 14 09:09

    mofirouz on mhf-update-270

    Add NonNull annotations. (compare)

  • Oct 14 03:52
  • Oct 13 21:28
    m3doune opened #27
  • Oct 13 19:16
    Hakuoro starred heroiclabs/nakama
  • Oct 13 10:19
  • Oct 12 10:11
    anadin starred heroiclabs/nakama
  • Oct 12 02:28
    snickliu starred heroiclabs/nakama
  • Oct 11 23:54
    mofirouz opened #26
  • Oct 11 23:54
    mofirouz review_requested #26
  • Oct 11 23:54

    mofirouz on mhf-update-270

    Update rtapi to 2.7.0 (compare)

  • Oct 11 23:32

    mofirouz on mhf-update-270

    Initial client update to suppor… (compare)

  • Oct 11 23:00
    vkartaviy starred heroiclabs/nakama
  • Oct 11 20:22

    zyro on master

    Add support for custom events f… (compare)

Mo Firouz
@mofirouz

Hi - please use the forum to ask questions:

https://forum.heroiclabs.com

Andrei Apanasik
@Suvitruf
Hello there. What initialization vector are you using for aes128_encrypt?
Andrei Apanasik
@Suvitruf
I need to decrypt it on nodejs side.
Andrei Apanasik
@Suvitruf
Oh, boi. Got it.
First 16 bytes are iv.
Also, you are using aes-128-cfb, not aes-128-cbc.
Mohsen
@mohsenyz
@novabyte Thanks, I agree with you, It will cause performance issue
Mohsen
@mohsenyz
A question, is context canceled after updating user account in rpc code?
Chris Molozian
@novabyte
@mohsenyz I don’t fully understand your question but I’ll explain the “context cancelled” responses in RPC calls
The server has a way to stop any active work created at the start of an RPC request if the client that initiated it has gone
I.e. The client got disconnected mid request, etc
In that case any work in progress (database request, other http requests triggered at the start, etc, etc) will be cancelled because the context for the operation is gone
This is a fantastic optimisation we’ve implemented because it stops the server from work which doesn’t need to be done anymore as there’s no client to send the response back to
Hope that makes things clearer
Jumbo
@JumpWu
Hi @mofirouz I learn to use nakama as a game server , it 's a good framework as a single server, but when i want to make it distributed , I can't find any docs how to deploy it .

I find Start/join cluster¶
Nakama Enterprise Only

The following commands are used with Nakama Enterprise. The enterprise version offers multi-server scale out for realtime chat, multiplayer, presence events, notifications, streams, and session management. You can start a cluster locally on your development machine with an enterprise license. The Managed Cloud service we offer already runs our enterprise version.

The cluster function is only at Nakama Enterprise Only, but could give us a way to implement our owner cluster nodes.\
Mo Firouz
@mofirouz
Hi @JumpWu - do you have the Nakama Enterprise binaries?
Jumbo
@JumpWu
None
I find nakama at github then read docs from nakama offical website.
Chris Molozian
@novabyte
@JumpWu It's available on the Managed Cloud :thumbsup:
doguh
@doguh
Hi there, I'm having trouble leaving a match joined via matchmaker
I tried this.socket.send({ match_leave: { match_id: this.match.id } }); but the server does not execute match_leave hook
Chris Molozian
@novabyte
@doguh Are you using the authoritative multiplayer engine or client-relayed with the server?
doguh
@doguh
authoritative
ok my bad...
I was using match.id instead of match.match_id sorry
Chris Molozian
@novabyte
No worries. :thumbsup:
Jumbo
@JumpWu
@novabyte Managed Cloud have a trial version before to buy?
And some logic can use lua, when server is running,can we hot update lua file do not restart server.
Mo Firouz
@mofirouz
@JumpWu there is no trial as Nakama is open source and there is no API difference between open source and Enterprise
Also Lua code is not hot reloadable and requires a server restart
Chris Molozian
@novabyte
@JumpWu The Managed Cloud does have integration with GitHub as a source control system
You can enable auto-sync as well if you want to have code pushes made to a specific branch synced to the live servers (with a fast rolling reboot)
Zeke Foppa
@bfops
do I have to worry about multithreading at all if I'm writing nakama lua modules? Is it possible for e.g. one RPC to run while another one is in the middle of its own block of code?
Chris Molozian
@novabyte
@bfops Yes it’s possible to have concurrent RPC functions run over the same dataset. This includes interact with the same user records. But the way the server APIs work it protects data access through transactions
What sort of multi threaded code do you have you plan to write?
Zeke Foppa
@bfops
Hey Chris! Thanks for the quick reply :). I'm actually just debugging some of my lua code and I'm trying to rule out race conditions. Is this the kind of the thing where I might be cutting myself on sharp edges if I don't know anything about it?
none of our code was written to be multithreaded and it assumes that e.g. RPCs don't interrupt each other to run
Chris Molozian
@novabyte
@bfops I think it’s hugely unlikely for you to have this kind of racey code
Zeke Foppa
@bfops
mkay great, so RPCs etc. all grab some global lock by default?
Chris Molozian
@novabyte
Is there a particular interaction sequence between client and server you thin is problematic?
No we don’t implement any global locks, that would be extremely slow for the scale of games which use our tech
Zeke Foppa
@bfops
yes, one of our RPCs is doing an existence check in DB followed by an insertion and it's complaining about duplicate entries in that DB. There's a lot of code in between and it could totally be something else.
Chris Molozian
@novabyte
What we do is have a pool of Lua VMs which are checked out from when an RPC function is run and then checked back into the pool afterwards
This limits memory usage and creates back pressure in the system to prevent clients overloading the server(s)
Zeke Foppa
@bfops
do those VMs share DB access or are they doing some kind of rollback/merge thing?
Chris Molozian
@novabyte
You can of course adjust the pool size and the min/max VMs retained between RPC calls. Those VMs always have their state wiped before another RPC function can use them
@bfops do you have custom DB tables? What sort of existence check do you run?
Zeke Foppa
@bfops
we do have custom tables! but does that mean that even for nk.storage_read and nk.storage_write there's race conditions for e.g. an RPC that does read, increment, then write?