Ecosystem
Tài liệu về các dịch vụ trong hệ sinh thái của hệ thống gồm các dịch vụ của nhóm phát triển và các dịch vụ mã nguồn mở.
This is the multi-page printable view of this section. Click here to print.
Tài liệu về các dịch vụ trong hệ sinh thái của hệ thống gồm các dịch vụ của nhóm phát triển và các dịch vụ mã nguồn mở.
Dịch vụ lưu trữ mã hóa và quản lý định đanh người dùng
xem tại https://gitlab.com/n13t/idm/-/blob/master/DEVELOPMENT.md
Mô tả cách thức mã hóa dữ liệu người dùng
Thực hiện ngược lại các bước trên để giải mã dữ liệu
Collector Service - Dịch vụ thu thập dữ liệu
{ { < svg “content/docs/services/collector/img/overview.svg” > } } TODO: mo ta
Phương pháp này hỗ trợ người dùng nhập dữ liệu từ tin nhắn SMS
Yêu cầu
Cơ chế hoạt động
{{ < svg “content/docs/services/collector/img/sms_parser.svg” > }}

Collector Service cần có các thành phần sau khi triển để hoạt động đầy đủ chức năng:
Application Deployment Model: Stateless

Tăng số lượng node để tăng khả năng chịu tài và độ ổn định của dịch vụ
A rule of thumb is to prefix resource names with a domain that represents the organization creating the software.
<some-id><organizaion-id>:<some-id>It is wise to scope actions, resources, and subjects in order to prevent name collisions:
myorg.com:<subject-id>, myorg.com:<resource-id>, myorg.com:<action-id>myorg.com:subjects:<subject-id>, myorg.com:resources:<resource-id>, myorg.com:actions:<action-id>subjects:myorg.com:<subject-id>, resources:myorg.com:<resource-id>, actions:myorg.com:<action-id>Multi-tenant systems typically have resources which should not be access by other tenants in the system. This can be achieved by adding the tenant id to the URN:
Do: resources:myorg.com:tenants:<tenant-id>:<resource-id>
In some environments, it is common to have organizations and projects belonging to those organizations. Here, the following URN semantics can be used:
Do: resources:myorg.com:organizations:<organization-id>:projects:<project-id>:<resource-id>
Các thuộc tính dùng để phân quyền của Users
{
id: string
role: string // role của service là admin hoặc user
}
Dịch vụ Collector gồm có các loại resource sau:
{
id: string
}
{
id: string
ProjectId: string
}
{
id: string
}
{
id: string
}
{
id: string
FormId: string
}
Gồm có 3 loại chính sách:
Là các chính sách áp dụng trong Collector Service:
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = r.sub == r.obj.Owner
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = r.sub.role == reseacher
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = r.sub.role == reseacher
SMS Service có chức năng quản lý GSM Modem và cung cấp API hỗ trợ các hệ thống khác trong hệ thống thực hiện các chức năng như gửi, nhận tin nhắn SMS một cách thuận tiện nhất.
{{ < svg “content/docs/services/sms/img/component.svg” > }}
Để gửi tin nhắn các clients (là một server hay service khác, hoặc ứng dụng bất kỳ có kết nối đến SMS Service) gọi phương thức SendSms() đến SMS Service. Phần còn lại SMSS sẽ tự động thực hiện gọi SMS Gateway thông qua HTTP request để yêu cầu GSM Modem thực hiện lệnh AT gửi tin nhắn. SMS Service sẽ trả kết quả cho client khi hoàn thành việc gửi tin nhắn. Kết thúc gửi tin nhắn.
Đây là phiên bản đầu tiên của SMS Service nhằm hỗ trợ chức năng gửi và nhận tin nhắn. Phiên bản viết hoàn toàn bằng Node.js và dùng thư viện node-serialport để giao tiếp với GSM modem. Các luồng quản lý logic và sử lý hàng đợi tin nhắn được hiện thực dựa trên ý tưởng từ thư viện modem
{{ < svg “content/docs/services/sms/img/legacy.svg” > }}