Anish Gupta | WebSocket based Ockam Transport in TypeScript #2403
thomas-shelby-oce
started this conversation in
Help Wanted
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposal for WebSocket based Ockam Transport in TypeScript
About Me
Hii, I'm Anish Gupta, currently a Final Year Student pursuing B.Tech in Information Technology branch at NIT Raipur. I'm a MERN Stack (MongoDB, Express.js, React.js, and Node.js) Developer and I've made 3 projects till now using this Tech Stack which can be found in my github repositories. I've also done my Summer Internship at Optum Global Solutions (UnitedHealth Group) and worked on healthcare technologies like FIHR (Fast Healthcare Interoperability Resources). Along with this I'm also proficient in C++ and it's my primary programming language for solving problems related to Data Structures and Algorithms.
Resume: http://shorturl.at/dgjtT
Coming to my interest in Github externship, I'm always eager to learn new technologies and work on some real-life projects. And while going through various organizations, I found Ockam network very interesting. Though I don't have previous experience in Rust and Typescript but I'm able to grasp things and concepts which are involved and implemented in Rust in this project. I'm proficient in JavaScript and its frameworks so I think the implementation in Typescript will not be that much difficult for me.
Learnings from Documentation
End-to-End Encryption with Rust
The things which I learnt from here is that distributed applications work in highly dynamic environment and our data or message usually go through several machines or intermediaries before reaching to their final destination. And these intermediaries may perform some CRUD operations in our data or messages and hence tamper it. So we need to reduce the size of vulnerability surface of our applications and make it more secure without depending on network boundaries and infrastructure. And here comes into play Ockam. Ockam is a suite of programming libraries that make it simple for applications to create any number of lightweight, mutually-authenticated, end-to-end encrypted secure channels. These channels use cryptography to guarantee end-to-end integrity, authenticity, and confidentiality of messages. With mutually authenticated, end-to-end encrypted secure channels we can reduce the vulnerability surface of our application to a great extent.
Here's the screenshot of my implementation:
I followed the steps which were mentioned in the documentation and learnt
Components Involved
Node is an asynchronous execution environment that is used to run stateful actors called Ockam Worker. Node can deliver messages from one worker to another worker on the same or different node. To run an Ockam Program we first need to create an Ockam node. This can be done using
#[ockam::node]
that imports the node initialization code in our program.Worker is a lightweight, concurrent, and stateful actor which runs on a node and can send message to other workers in the same or different node. To create a worker we create a struct that can store the internal state of the worker.
Routing - Ockam's application layer routing protocols allows us to send messages over multiple hops, within one node, or across many nodes. Here we have create a Hop worker and then we see how we can send messages over multiple hops,
An Ockam Transport - I think this is the main part of our github externship. We need to implement WebSocket based Ockam Transport in Typescript here. It moves Ockam Routing messages using a specific transport protocols like TCP, UDP, WebSockets, Bluetooth etc. In the documentation we see how we send messages over transport layer connections via Responder and Initiator Node.
At last we establish a secure channel between two entities. It's done by sharing a secret key to both the entities but not via a network. Because it needs to be kept a secret. Currently Ockam supports two different key agreement protocols
All the protocols are implemented inside these two functions
create_secure_channel_listener(...)
create_secure_channel(...)
Experience
I did my summer internship at UnitedHealth Group where I worked on an Interoperability based Project using FHIR (Fast Healthcare Interoperability Resources). I utilized my knowledge of MERN Stack to develop that project.
Projects
Idea for Implementation
I haven't worked in Rust till now but I'm proficient in C++ and as I've heard Rust is little bit similar to C++ so I will be comfortable in learning it during the externship programme. And I'm also proficient in JavaScript, so I'll quickly learn TypeScript and will work on the implementation part. Apart from this I've used Socket.io in one of my projects so I'm familiar with the concepts of Web Sockets and their usage.
So this was it from my side. Hope to work on this project during the externship programme.
Beta Was this translation helpful? Give feedback.
All reactions