New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP cluster apis for typed #23613

Merged
merged 30 commits into from Sep 21, 2017

Conversation

Projects
None yet
4 participants
@johanandren
Member

johanandren commented Sep 8, 2017

Intended for discussions, not merge (yet)

@akka-ci akka-ci added validating tested and removed validating labels Sep 8, 2017

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Sep 8, 2017

Test PASSed.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 14, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Sep 14, 2017

Test PASSed.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 14, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Sep 14, 2017

Test PASSed.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 15, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Sep 15, 2017

Test PASSed.

@patriknw

looked at the sharding api prototype...

new ShardingEnvelope[A](entityId, null.asInstanceOf[A])
}
object TypedMessageExtractor {

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

we should probably not qualify the classes with Typed, already a separate package

@patriknw

patriknw Sep 18, 2017

Member

we should probably not qualify the classes with Typed, already a separate package

This comment has been minimized.

@johanandren

johanandren Sep 18, 2017

Member

Good point

@johanandren

johanandren Sep 18, 2017

Member

Good point

*
* @tparam A The type of message accepted by the entity actor
*/
final class DefaultMessageExtractor[A](maxNumberOfShards: Int) extends TypedMessageExtractor[ShardingEnvelope[A], A] {

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

EnvelopeMessageExtractor?

@patriknw

patriknw Sep 18, 2017

Member

EnvelopeMessageExtractor?

*
* @tparam A The type of message accepted by the entity actor
*/
abstract class DefaultNoEnvelopeMessageExtractor[A](maxNumberOfShards: Int) extends TypedMessageExtractor[A, A] {

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

HashCodeMessageExtractor ?

@patriknw

patriknw Sep 18, 2017

Member

HashCodeMessageExtractor ?

* The entity ref must be resolved locally and cannot be sent to another node.
*
* TODO what about ask, should it actually implement ActorRef to be exactly like ActorRef and callers does not have
* to know at all about it or is it good with a distinction but lookalike API?

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

as I argued in the ticket it is not an ActorRef, because it doesn't have the same kind of lifecycle and semantics as an ActorRef

we probably have to support ask, but not watch

@patriknw

patriknw Sep 18, 2017

Member

as I argued in the ticket it is not an ActorRef, because it doesn't have the same kind of lifecycle and semantics as an ActorRef

we probably have to support ask, but not watch

def spawn[A](
behavior: Behavior[A],
typeName: String,
settings: ClusterShardingSettings,

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

entityProps

@patriknw

patriknw Sep 18, 2017

Member

entityProps

typeName: String,
settings: ClusterShardingSettings,
maxNumberOfShards: Int,
handOffStopMessage: A): ActorRef[ShardingEnvelope[A]]

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

allocationStrategy, we might have some overloads with default values also

@patriknw

patriknw Sep 18, 2017

Member

allocationStrategy, we might have some overloads with default values also

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

role and dataCenter are also missing

@patriknw

patriknw Sep 18, 2017

Member

role and dataCenter are also missing

This comment has been minimized.

@johanandren

johanandren Sep 18, 2017

Member

I went for one simplest possible and one with all the bells and whistles, guess I missed a few whistles though.

Maybe fold more things into settings, or provide a builder-type and a single API entry point instead of many different overloads?

@johanandren

johanandren Sep 18, 2017

Member

I went for one simplest possible and one with all the bells and whistles, guess I missed a few whistles though.

Maybe fold more things into settings, or provide a builder-type and a single API entry point instead of many different overloads?

* Create an ActorRef-like reference to a specific sharded entity. Messages sent to it will be wrapped
* in a [[ShardingEnvelope]] and passed to the local shard region or proxy.
*/
def entityRefFor[A](entityId: String, actorRef: ActorRef[ShardingEnvelope[A]]): EntityRef[A] =

This comment has been minimized.

@patriknw

patriknw Sep 18, 2017

Member

or move it to the extension instance, and have typeName: String param instead of region: ActorRef ?

@patriknw

patriknw Sep 18, 2017

Member

or move it to the extension instance, and have typeName: String param instead of region: ActorRef ?

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 18, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Sep 18, 2017

Test PASSed.

@akka-ci akka-ci added validating and removed tested labels Sep 18, 2017

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 21, 2017

Collaborator

Test FAILed.

Collaborator

akka-ci commented Sep 21, 2017

Test FAILed.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 21, 2017

Collaborator

Test FAILed.

Collaborator

akka-ci commented Sep 21, 2017

Test FAILed.

@johanandren

This comment has been minimized.

Show comment
Hide comment
@johanandren

johanandren Sep 21, 2017

Member

Yeah, I know, my brain doesn't really work today:

result != failed

Member

johanandren commented Sep 21, 2017

Yeah, I know, my brain doesn't really work today:

result != failed

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 21, 2017

Collaborator

Test FAILed.

Collaborator

akka-ci commented Sep 21, 2017

Test FAILed.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 21, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Sep 21, 2017

Test PASSed.

@patriknw patriknw merged commit c31f6b8 into akka:master Sep 21, 2017

2 checks passed

Jenkins PR Validation Test PASSed. 14065 tests run, 519 skipped, 0 failed.
Details
typesafe-cla-validator All users have signed the CLA
Details
@patriknw

This comment has been minimized.

Show comment
Hide comment
@patriknw
Member

patriknw commented Sep 21, 2017

Refs #21226

@patriknw

This comment has been minimized.

Show comment
Hide comment
@patriknw

patriknw Sep 21, 2017

Member

@ktoso I have merged this now, it still contained the sharding stuff, so you have to solve that when rebasing your PR

Member

patriknw commented Sep 21, 2017

@ktoso I have merged this now, it still contained the sharding stuff, so you have to solve that when rebasing your PR

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Sep 21, 2017

Member

Excellent, will do :-)

Member

ktoso commented Sep 21, 2017

Excellent, will do :-)

@gmethvin gmethvin referenced this pull request Oct 11, 2017

Merged

Update Play to 2.6.6 #1034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment