Comments (6)
I've inspected the code you wrote and I've solved the problem described above.
There are no write permissions needed. So no custom file system is needed for the AWS Lambda function.
The problem that I had was related to the fact that I was bundling my Lambda function, compiling it into a single file.
Simply excluding all the Mida dependencies from the produced bundle did the job!
As a suggestion, I would raise an exception in the load()
function that you wrote if the .proto files are not correctly loaded.
from mida.
Hello, when using Mida with cTrader, a socket connection is created under the hood to use cTrader's Open API. The messages exchanged between Mida and cTrader are structured with protobuff. The protobuff schemas are loaded from the file system automatically, this error occurs when the protobuff reader was unable to load the .proto files from the file system.
I don't know how AWS Lambda works, but most probably you don't have access to file system and/or you are unable to read this files: https://github.com/Reiryoku-Technologies/cTrader-Layer/tree/master/protobuf
This library is used under the hood by the Mida cTrader plugin
I think you should investigate more about the file system, let me know here, thank you!
from mida.
Hey @Vasile-Peste, thanks for your answer.
It makes totally sense.
Mounting a custom file system for the AWS Lambda it's possible.
Nevertheless, it would cost slightly more and it'll slow down the code execution because also a VPC has to be configured.
Notice that, it's possible to read/write from a local disk in a Lambda function without a custom file system, but writing is limited to the /tmp
directory.
Would it be possible to make configurable the root directory in which the .proto files are stored?
from mida.
Related Issues (20)
- Historic Data HOT 5
- objects are null in console.log HOT 6
- Add a function / method that helps calculate take profit and stop loss price points on all symbols. HOT 3
- Account and Balance Update on cTrader
- Profit calculation on currency pairs with JPY as the quote currency is not accurate. HOT 1
- Changing the label field HOT 6
- Mida events subscription fault tolerance HOT 2
- Mida.login error makes object undefined HOT 4
- Create fallback symbols
- placeOrder() timeInForce has no effect HOT 3
- Event based mechanism to determine broker's server open and close. HOT 2
- Create "connect" and "disconnect" events HOT 1
- Mida instances HOT 4
- .toNumber() for MidaDecimal HOT 2
- composePeriods() sets incorrect values HOT 4
- marketWatcher.on("period-close"...) emits wrong timeframe HOT 2
- Error setStopLoss HOT 11
- Adding a custom id to a MidaTradingAccount HOT 4
- Closed Position Detail HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mida.