Hello I went through KIPI plugins and had some suggestions. Currently, KIPI Plugins are written in C++. It's great, fast, but a bit complex, compared to the alternative implementation in Python. How about reimplementing it in Python? It's easy, scalable. I had some thoughts to do the same: * Reimplement the plugins in Python (Python3). * As it is done currently, other applications using KIPI plugins can use the same API (in C++) to do the image upload/download task, where the C++ helper would spawn some Python subprocess to do the entire task. * Use some sort of IPC, like File IO to get the response back to the calling program (if required). We can also consider "libpython" as a candidate. https://docs.python.org/3/extending/embedding.html Advantages: * Ease of maintenance, as APIs tend to change fast, and so your callbacks within the program. * The task is network bound, and not CPU intensive. So, Python is a good choice. * Python "requests" module is very reliable to handle HTTP requests. * Objectives can be achieved better with lesser lines of code. * This could also pave way for creating plugins for other online services and integrating with KDE (like GNOME online accounts). I tried to have a discussion on StackOverflow http://stackoverflow.com/questions/42611151/is-it-advisable-to-embed-python-in-a-c-application/42611603#42611603 and Reddit https://www.reddit.com/r/cpp/comments/5xnpvl/is_it_advisable_to_embed_python_in_a_c_application/ and got mixed reviews. I would like to have your review on the same. If you agree, I can work on some simple prototype by the weekend for a demo. -- |
Hi, Best Giles Caulier 2017-03-14 9:23 GMT+01:00 Himanshu Shekhar <[hidden email]>:
|
Free forum by Nabble | Edit this page |