##Overview
The aim of this document is being a proposal a set of technologies and the way to handle them in order to develop applications using rethink API.
##Participate
Under Participate as an umbrella scenario, the users of My City will be able to interact with the managers of the local government and other users. The user application supports these features:
- Participate in chat conversations
- Create group chats based on proximity
- User authentication. If the user is not logged in, authentication is required.
- A chat list and a button to create a new one is provided to the user.
- User clicks on new button and the system asks the chat name.
- A list of participants is showed and the user selects one or more to start a new group chat. Actually this list is hard coded on the application. However participant status is getting making a query to Hyperty Discovery Service.
- The chat is created.
- Participants can send messages to the group or limit these based on proximity.
- Chats shows number of participants, date, chat name and last message sended.
##Technologies involve
##Architecture
####Static View
Components
Rethink components
- Runtime: Exposes two method to app developer: requireHyperty and requireProtoStub. It is the entry point to rethink.
- Hyperties: A hyperty is a service, deployable in a runtime environment ...
- ProtoStubs: The implementation of the protocol stack ...
Application components
- Presentational components: Describe how things look (markup, styles)
- Container components: Describe how things work (data fetching, state, updates)
- Store: Holds application state
- Actions: Payloads of information that send data from your application to your store
- Reducers: Specify how application's state changes
####Dynamic View
Data Flow
- User clicks a button
- Container component receives the event and dispatches an action
- Action calls a method on hyperty and waits for the response
- After hyperty answers, action reaches the store
- Store asks reducer for specific state
- Reducer returns state
- Store notifies presentational component
##Run application
.well-known/runtime
This folder contains runtime distribution files. They are served along with the application and you need to keep them updated. This path is not definitive. The definitive path has to be agreed but we are using this one definitively.
resources/descriptors
This folder contains local descriptors used by RuntimeCatalog-Local. You need to keep them updated and encode your own hyperty into Hyperties.json descriptor.
npm install
npm start