Closed ddubbert closed 4 years ago
API: A decision has to be made between REST and GraphQL. REST has the advantage of being known by more developers, so that such an open source project might be of more use for a wider range. REST also has got a better performance, because GraphQL needs to interpret the body of every request and has overhead in building a response. GraphQL on the other hand has a library that eases the creation of microservices (Apollo Federation and Apollo Gateway) which would be interesting to test. In addition, most of the workload lies on the service side and there are only a hand full of HTTP-Requests needed, so the drawbacks of GraphQL aren't as grave. Therefore GraphQL will be chosen, not least because I want to get a better knowledge of this new technologie.
GraphQL Library: There are a couple of widely known and used libraries for using GraphQL in a Javascript based Front- and Backend. The most used is Apollo GraphQL, which provides both Front- and Backend tools. In addition it provides support for microservices (Apollo Federation and Apollo Gateway), which is why it will be used in this project.
Kafka: For using Kafka Clients (Producer / Consumer) in Node.js, there are three heavily used libraries, kafka-node, kafkajs and node-rdkafka. Even though kafka-node is the most used one, the other two provide equally extensive features. Only kafkajs already integrates the Promise-style, which is why it will be used in this project. A Kafka Server / Broker and Zookeeper instance will be started in the terminal. This is sufficient, because the project is only a PoC and is not meant to go live. For event schemas and serialization / compression Apache provides Apache Avro. For Javascript there are some libraries of which avsc was chosen, because it is by far the most used one, as well as a flexible and standalone library.
Deployment: Tools like Docker would make deployment and other things easier, but I haven't got any experience with such tools, so that using them would simply be overhead. An AppleScript will be used to open all needed Terminal windows and processes and ease the overall starting process.
There are a couple of libraries for using Kafka within Node.js and a decision has to be made between those. In addition there are other technologies needed to build microservices and APIs which also need to be selected.