2

For an application i need to broadcast JavaScript objects to synchronizise an array of two (or more) devices, but im not sure if it's possible, and when yes how it is possible.

Dipiks
  • 3,818
  • 2
  • 23
  • 39
mysoundsf
  • 19
  • 1

1 Answers1

2

Yes this is definitely possible, events work with objects, arrays and primitives

const client = deepstream('...')
client.event.emit('topic', { some: 'properties' })
client.event.emit('topic', [ 'an', 'array' ])
client.event.emit('topic', 'a primitive')

there's quite good documentation about it too. good luck https://deepstream.io/docs/client-js/client/

Alex Harley
  • 353
  • 1
  • 3
  • 13
  • _Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline._ – Bugs Jan 31 '17 at 10:39