ActorCore redis driver

Hello ๐Ÿ‘‹, when I try to use redis as a driver I always get new actor uuid for request with same tags using:
const redis = new Redis({
port: 6380,
});

export default createHandler(app, {
topology: "standalone",
drivers: {
manager: new RedisManagerDriver(redis),
actor: new RedisActorDriver(redis),
coordinate: new RedisCoordinateDriver(redis),
},
});
const redis = new Redis({
port: 6380,
});

export default createHandler(app, {
topology: "standalone",
drivers: {
manager: new RedisManagerDriver(redis),
actor: new RedisActorDriver(redis),
coordinate: new RedisCoordinateDriver(redis),
},
});
with request: http://localhost:6420/manager/actors
{"query":{"getOrCreateForTags":{"name":"chatRoom","tags":{"id":"myRoom"},"create":{"name":"chatRoom","tags":{"id":"myRoom"}}}}}
{"query":{"getOrCreateForTags":{"name":"chatRoom","tags":{"id":"myRoom"},"create":{"name":"chatRoom","tags":{"id":"myRoom"}}}}}
I get always new endpoint as response - this causes that the state is not preserved: http://localhost:6420/actors/f917eec9-a8ae-4864-9c8b-7fcf4229649c http://localhost:6420/actors/dc957550-8e35-4a04-a977-36ecd7041492 ... I have tried it also on chatroom example from create actor. Removing drivers fixes the issue. When I open the redis db I can see there are data for actors..
4 Replies
Nathan
Nathanโ€ข9mo ago
hey! iโ€™ll check this out in a couple hours oops that's a bad mistake. we're working on rolling out unit tests for all drivers, that would've caught this. thanks where are you hosting this btw? i love the redis driver since it's so flexible, but want to see where people end up using it also fyi โ€“ still working on scheduling for the redis driver. need to document where things are wip
Samko
SamkoOPโ€ข9mo ago
no worries, thanks a lot for great project ๐Ÿ™‚ I was pretty busy with other work for past weeks so now I'm getting back into... At the moment I'm running it only locally. I plan to do deployment on fly.io. Also would like to explore rivet as an option to deploy later on. I'm working on pretty experimental thing so first I need to better understand what I'm trying to achieve from our product perspective... ๐Ÿ™‚
Nathan
Nathanโ€ข9mo ago
awesome. fly.io is a great fit, we'll probably write a guide for it at some point since we don't have any official guides on self-hosting node.js. (feel free to contribute on this front) keep me posted. always looking for feedback and rough points

Did you find this page helpful?