nothing can be easier.
in the end all you need, is have your mind work through the following point "what it means to have plugin and what it means to the application that launches this plugin"
to my understanding, all there is to it is electronic data interchange protocol, EDI.
For EDI first thing you define is "what"
Second thing you define is "how"
And the last, the third one, is you define, depending on your application very special needs is "when".
To tally thing up and to clarify, where you stumble at the moment, on my mind, is you are trying to explore and come to definitive conclusion with regards to point, that has no real bearing on what you need to do, what you are asking is "which".
That is simply is a moot point.
Now, that above points simplify and somewhat layout fundamentals, one usually picks and chooses from toolchest what to do.
What should be the format of EDI between main application and plugin ( or subfeature )? -
b. CSV, Excel, Flat, TSV, LLVT, Parquet, Fixed Width ... ... ... yada yada yada - THE FILE
c. database, well, I am fun of SQL Server, but you are more likely to prefer Postress or Oracle? ( smile )
d. there is always a network way, which can be as simple as raising HTTPServer, however this idiom is implemented in the form of class in the language of your choice, followed by using Get, Post, Put, Delete ( my vocabulary of RESTFull verbs is limited, but it is readily available on the Yandex ), yes, one can open a socket ( whatever that means ) and then there are yet more ways, IPC, Shared Memory ( now, don't really use this last one, it never works well even within same language application, unless you really know what and how to do here )
this point d can be further extended and deliniated.
It can be local ( yes, the localhost, IP Address 127.0.0.1 exists!!! I have seeing it, and it's there, and I can prove it to you in 30 seconds, even if you are in Africa! And then there is network, sometimes, and when there is network there is yamm yamm yamm cloud ( this is where warm and fuzzy feelings usually start to flow ).
And the nice thing about point d, particularly RESTFull, it works and it is easy, and it can be done practically in any language today, more or less.
If I haven't annoyed you at this moment, it would probably mean that you are invariably damaged person when excessive beliefs in technology, go out and have a nice and long walk.