Hello,
I need to setup a simple client / server solution to send data to a server.
The connection is 1 way only: devices-->server. When the server receives data, the server will have to start a process, and no need to notify back the Devices. The data will be sent every 5 minutes.
The data that I need to send is simple data: Strings (Name, Email, Shipping Address ...) and number (prices, number of errors, boolean values, ...etc...). On each device, the users will create "clients" lists, and sync each client to the server:
i.e: name:john, age:35, shipping:USA ....
I would like to ask the community what would you recommend, considering that I need this:
The other best solution is Cloud KVS, but I wonder if in it's current state I could store all the data that I need to store for each client. I'm mostly wondering how would you guys structure the data?:
Store a map?
Store individual data?
Serialize the data?
The only problem that I see with cKVS, is that the data is not stored in columns, thus making it difficult to do statistics, for example:
As I haven't done -cloud- projects like this in the past (only LAN projects), I have no idea about the problems that could arise in the future. In the past I started some B4J projects with wrong libraries or not knowing some concepts from the start (i.e. not knowing about B4XSerializator), and I want to avoid making mistakes for this one. What do you think? Is there any other solution that I missed?
Thanks for your help.
jmon
I need to setup a simple client / server solution to send data to a server.
The connection is 1 way only: devices-->server. When the server receives data, the server will have to start a process, and no need to notify back the Devices. The data will be sent every 5 minutes.
The data that I need to send is simple data: Strings (Name, Email, Shipping Address ...) and number (prices, number of errors, boolean values, ...etc...). On each device, the users will create "clients" lists, and sync each client to the server:
i.e: name:john, age:35, shipping:USA ....
I would like to ask the community what would you recommend, considering that I need this:
- Close to realtime database, preferably less than 5 minutes to sync data.
- Offline / Online support, in case devices don't have internet connection, data should be synced at a later point. [edit: devices will be offline very often]
- Event notification when a new data is received
- Simple to setup (I don't want to install Mysql or other external applications)
- portable and backup-able
- statistics would be a big plus, like knowing total sales per month ...etc...
The other best solution is Cloud KVS, but I wonder if in it's current state I could store all the data that I need to store for each client. I'm mostly wondering how would you guys structure the data?:
Store a map?
B4X:
ckvs.Put("User1", "data", CreateMap("name":"john", "age":35, "shipping":"USA"))
B4X:
ckvs.Put("User1", "name", "john")
ckvs.Put("User1", "age", 35)
ckvs.Put("User1", "shipping", "USA")
B4X:
dim m as map = CreateMap("name":"john", "age":35, "shipping":"USA")
Dim ser As B4XSerializator
ckvs.Put("User1", "data", ser.ConvertObjectToBytes(m))
The only problem that I see with cKVS, is that the data is not stored in columns, thus making it difficult to do statistics, for example:
B4X:
SELECT SUM(price) GROUP by MONTH(date)
As I haven't done -cloud- projects like this in the past (only LAN projects), I have no idea about the problems that could arise in the future. In the past I started some B4J projects with wrong libraries or not knowing some concepts from the start (i.e. not knowing about B4XSerializator), and I want to avoid making mistakes for this one. What do you think? Is there any other solution that I missed?
Thanks for your help.
jmon