Re: Higher level language bindings for AGL services and AFB framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason,

Since FF you may already use the "controller" to create quick bindings/binder using LUA scripting language. The controller allows you to either write your business logic fully in LUA or to mix LUA with native C/C++ libraries. Depending on your goal you may either use a bare controller[1] or directly afb_test binary to mock api/services [2]. You may find a small sample of bare controller using LUA+C at [3].

Implementing an other scripting language such as node,python,tcl,... is not especially complex, it is only a question of time and resources. My team selected LUA scripting engine because it remains tiny and easy to implement in a multi thread environment based on a mainloop. Furthermore LUA suits very well testing/mocking of API which was our primary goal for scripting.

Note: the difficulty in mixing scripting with AGL native services comes from providing a simple access to well known scripting engine while not breaking AGL security and transport model. Anyone may obviously run a bare nodejs inside AGL, but in this case you loose the security model, the micro services capacity, the monitoring, the supervision, ....

Conclusion: implementing a new scripting language or even Java as a first class citizen inside AGL is obviously possible. If tomorrow someone is willing to spend the time and the money to port an other scripting engine in a binding nothing prevent from doing so. Nevertheless if you envision to do so, prepare yourself to spend more than one month and not only a couple of days.

Fulup

[1] http://docs.iot.bzh/docs/devguides/en/dev/reference/ctrler/controller.html [2] http://docs.iot.bzh/docs/apis_services/en/dev/reference/afb-test/Installation.html
[3] https://github.com/iotbzh/agl-services-hvac-mockup

On 10/10/18 00:17, Jason Reich wrote:
Hi all,

I'm looking at some of the existing AGL services, and most/all are written in C.  However, there will likely be many services that don't end up interfacing with the OS and hardware, but will focusing more on internet queries, REST APIs, and JSON data manipulations.  For these types of services (i.e. weather, POI, sports scores, etc) it would be much quicker to implement and maintain them in languages such as Python or Node JS.


Has there been any effort or investigations to implement AGL services on the AFB framework using a higher level language?  Any thoughts on this direction?  Any prototypes out there?


thanks

Jason.



_______________________________________________
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions


_______________________________________________
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux