Zaid Abdulla
6a9c62b639
Support time discretization in scripts
...
This can be used to ensure parameter refresh times are aligned (as
opposed to using Date.now() - X). It also allows for possible future
optimizations by exploiting the fact that the value of Date.now(X)
remains static for a given amount of time.
The variance value can be used to shift the discretization threshold
points based on the hash of the device ID for load distribution.
The djb2 hashing algorithm has been replaced with MD5 for better
distribution.
2017-11-10 14:34:24 -08:00
Zaid Abdulla
14bf276112
Clamp param timestamp values to session timestamp
2017-11-04 22:02:22 -07:00
Zaid Abdulla
93452d445f
Fix bug updating tags not triggering preset rerun
2017-11-04 20:47:55 -07:00
Zaid Abdulla
a436f17888
Replace endless_cycle with more specific faults
2017-10-31 12:58:00 -07:00
Zaid Abdulla
b152071085
Fix exception when logging invalid session
...
Resolves #269
2017-10-23 17:09:37 -07:00
Zaid Abdulla
9dcd55a84f
Log XML parse errors
2017-10-09 00:28:02 -07:00
Zaid Abdulla
342138d92e
Log session timeout and connection drop
2017-10-09 00:25:32 -07:00
Zaid Abdulla
ef712de9e3
Fix concurrent requests counter leak
2017-09-18 13:51:22 -07:00
Zaid Abdulla
b2c5f5ecc9
Handle overload spikes gracefully
2017-09-16 22:43:17 -07:00
Zaid Abdulla
73295729c8
Fix exception when TCP connection drops abruptly
2017-09-16 22:35:46 -07:00
Zaid Abdulla
3012f29bb2
Remove redundant delete operator
2017-07-30 04:51:20 -07:00
Zaid Abdulla
ae4526defe
Fix expired tasks not getting deleted
2017-06-20 13:54:42 -07:00
Zaid Abdulla
330c6fc720
Encode download file name with encodeURI
2017-06-01 16:53:09 -07:00
Zaid Abdulla
b38b3cf5ab
Default to using Mongo for caching
...
Stress testing shows that after the recent caching optimization there
seems to be no significant difference in performance when using Mongo
for caching as opposed to Redis. Redis is still supported but is now
optional.
Also removed hiredis dependency since as of node_redis 2.6 the default
parser is faster than hiredis.
2017-06-01 16:34:42 -07:00
Zaid Abdulla
7fdd04343b
Fix stack overflow when task name not recognized
2017-05-17 19:14:47 -07:00
Zaid Abdulla
30221f1d4e
Don't attempt to cache sessions after exception
2017-05-17 19:13:43 -07:00
Zaid Abdulla
ef8aeda02d
Fix TransferComplete fault not saved
2017-05-11 19:01:23 -07:00
Zaid Abdulla
624cf01270
Support caching in MongoDB instead of Redis
2017-05-08 10:44:42 -07:00
Zaid Abdulla
84e79bda9e
Fix bug in testing preconditions and events
...
The bug occurs when the session was serialized and deserialized as a
result of requests coming through a new TCP connection.
Resolves : #219
2017-03-29 17:28:42 -07:00
Zaid Abdulla
1a5fd65f4e
Show warning when failing to parse attributes
2017-03-18 22:20:17 -07:00
Zaid Abdulla
e137645286
Update license headers
2017-03-10 16:04:28 -08:00
Zaid Abdulla
366fb2adf0
Remove RequestDownload from GetRPCMethodsResponse
...
Because RequestDownload method is no longer supported.
2017-03-10 15:03:24 -08:00
Zaid Abdulla
7cfafdcd74
Rename config FS_IP to FS_HOSTNAME
2017-03-09 20:50:39 -08:00
Zaid Abdulla
59d412155b
Unify currentRequest and sessionData structures
2017-02-25 16:24:53 -08:00
Zaid Abdulla
0097a75cab
Better logging
...
Separated log streams for access log (defaults to stdout) and general
log (defaults to stderr). Added support for writing logs to a file.
Improved formatting and added support for JSON formatted logs.
2017-02-19 10:22:50 -08:00
Zaid Abdulla
3223e9733a
Optimize PathSet for V8
...
PathSet.find has been rewritten without using ES6 generators in order
to avoid V8's TurboFan/Crankshift optimization bailout.
2017-02-15 02:19:02 -08:00
Zaid Abdulla
9dd8b26d53
Fix maximum call stack size exceeded error
2017-01-17 13:13:50 -08:00
Zaid Abdulla
2e40ef8622
Better preset loop detection
...
The RPC and iteration counts are now reset for every cycle.
2017-01-12 23:30:27 -08:00
Zaid Abdulla
310114a500
Some fixes in tasks
2017-01-10 01:54:04 -08:00
Zaid Abdulla
12aa43c379
Better implementation for async loop control
2017-01-05 18:22:24 -08:00
Zaid Abdulla
133d9ebc99
A few bug fixes
2017-01-04 13:55:20 -08:00
Zaid Abdulla
33b01d68ca
Support add/remove objects from presets and tasks
2016-12-29 13:04:11 -08:00
Zaid Abdulla
2ca3ec86a8
Move default provisions to a separate file
...
And reuse the same set of default provisions for presets and tasks.
2016-12-28 16:14:54 -08:00
Zaid Abdulla
ee40a44339
Remove use of domains for error handling
2016-12-23 17:32:08 -08:00
Zaid Abdulla
63407be19b
Generate faults in precondition testing stage
...
Also, queue applicable provisions to any existing fault in order to
be processed later.
2016-12-21 19:44:56 -08:00
Zaid Abdulla
c4880b636b
Fault when provisions repeat indefinitely
2016-12-10 16:01:25 -08:00
Zaid Abdulla
9f85ead558
Turn errors from scripts and extensions into faults
2016-12-04 19:04:22 -08:00
Zaid Abdulla
3d221afc27
Implement support for download RPC
...
This uses special parameters (Downloads.) to trigger file download
making it poossible to use from scripts declaratively.
Resolves : #171
2016-11-30 16:27:01 -08:00
Zaid Abdulla
f9c5272ce0
A number of fixes in sandbox and declaration processing
2016-11-10 07:07:51 -08:00
Zaid Abdulla
044734b567
Some events related fixes
2016-11-03 14:42:38 -07:00
Zaid Abdulla
737266eae5
Replace Mongo query in preset precondition with flat filters
2016-11-01 18:20:19 -07:00
Zaid Abdulla
600ca58b99
Major restructuring and optimization
2016-10-24 18:26:19 -07:00
Zaid Abdulla
942d929476
Implement support for reboot and factory reset methods
2016-09-07 00:07:04 -07:00
Zaid Abdulla
46870db18d
Some bug fixes
2016-09-06 23:53:46 -07:00
Zaid Abdulla
ad38a7ccb1
Restructuring and optimization in provision processing
2016-09-06 02:38:08 -07:00
Zaid Abdulla
41fb97adef
Use variable to store active sessions
...
Keep session data in process for as long as the TCP connectoin is
open. Use redis if connection closes before the session is over.
2016-08-29 00:17:01 -07:00
Zaid Abdulla
e6aab4229d
A few fixes
2016-08-26 00:14:29 -07:00
Zaid Abdulla
62fca64268
Include device ID and channel in faults
2016-08-23 21:01:03 -07:00
Zaid Abdulla
67bcd7e526
New and improved fault management
...
This introduces the concept of "channel". Presets may belong to different
channels such that if one preset causes a fault, only presets belonging
to the same channel will be paused. Presets in other channels will continue
to be applied.
2016-08-23 01:06:25 -07:00
Zaid Abdulla
a1ce53bf03
Implement preset triggers on device events
2016-07-20 08:47:37 +03:00