Comments (3)
I would argue this does not depend on your scripting runtime (#5).
I envision a more likely scenario being a developer/team has an authoritative environment they are comfortable in and they need to handle some orchestration from it. Basically a way of allowing things to be server/admin API controlled. For things like login/registration allow for a configured secret server/admin key. For anything that is handled through a real-time client connection you could allow for superuser/ admin client connections which can act as though they are any user. Updating data, creating group, games, etc...
Forgive me if this seems silly, have only really been diving into APIs and still need time to actually experiment and test out Nakama to fully understand what is there.
from nakama.
There is also a requirement for some games (e.g. Poker) where a user cannot be logged in multiple times. #132
from nakama.
This can be achieved with simple server runtime code now. For example:
// Place code inside InitModule
messageIDs := []string{"ChannelJoin", "ChannelLeave", "ChannelMessageSend", "ChannelMessageUpdate", "ChannelMessageRemove", "MatchCreate", "MatchmakerAdd", "MatchmakerRemove", "StatusFollow", "StatusUnfollow", "StatusUpdate"}
rtBeforeDisableMessage := func(ctx context.Context, logger *log.Logger, db *sql.DB, nk runtime.NakamaModule, envelope *rtapi.Envelope) (*rtapi.Envelope, error) {
return nil, errors.New("disallowed")
}
for _, id := range messageIDs {
if err := initializer.RegisterBeforeRt(id, rtBeforeDisableMessage); err != nil {
return err
}
}
That code example will disable most realtime messages in the socket pipeline. There's equivalent functions to disable features in the API although these are easier to disable with a load balancer in front of the game server as normal.
The equivalent in Lua can be achieved with:
local nk = require("nakama")
local message_ids = {"ChannelJoin", "ChannelLeave", "ChannelMessageSend", "ChannelMessageUpdate", "ChannelMessageRemove", "MatchCreate", "MatchmakerAdd", "MatchmakerRemove", "StatusFollow", "StatusUnfollow", "StatusUpdate"}
local function disable_rt_message(context, payload)
error("disallowed")
end
for _, message_id in ipairs(message_ids) do
nk.register_rt_before(disable_rt_message, message_id)
end
It's also possible to disable a user from concurrent play sessions with our streams API. 🏆
from nakama.
Related Issues (20)
- Bad URL in docs. https://github.com/heroiclabs/nakama/blob/master/sample_go_module/README.md HOT 2
- [Bug] IAP Bug GoError: ON CONFLICT DO UPDATE command cannot affect row a second time HOT 2
- UnlinkApple unlinks successfully even though it is the last link. HOT 3
- [Feature Request] Official Goland Debugging Support PLEASE ! HOT 2
- ast.Property is *ast.PropertyShort, not *ast.PropertyKeye HOT 4
- [FEATURE REQUEST] Role based access control (RBAC) HOT 1
- Nakama DX using Docker HOT 3
- Request to Add “Friend Metadata” HOT 1
- Server keeps terminating on heavy load HOT 7
- Why is Typescript compilerOptions target es5 ? HOT 3
- How to properly manage Memory? Leaking Memory.... HOT 3
- Extend api.ChannelMessage HOT 3
- Nakama Client SDKs should append port after host name instead of after full host path HOT 1
- Nakama ARM build should be published with the same docker version tag HOT 5
- error log content is confused HOT 1
- Nakama MP service - with respect to Paradox Interactive Accounts HOT 3
- 3.22 lua bug HOT 2
- Lua Runtime Match_Loop messages never populated HOT 4
- plugin was built with a different version of package github.com/heroiclabs/nakama-common/api HOT 4
- Unauthenticated REST response contains invalid `WWW-Authenticate` header HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nakama.