Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 05 19:41

    JoeHegarty on v2.0.0a12

    Version 2.0.0a12 (compare)

  • Nov 04 22:30

    brettmorien on master

    Remove demo test app and webpag… (compare)

  • Nov 04 20:50

    JoeHegarty on master

    Client should expose shared and… (compare)

  • Nov 04 20:24

    JoeHegarty on master

    Update Orbit 1 link (compare)

  • Nov 04 19:51

    brettmorien on master

    Include grpc health check probe… (compare)

  • Nov 04 19:44

    JoeHegarty on master

    Version 2.0.0a11 Mainline to 2.0.0a12-SNAPSHOT (compare)

  • Nov 04 19:44

    JoeHegarty on v2.0.0a11

    (compare)

  • Nov 04 19:40

    JoeHegarty on master

    Intrduce actor context Merge branch 'master' of github… (compare)

  • Nov 01 23:02

    brettmorien on master

    Grpc health check interface hoo… (compare)

  • Nov 01 18:44

    JoeHegarty on master

    Allow custom construction for a… (compare)

  • Nov 01 17:48

    JoeHegarty on master

    Introduced node status Merge branch 'master' of github… (compare)

  • Nov 01 15:13

    brettmorien on master

    Introduce temporary startup del… (compare)

  • Oct 31 18:10

    brettmorien on master

    Renew addressable leases in dem… (compare)

  • Oct 30 22:28

    JoeHegarty on master

    Make etcd cleanup frequency con… Merge branch 'master' of github… (compare)

  • Oct 30 21:32

    brettmorien on master

    Change URI class representation… (compare)

  • Oct 30 20:21

    JoeHegarty on master

    Fix license detection (compare)

  • Oct 30 20:07

    JoeHegarty on master

    Update readme to show correct a… (compare)

  • Oct 30 19:55

    JoeHegarty on v2.0.0a10

    (compare)

  • Oct 30 19:55

    JoeHegarty on master

    Version 2.0.0a10 Mainline to 2.0.0a11-SNAPSHOT (compare)

  • Oct 30 18:30

    JoeHegarty on master

    etcd node directory no longer t… (compare)

Matty Southall
@matty
@JoeHegarty What approach would you take where implementing a server tick rate of something like X ticks per second to update game states / broadcast game states to users? And say this tick needs information from other actors
Or is this taking the wrong approach with the Actor model
Joe Hegarty
@JoeHegarty

Typically you'd use a timer @matty.
See https://github.com/orbit/orbit/wiki/Concepts%3A-Timers

You'd register a timer on your "world" or wherever the simulation is running, and then during that tick do whatever you need.

