Sample Java code with Cloud Bigtable
gcloud components install bigtable
gcloud beta emulators bigtable start --host-port=0.0.0.0:8086
# In another window
export BIGTABLE_EMULATOR_HOST=localhost:8086
cbt -project "project-id" -instance "bus-instance" createtable chat_messages
cbt -project "project-id" -instance "bus-instance" createfamily chat_messages chatRoomDetails
cbt -project "project-id" -instance "bus-instance" createfamily chat_messages chatMessageDetails
cbt -project "project-id" -instance "bus-instance" read chat_messages
curl -v -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
http://localhost:8080/chatrooms \
-d '{
"id": "some-room",
"name": "some-room"
}'
curl -v http://localhost:8080/chatrooms/some-room
curl -v http://localhost:8080/messages/some-room
curl -v -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
http://localhost:8080/messages/some-room \
-d '{
"payload": "hello world"
}'