These are chat archives for atomix/atomix

24th
Apr 2018
Jordan Halterman
@kuujo
Apr 24 2018 01:39
There’s going to be some API breakage before the RC, but it’s for the greater good :-)
Jordan Halterman
@kuujo
Apr 24 2018 01:49

Just about done with the configuration changes, and I’m quite satisfied.

Atomix atomix = Atomix.builder()
  .withLocalMember(Member.builder(“raft1”))
  .withMembers(
    Member.builder(“raft1”)
      .withType(Member.Type.PERSISTENT)
      .withAddress(“localhost:5001”)
      .build(),
    Member.builder(“raft2”)
      .withType(Member.Type.PERSISTENT)
      .withAddress(“localhost:5002”)
      .build(),
    Member.builder(“raft3”)
      .withType(Member.Type.PERSISTENT)
      .withAddress(“localhost:5003”)
      .build())
  .withProfiles(Profiles.DISCOVERY, Profiles.CONSENSUS)
  .build();
Atomix atomix = Atomix.builder()
  .withProfiles(Profiles.DISCOVERY, Profiles.DATA_GRID)
  .build();
Atomix client = Atomix.builder()
  .withProfiles(Profiles.DISCOVERY, Profiles.CLIENT)
  .build()
ConsistentMap<String, String> map = atomix.consistentMapBuilder(“foo”)
  .withProtocol(RaftProtocol.builder()
    .withReadConsistency(Consistency.SEQUENTIAL)
    .build())
  .build()

The profiles are actually a big help. I’m not sure if I’ll implement the primitive prototypes or not since they seem a lot easier to configure. There may be no need.

I changed Node to Member for consistency with distributed systems terminology and consistency with other portions of the API (member groups)
Johno Crawford
@johnou
Apr 24 2018 09:08
what's the local member thing
just to let the jvm know which one it is?
shouldn't Profiles be singular?
Jordan Halterman
@kuujo
Apr 24 2018 09:09
It’s a typo :-)
Profile is an interface
Hmm actually I forgot interfaces can have static fields now
Johno Crawford
@johnou
Apr 24 2018 09:10
i was thinking enum
does it have an implementation?
Jordan Halterman
@kuujo
Apr 24 2018 09:10
Enum don’t work with service loaders
Johno Crawford
@johnou
Apr 24 2018 09:10
aaa
didn't know of that limitation
Jordan Halterman
@kuujo
Apr 24 2018 09:10
Profile is an interface for profiles, Profiles uses ServiceLoader to load them for configuration files
Johno Crawford
@johnou
Apr 24 2018 09:10
got it
Jordan Halterman
@kuujo
Apr 24 2018 09:11
Could move those into Profile though
Johno Crawford
@johnou
Apr 24 2018 09:11
icing on the cake
Jordan Halterman
@kuujo
Apr 24 2018 09:12
Off to bed for now. I will work on getting the changes merged tomorrow
Johno Crawford
@johnou
Apr 24 2018 09:12
are they up for review already?
Jordan Halterman
@kuujo
Apr 24 2018 09:13
No
Johno Crawford
@johnou
Apr 24 2018 09:13
i could leave feedback today before you get up
Jordan Halterman
@kuujo
Apr 24 2018 09:13
They’re a big chain of branches
Johno Crawford
@johnou
Apr 24 2018 09:13
let's sort it later then
Jordan Halterman
@kuujo
Apr 24 2018 09:13
That amount to a lot of code
Just want to get them merged and have most of the website docs up by the end of the week. Made decent progress tonight
Jordan Halterman
@kuujo
Apr 24 2018 09:19
The last branch I pushed to has all the changes in it if you’re interested
Johno Crawford
@johnou
Apr 24 2018 09:20
master?
oh that's docs
cluster-membership-events
otwinows
@otwinows
Apr 24 2018 09:26
hi, greetings for all atomix developers, I am wonder why http://atomix.io/docs/latest/user-manual/introduction/what-is-atomix/ is not working at all (empty page is only displayed with table of contents), is it temporary?
Johno Crawford
@johnou
Apr 24 2018 09:27
@otwinows because it's work in progress for the next major release
otwinows
@otwinows
Apr 24 2018 09:29
ok, great... do you know where I can find link to old documentation (previous release)?
otwinows
@otwinows
Apr 24 2018 10:40
@johnou thanks a lot, have a coding-fun
otwinows
@otwinows
Apr 24 2018 17:17

hi again, I have some crazy idea to compile latest stable release, which in my mind is 2.0.20, but I found some JUnit are failing, before going deeper, just want to ask quick question, is the build process depend on special OS type? testDelete(io.atomix.storage.buffer.MappedBufferTest) Time elapsed: 0.016 sec <<< ERROR!
java.lang.RuntimeException:
java.nio.file.FileSystemException: target\test-files\aaf146c9-4971-46a7-bde6-847ebf82463d: The process cannot access the file because it is being used by another process.

    at io.atomix.storage.buffer.MappedBufferTest.testDelete(MappedBufferTest.java:77)

Caused by: java.nio.file.FileSystemException:
target\test-files\aaf146c9-4971-46a7-bde6-847ebf82463d: The process cannot access the file because it is being used by another process.

Jordan Halterman
@kuujo
Apr 24 2018 17:20
Hmm good question. We test it on Oracle and OpenJDK. That test has existed for years and I’ve never seen it fail. No idea why it would be in use by another process
Maybe something about memory mapped files in your OS, which is. Windows?
otwinows
@otwinows
Apr 24 2018 17:21
yep Windows (but it was not my choice)
Jordan Halterman
@kuujo
Apr 24 2018 17:24
I think Windows does have problems deleting mapped files 🤔
otwinows
@otwinows
Apr 24 2018 17:27
sure, I will take care of it on my own (I will not disturb minds designated to some higher purpose than OS issues...)
Jordan Halterman
@kuujo
Apr 24 2018 17:32
We actually just need to use MappedMemory to unmap the file before it’s deleted. Just need to add it to GitHub issues
Thanks!
@kuujo unless we try clobbering it with Cleaner I doubt there is much we can do