kafkiano

所属分类:中间件编程
开发工具:C#
文件大小:0KB
下载次数:0
上传日期:2019-01-15 18:25:55
上 传 者sh-1993
说明:  玩卡夫卡和dotnet
(playing with kafka and dotnet)

文件列表:
Common/ (0, 2019-01-15)
Common/Constants/ (0, 2019-01-15)
Common/Constants/Constants.csproj (138, 2019-01-15)
Common/Constants/Topics.cs (371, 2019-01-15)
INSTALL.md (1849, 2019-01-15)
KSQL/ (0, 2019-01-15)
KSQL/ksql.txt (1440, 2019-01-15)
Kafkiano.sln (5346, 2019-01-15)
Services/ (0, 2019-01-15)
Services/InventoryService.Messages/ (0, 2019-01-15)
Services/InventoryService.Messages/InventoryService.Messages.csproj (138, 2019-01-15)
Services/InventoryService.Messages/ProductStockEvent.cs (344, 2019-01-15)
Services/InventoryService.Messages/ProductStockInfo.cs (275, 2019-01-15)
Services/InventoryService.Messages/ProductStockValidated.cs (308, 2019-01-15)
Services/InventoryService/ (0, 2019-01-15)
Services/InventoryService/Controllers/ (0, 2019-01-15)
Services/InventoryService/Controllers/InventoryController.cs (1565, 2019-01-15)
Services/InventoryService/EventLogic.cs (6938, 2019-01-15)
Services/InventoryService/InventoryService.csproj (708, 2019-01-15)
Services/InventoryService/Program.cs (614, 2019-01-15)
Services/InventoryService/Properties/ (0, 2019-01-15)
Services/InventoryService/Properties/launchSettings.json (787, 2019-01-15)
Services/InventoryService/Repositories/ (0, 2019-01-15)
Services/InventoryService/Repositories/InventoryRepository.cs (2002, 2019-01-15)
Services/InventoryService/Startup.cs (1521, 2019-01-15)
Services/InventoryService/appsettings.Development.json (137, 2019-01-15)
Services/InventoryService/appsettings.json (97, 2019-01-15)
Services/OrdersService.Messages/ (0, 2019-01-15)
Services/OrdersService.Messages/OrderCreated.cs (293, 2019-01-15)
Services/OrdersService.Messages/OrdersService.Messages.csproj (138, 2019-01-15)
Services/OrdersService/ (0, 2019-01-15)
Services/OrdersService/Controllers/ (0, 2019-01-15)
Services/OrdersService/Controllers/OrdersController.cs (1528, 2019-01-15)
Services/OrdersService/OrdersService.csproj (669, 2019-01-15)
Services/OrdersService/Program.cs (611, 2019-01-15)
Services/OrdersService/Properties/ (0, 2019-01-15)
Services/OrdersService/Properties/launchSettings.json (784, 2019-01-15)
Services/OrdersService/Startup.cs (1397, 2019-01-15)
... ...

# Services with Kafka and dotnet (January 2019) ### Intention Hi! This is a repository with a failed experiment. I just wanted to implement services using kafka and dotnet like it is shown in this article for the JVM: https://www.confluent.io/blog/building-a-microservices-ecosystem-with-kafka-streams-and-ksql/ What I love from it is that it seems you can have kafka for messaging and storing data all in a exactly once fashion. I see it like the holy grail and if that is possible kafka can be a great election for event publishing but also for implementing transactional logic (C in the CQRS world). ### Why is it a failure? If you see this java code the trick is in the transform function https://github.com/confluentinc/kafka-streams-examples/blob/3.3.1-post/src/main/java/io/confluent/examples/streams/microservices/InventoryService.java It access a storage in the kafka node and execute the logic based on the information from it in a exactly once mode. The problem is I wasn't able to implement it in dotnet: * Although you can order the logic per entity and execute the entity logic one by one you don't have access to the kafka node rockdb that can participate in the kafka transaction. * In KSQL you can have a lot of queries that are executed in parallel, this is great for streaming calculus or creating read models, but I don't see KSQL can be useful with logic that just have a certain complexity. ### What can you do with Kafka and dotnet? * You can use it as a log and subscribe to it, you can read a message in an "at least once" mode, making the usual tricks for having idempotence. This is huge. But I don't see you can use it as a transport+transactional storage. ### What would we need to have transport+storage? * Transactions in the dotnet driver (they are working on it) * Access to the keyvalue store (rockdb) in the transaction (I think this is not in the roadmap). ### What have I learnt in this failure? * KSQL * More kafka (I love the ordering by key feature!)

近期下载者

相关文件


收藏者