2

In the context of Substrate, is it feasible to introduce a layer on top, such as Kafka, to improve request processing times? Could this architecture enable Substrate to be utilized solely for blockchain verification purposes, with the supplementary layer facilitating accelerated request handling by only requesting substrate when changes occur?

4
  • can you please elaborate more on requesting substrate when changes occur
    – dadzerlaze
    May 9 at 16:47
  • for an example when an update is occur on a specific entry, these is a question related to an academic research, i introduce substrate to build a specific blockchain, but i'm asking if i can add a new layer on top of substrate
    – lsroudi
    May 9 at 16:58
  • i dont think there is any barrier towards optimising substrate by building layers on top of it, we are runing a custom gossip network on top of it and substrate basically act as backend for all our services
    – dadzerlaze
    May 9 at 17:19
  • 1
    @dadzerlaze thank you for your answer, but can you give me some example, is it possible to send event outside substrate node and catch it for a microservices ? how do you proceed for a custom gossip ? any help at this well be more than welcome
    – lsroudi
    May 10 at 9:27

2 Answers 2

2

I suggest you do all the tutorials in substrate docs to understand more what you can do, it wont take long to finish all of them (around 3 days, which is worth it), after you finish the tutorials you will understand that substrate just a bunch of tools and libraries that you can combine however you want to build whatever you want, the only limitation is your imagination (and maybe your project requirements).

Let me give you an example to answer your question in your comment,currently we are working on a project(basically to do exactly what you are describing, scaling request processing) to validate a stream of events so most of our work was basically done offchain, we are runing a grpc server on each validator and gossiping some events using libp2p gossipsub and submitting transactions finally to substrate to be included in a block and listening for finalized blocks and returning responses to clients, all of this is done mostly in outer-node.

You can think of substrate as a state machine, and you can do whatever you want with state machines :)

1
  • 1
    thank you a lot
    – lsroudi
    May 26 at 18:17
2

Yes you can introduce a new layer or component into Substrate. You need to think at what level you want to do this i.e. on the runtime level, client level, off-chain level. I recommend you start by reading all of these.

Could this architecture enable Substrate to be utilized solely for blockchain verification purposes, with the supplementary layer facilitating accelerated request handling by only requesting substrate when changes occur?

If you can build a nice solution around this, the community would be grateful.

2
  • i'm doing a Phd on Blockchain, really i want to build something nice, but sometimes i dont know were to start, maybe need some help
    – lsroudi
    May 10 at 11:49
  • @Isroudi you can always ask another question when it's related to substrate here :) May 10 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.