Difference between revisions of "Edge++: Rails Framework"

From Datonis
Jump to: navigation, search
(Edge++ Configuration on Rails setup:)
Line 1: Line 1:
== Factory Server: ==
+
== Factory Server ==
 
This is the main environment in which our operator screens will be developed and served to users. This by default runs on port no 3001.  
 
This is the main environment in which our operator screens will be developed and served to users. This by default runs on port no 3001.  
 +
* In order to cache master data, one needs to schedule '''master_data_cache''' function with appropriate frequency. This function by default will cache models configured in generic '''edge_master_data_config'''. One can create account level function with the same name to override '''edge_master_data_config''' that suites one's use case.
  
In order to cache master data, one needs to schedule '''master_data_cache''' function with appropriate frequency. This function by default will cache models configured in generic '''edge_master_data_config'''. One can create account level function with the same name to override '''edge_master_data_config''' that suites one's usecase.
+
* Functions and pages (generic/account level) in which edge++ flag is true on production will be recurrently cached onto this local setup. One can always develop function/page on local setup directly keeping in mind the '''name''' should be '''uniquely different''' from any function/page present on production as we recurrently sync our database with production.  
 +
* While developing functions for data processing one should update Redis keys as per use case which you can later refer in the operator screen.
 +
 
 +
== Redis ==
 +
Some well known keys that  should not be directly touched by functions in Factory server are as follows:
 +
{| class="wikitable"
 +
!Redis Key
 +
!Significance
 +
|-
 +
|__access_key__
 +
|This should be account admin access key on Datonis. It is updated automatically once Edge is configured with access key.
 +
|-
 +
|__number_of_input_queues__
 +
|Degree of parallelism for processing event stream. This is internally updated while booting.
 +
|-
 +
|__faas_functions__
 +
|Set of names of faas_functions available in local MongoDB
 +
|-
 +
|__input_queue_i__
 +
|These are input queue names by default. Lets say if you configure number of input queues in .env file to be 5, these queue names will be  __input_queue_1__ to __input_queue_5__
 +
|}

Revision as of 10:56, 12 June 2020

Factory Server

This is the main environment in which our operator screens will be developed and served to users. This by default runs on port no 3001.

  • In order to cache master data, one needs to schedule master_data_cache function with appropriate frequency. This function by default will cache models configured in generic edge_master_data_config. One can create account level function with the same name to override edge_master_data_config that suites one's use case.
  • Functions and pages (generic/account level) in which edge++ flag is true on production will be recurrently cached onto this local setup. One can always develop function/page on local setup directly keeping in mind the name should be uniquely different from any function/page present on production as we recurrently sync our database with production.
  • While developing functions for data processing one should update Redis keys as per use case which you can later refer in the operator screen.

Redis

Some well known keys that should not be directly touched by functions in Factory server are as follows:

Redis Key Significance
__access_key__ This should be account admin access key on Datonis. It is updated automatically once Edge is configured with access key.
__number_of_input_queues__ Degree of parallelism for processing event stream. This is internally updated while booting.
__faas_functions__ Set of names of faas_functions available in local MongoDB
__input_queue_i__ These are input queue names by default. Lets say if you configure number of input queues in .env file to be 5, these queue names will be __input_queue_1__ to __input_queue_5__