Yes, it's reading from Eikon desktop thru CCF channel which in turns going to PIXL, RFA library so on to realtime infrastructure i.e. RMDS/TREP-RT.
You can write your own custom JET API class for sure like **News.js** does as a JET plugin. JET plugin isn't more than a javascript function that return a public API object. You register your plugin with **JET.extend()**, passing the name of your plugin (this name will be appended to the JET object) and your function. You can take a look at **News.js** for an example.
Regarding the data saving, please refer to Save/Load data sample page in JET demo app available from the Developer tab in Eikon menu. JET.Archive function is designed to persist data per instance of the app in a workspace in Eikon.