As I said before, GSoC Mid-Term phase is on, and, before it ends, I really wish to be [mostly] done with the ZeroMQ connections, Jupyter messaging and HMAC authentication part of my project. Obviously I’ll need to come back to it sometimes to make ajustments and implement some missing functionality, but my work should be focused on the Scilab side of things from now on.
I really should be thankful that my mentors understand that my output have been kinda low up till now due to academic work, since vacation haven’t started yet (by the way, “vacation” is a somewhat inaccurate term for post graduate students, lol), and that I kept myself busy doing some groundwork. But they made it clear that I need to show a Scilab kernel implementation working, and I do agree. I’m hopeful that from now I can have more time to do my job and compensate for delays.
Not that I haven’t done anything in the past weeks. As I said, I want to get rid of my concerns about what I have worked on so far, and my code was quite hacky or loosely implemented. So I dedicated myself to refactor it on a more object-oriented structure, spliting its semantically different pieces into classes. Having it that way will help me adding the next components, I hope.
Basically, I defined ProtocolMessage and ProtocolServerConnection classes, dealing with Jupyter message structure and the needed set of ZeroMQ kernel sockets, respectively. My intention was to let the main code see only a connection object and a queue of incoming and outgoing message objects, from which it takes or sets only the JSON data relevant to the kernel language engine (Scilab libraries, in our case).
I think the best way to explain my idea is showing you at least the classes headers. So there they go.
protocol_message.hpp (header guards omitted)
protocol_connection.hpp (header guards omitted)
If any of you want, I can detail the implementation better in the comments or later on a post update.