Enecuum.Framework Possibilities, Part 2

  • What the framework can be used for.
  • How to write scenarios for nodes that interact using TCP-like connection.
  • How to manage a mutable and concurrent state for node.

What we already know: node as a TCP server

  • awaitNodeForever: this action makes the node acting forever. It’s also possible to have another conditions of node finishing including conditions by time or by event. We won’t be focusing on this in the future.
  • Type declarations for functions.

Going deeper: more complex task

  1. Define a type for log entries able to be sent via network.
  2. Create a data storage for logs in memory.
  3. Create a handler for processing of this type messages.
  4. Define new node API.
  5. Create a sample client node.

Console client node

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store