cloudstateio / samples-java-chat

Java chat example app
Apache License 2.0
11 stars 9 forks source link

Update chat Java samples #5

Closed justinhj closed 4 years ago

justinhj commented 4 years ago

This change implements the friends and presence services for the Cloudstate chat sample using Java support. Note that I've rewritten the presence service from scratch but I noticed an implementation already existed. I've swapped it for mine since I have tested it thoroughly and added Java friendly logging, but I'd be open to merging it with the existing one.

One question that came up in implementation was whether to use an Atomic for the onChange callback; I just used an array which should work with a bit less overhead, since I believe nothing should be happening concurrently in this case?