These are chat archives for atomix/atomix

5th
May 2018
Jordan Halterman
@kuujo
May 05 2018 01:39

I put up some basic documentation on creating custom primitives. Going to clean up the test framework and REST API next.

I haven’t figured out what’s causing the Unavailable exceptions and hanging on Travis, but it seems I can’t reproduce the issues locally any more.

Hoping the test framework will help out a bit more in that regard
Ronnie
@rroller
May 05 2018 04:08
Where do we find the latest docs? The page appear to be empty http://atomix.io/docs/latest/user-manual/primitives/DistributedLock/
(I think read way up that docs are in the works?)
Do you have an example for DistributedLock? I'm looking to use the last version. Can't find any in the unit tests
Jordan Halterman
@kuujo
May 05 2018 04:13
The only examples are on the front page of the website
Also it’s called DistributedLockTest
The tests are using the async lock. Just use lock.sync() to get a synchronous lock which is almost the exact same as a Java Lock
Ronnie
@rroller
May 05 2018 04:15
i have no idea how I missed that. Thank you very much
Jordan Halterman
@kuujo
May 05 2018 04:16
:-P
Ronnie
@rroller
May 05 2018 04:16
and by front page of website.. do you mean this one?
The tests got me on the right track, thanks again
Jordan Halterman
@kuujo
May 05 2018 04:41
Yep
There are examples for most of the primitives on the front page
buko
@buko
May 05 2018 10:06
I wonder, is anybody using atomix with jms/guaranteed messaging?
┣█萇老⌒う塟嫒鎵鏃ζ
@iminto
May 05 2018 11:45
I wannn know,where can i find a latest start demo ...the document is so rough and some links seemed miss
Ronnie
@rroller
May 05 2018 22:40
@iminto are you just looking for an example on how to start Atomix up?
This is just demo code, but should get you started
        String localPort = "50001";
        String remotePort = "50002";

        final Member local = Member.builder("host:" + localPort)
                .withType(Member.Type.PERSISTENT)
                .withAddress("localhost:" + localPort)
                .build();

        final Member member1 = Member.builder("host:" + remotePort)
                .withType(Member.Type.PERSISTENT)
                .withAddress("localhost:" + remotePort)
                .build();

        final Atomix atomix = Atomix.builder()
                .withManagementGroup((RaftPartitionGroup.builder("system")
                        .withNumPartitions(1)
                        .withMembers(local, member1)
                        .build()))
                .withPartitionGroups(RaftPartitionGroup.builder("raft")
                        .withNumPartitions(1)
                        .withMembers(local, member1)
                        .build())
                .withMembers(local, member1)
                .withLocalMember(local)
                .withClusterName("Cluster name")
                .build();

        atomix.start().join();
Ronnie
@rroller
May 05 2018 23:53
What's the best way to start atomix is "single cluster mode" for desktop/dev use?
ideally I'd like to have a cluster size of one when running on my my desktop, sort of like we can do with kafka and zookeeper