This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserService { | |
private Duration askTimeout; | |
public CompletionStage<Result> create(CreateUser createUser) { | |
getUserEntityRef(createUser.userId()).ask(replyTo -> UserCommandEnvelope.of(createUser, replyTo), askTimeout); | |
} | |
public CompletionStage<Result> verify(VerifyUser verifyUser) { | |
getUserEntityRef(verifyUser.userId()).ask(replyTo -> UserCommandEnvelope.of(verifyUser, replyTo), askTimeout); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserEntity extends EventSourcedBehavior<UserCommand, UserEvent, User> { | |
@Override | |
public CommandHandler<UserCommand, UserEvent, User> commandHandler() { | |
return newCommandHandlerBuilder().forAnyState() | |
.onCommand(UserCommand.class, (user, command) -> { | |
List<UserEvent> events = user.process(command); | |
return Effect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val search = exec(goToMainPage) | |
.exec(findComputer("macbook")) | |
.exec(editComputer(6)) | |
val jumpBetweenPages = exec(goToPage(1)) | |
.exec(goToPage(2)) | |
.exec(goToPage(3)) | |
.exec(goToPage(10)) | |
val addComputer = exec(goToMainPage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val goToMainPage = http("go to main page").get("/") | |
private def findComputer(name: String) = http("find computer").get(s"/computers?f=${name}") | |
private def editComputer(id: Int) = http("edit computer").get(s"/computers/${id}") | |
private def goToPage(page: Int) = http("go to page").get(s"/computers?p=${page}") | |
private val goToCreateNewComputerPage = http("go to create new computer page").get("/computers/new") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val scn = | |
scenario("Example scenario") | |
.exec(http("go to main page").get("/")) | |
.exec(http("find computer").get("/computers?f=macbook")) | |
.exec(http("edit computer").get("/computers/6")) | |
.exec(http("go to main page").get("/")) | |
.repeat(4, "page") { | |
exec(http("go to page").get("/computers?p=${page}")) | |
} | |
.exec(http("go to create new computer page").get("/computers/new")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
persistence_id | sequence_nr | writer_uuid | |
----------------+-------------+-------------------------------------- | |
XYZ | 49489583 | dde98298-7aae-4cce-a1a7-7cea478dfb52 | |
XYZ | 49489584 | dde98298-7aae-4cce-a1a7-7cea478dfb52 | |
XYZ | 49489584 | 69572683-ddf8-43d0-b4ff-bab8ee466d24 | |
XYZ | 49489585 | dde98298-7aae-4cce-a1a7-7cea478dfb52 | |
XYZ | 49489585 | 69572683-ddf8-43d0-b4ff-bab8ee466d24 | |
XYZ | 49489586 | dde98298-7aae-4cce-a1a7-7cea478dfb52 | |
XYZ | 49489586 | 69572683-ddf8-43d0-b4ff-bab8ee466d24 | |
XYZ | 49489587 | 69572683-ddf8-43d0-b4ff-bab8ee466d24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plain text | Binary | |
---|---|---|
human-readable | deserialization required | |
precision issues | - | |
storage consumption | compressed | |
slow | fast | |
poor schema evolution support | full schema evolution support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"partition" : { | |
"key" : [ "5" ], | |
"position" : 0, | |
"deletion_info" : { "marked_deleted" : "2019-01-28T10:52:55.690805Z", "local_delete_time" : "2019-01-28T10:52:55Z" } | |
}, | |
"rows" : [ ] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cqlsh:my_keyspace> INSERT INTO orders (id, status, country) VALUES ( 5, 'added', 'PL'); | |
#flush | |
cqlsh:my_keyspace> DELETE FROM orders WHERE id = 5; | |
#flush |
NewerOlder