semiotproject / semiot-platform

SemIoT Platform
http://semiot.ru
MIT License
8 stars 1 forks source link

Manage settings availability during platform workflow #156

Closed soylent-grin closed 8 years ago

soylent-grin commented 8 years ago
soylent-grin commented 8 years ago

It seems that we do not need to store real platform hostname (e. g. demo.semiot.ru) inside of the platform - localhost is enough for inside interaction, and for API we can rewrite localhost to real hostname on Nginx or Resteasy levels. Pros:

Cons:

@KMax, @Amberdr0p WDYT?

KMax commented 8 years ago

The answer is short, we need to know the platform's hostname to generate correct URIs for devices, and etc. Therefore the hostname should be passed to device-proxy-service once and shouldn't be changed later.

soylent-grin commented 8 years ago

Do we need correct URIs for devices "and etc" only for correct API responses? Can the rest of the platform use URIs with localhost?

KMax commented 8 years ago

I don't really understand how we can't use different URIs of devices in different situations...

BTW: For each container localhost has it's own IP address.

data-archiving-service also need to know the domain name, because it generates URIs from scratch when it transforms data from Cassandra's structure back to RDF description.

KMax commented 8 years ago

Even if it'd work, I don't want to change this behaviour, since we don't have time for it.

soylent-grin commented 8 years ago

since we don't have time for it

Ok.

KMax commented 8 years ago

Do GET /config/system, if it returns the 404 then it means that the platform wasn't configured yet. But if it returns 202, then it's already configured.

Currently the response body should not be used to generate the UI.