Open cb1kenobi opened 10 years ago
Had many years of experience with Poco (we used it for Titanium Desktop) and also a little bit of playing around with libuv. I want to be very careful in bring in third-party dependencies since it will bloat the library quickly for things that we only certain capabilities.
I'm not sure Layer 1 should be 100% C++... I think maybe writing in Hyperloop and then compiling them to C will provide a more flexible tradeoff. But this is debatable and something that must be prototyped and tested.
I strongly believe Layer 1 should be 100% C++. I believe that it will be much, much easier and faster to develop in C++. I suspect the runtime performance to be faster.
I suggest we use an existing framework such as libuv (https://github.com/joyent/libuv) or Poco C++ (http://pocoproject.org/).
libuv is the heart of Node.js. It's relatively portable and includes event loops, threading, filesystem, and networking support. libuv supports iOS and Android. It does not support Windows Phone 8, but it should be possible to port parts of libuv to WP.
Poco C++ is a portable library that has networking, filesystem, xml, and more. This library already supports iOS, Android, and BlackBerry. It supports Windows and Windows CE, so I imagine it wouldn't be too hard to get it running on Windows Phone. Titanium Desktop used Poco C++.
For the database, this would continue to be SQLite which is already C and runs on every mobile platform. In addition to a SQL-based database API, it's time we add a key/value database engine equivalent to IndexedDB. This would ideally be backed on LevelDB, however LevelDB does not support any Windows-based operating system.
By creating a single shared library that wraps JavaScriptCore, SQLite, and a C/C++ framework, this would produce a single cross-platform shared library for each target architecture that would speed up build times and improve developer productivity as they build Level 2 and Level 3 APIs.