Matty Southall
@matty
Ok cool. What I thought.
Just trying to figure out what's best to share game state. Do I call from my other action to ask the game state "Is this move ok?" or do I ask the game state for a copy in which it risks being out of dated and allowing invalid actions
Joe Hegarty
@JoeHegarty
Depends what kind of state you are talking about,
Usually the state is owned by an authoritative actor and that should be where it lives.
Matty Southall
@matty
Like maybe the state of characters on a grid or a position
If one Actor controls the state it could become a bottleneck
I guess that's solving a problem that doesn't yet exist :)
Joe Hegarty
@JoeHegarty
Depends how big the grid is.
If it's very large you probably need to split the world into multiple actors and hand off players as they move between them (like WoW).
If it's a small grid that is like a room or something then it won't be a bottleneck.
But in general, I'd say the actor (or actors) that represent your world are ultimately responsible for the position.
For something specific to the character, like if they are performing some action, that's on them.
One key thing to remember is that actors are cheap, they aren't like threads, you can have hundreds of thousands.
So for cases like the world, you just need to split it up into small enough blocks.
For players they can own their own actions.
For interactions between players (say trading) there is nothing preventing you creating a temporary actor for that kind of thing.
Matty Southall
@matty
That makes sense. Way to describe it is Pokemon style grid based. Small grids I guess are fine but larger grids splitting it up makes sense.
Matty Southall
@matty
So having a play with Orbit one the things I find is passing a large amount of messages in a flow for initialization back and forth between Actors. e.g SessionActor > (JoinGameSession) GameSession > (InitPlayerSession) PlayerActor > (OnPlayerSessionInit) GameSession > (SetGameSession) SessionActor
Normal or bad design?
SessionActor = actor representing a session stores netty channel. GameSession = a lobby. PlayerActor = player in game session is stored in the gamesession.
Then throwing in database to retrieve data complicates it a lot more. Generally i am trying to go for "Initialize" msg which is sent then in between init a few calls / messages are passed to get data from db/cache then when done it calls "InitializeComplete" or something
Johno Crawford
@johnou
I don't see how you could store a netty channel in an actor, you might want to look into observers ¯\(ツ)/¯
Matty Southall
@matty
they are stateful but i assume unless you have clustering enabled it'd be fine?
Johno Crawford
@johnou
Well clustering is kind of the point of orbit
Joshua James
@JoshJ1091
Hey everyone. I've been playing around with orbit and just have a quick question because I couldn't find anything in the wiki. Is it possible for an Actor to be NoIdentity and StatelessWorker?
Joe Hegarty
@JoeHegarty
Yes @JoshJ1091
A NoIdentity actor does have an identity still. You just don’t need it for creating references etc.
Joshua James
@JoshJ1091
@JoeHegarty That makes sense, thanks :smile:
Joshua James
@JoshJ1091
@JoeHegarty I don't know if a pull-request for this would be useful. I've had to make a modification where you can define the ClassLoader that the DefaultCacheManager uses in JGroupsClusterPeer. The problem was that it didn't know how to serialize RemoteKey. The issue is very specific to the server software I'm using. You have the main server and it dynamically loads in plugins (separate jars) run-time using a class loader. This causes the jboss marshalling to throw a ClassNotFoundException but I can work around it by defining my own ClassLoader. Do you know of any standard fix I may have missed?
Joe Hegarty
@JoeHegarty
I don't know of a standard fix for that @JoshJ1091. It is worth noting that IntelliJ/Infinispan in general is optional though.
It is the default for legacy reasons but a lot of teams (including ourselves) use alternative providers such as the Redis one.
Artur Ciocanu
@artur_ciocanu_twitter
hello everyone, I was looking through Orbit related repos on GitHub and I have discovered: https://github.com/orbit/orbit-redis-cluster. I was wondering if anyone tried to use it in production and if there are any challenges using it
Joe Hegarty
@JoeHegarty
Hey @artur_ciocanu_twitter
Actually, that's the one we recommend using
It's the one we (authors of Orbit) at EA use for our production workloads.
So that code has been deployed in production environments where we're handling hundreds of thousands of messages a second across the cluster
Artur Ciocanu
@artur_ciocanu_twitter
awesome! thank you @JoeHegarty
Artur Ciocanu
@artur_ciocanu_twitter

has anyone tried to use Orbit in a single JVM, without JGroup and Infinispan. We are trying to migrate to Orbit, but it is a little tricky/dangerous to move to Orbit Redis Cluster from get go. We would like to ensure that everything works in "single" node mode and then add clustering.

For example we have a cluster where each node runs a JVM with Orbit, but each node is independent and we use LB and sticky sessions to route the requests. Once we prove that this works, we remove sticky sessions and enable Orbit Clustering to rely on Orbit for finding the actors in the clusters

Johno Crawford
@johnou
@artur_ciocanu_twitter sure, that's how one of our developer launchers operates (single jvm)
Jamie Mitchell
@jamiemitchellconsultants
@gorgtopalski Have you looked at Indexing in Orleans? If that is overkill then implement a btree where each node is an actor with a few hundred references (size optimised for persistance costs) with your aspect/facet/DI pattern of choice to update the btree on actor state change.
bodrin
@bodrin
Hi, I just found ea-async and then orbit and I have started playing with them.
Didn't now that we have async-await already in java. Wondering why is not popular .. seems very handy to me.
I'm trying spring webflux + orbit now. Have a bean to instantiate orbit Stage and then found that Actor.getReference is static.
Does that mean I cannot have more then one Stage instance in a JVM(classloader)?
not sure if it makes sense to have more but still wanted to ask you about that
Joe Hegarty
@JoeHegarty
You can. You can call stage.bind to change the stage.
bodrin
@bodrin
10x
bodrin
@bodrin
Is there a way to maintain some context when using await() besides passing params?
In orbit I can see TaskContext and Task are integrated and probably one can have some context there
I just wanted to pass a logging operation id all over all async calls.
Joe Hegarty
@JoeHegarty
Yes. TaskContext is the right way. If you want it to cross the network you also need to add it to stickyHeaders in stage.
So if you have an entry called requestId. You’d add “requestId” as a sticky header and orbit will send that across the network whenever it encounters it.