Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for the article. I haven't written much Erlang.

I am looking for a better representation of concurrency and in my thinking I've found that it feels easier to understand is a timeline grid with rows for independent processeses and columns for time with demarcations for events. You could say a sequence diagram is closest but I'm also thinking of Chrome developer tools with its renderings for rendering, painting, javascript etc.

http://bloom-lang.net/ solves the nonorderly concurrency problems between machines with lattices.

I am unsatisfied how concurrency is represented in the mainstream languages. I find Rust async hard to understand and read at a high level from a schedule perspective. The function colouring issue is painful.

I want an interactive programming environment that lets me create a "tcp-connection" for instance and then register handlers for "on-ready-for-reading" and "on-ready-for-writing" which are system events that are triggered from IO threads that run epoll or liburing. You don't want to block the IO thread loop so you dispatch an event to another thread.

I've been designing a syntax for representing state machines and events that can be fired from different places, it looks like this:

   initialstate = state1 | state1a state1b state1c | state2a state2b state2d | state3
It waits for initialstate to be reached, then waits for state1 then it waits for state1a state1b state1c in any order and so on.

Ideally we want data flow to be a tree and sprinkled with synchronization points which are barriers where independent tasks synchronizes, where we exchange tasks and data. Shared memory synchronization is great for the amount of data that can be transferred in one-go (you're not writing lots of data into a pipe as in multiprocessing or into a buffer in message passing, message passing can be O(1)) but I don't want to do it on the hot path, Amdahls law.

Another program I've written with Java runtime executes the following program:

  thread(s) = state1(yes) | send(message) | receive(message2);
  thread(r) = state1(yes) | receive(message) | send(message2);
I've been trying to design a multithreaded server architecture here https://github.com/samsquire/three-tier-multithreaded-archit...

You could implement complicated interlocking workflows with this syntax, because you just need to wait for events as defined.

LMAX Disruptor gets some good requests per second



Can i recommend you to take a look at effect handlers languages? It is not mainstream but it may prove useful for your thinking here.

Effekt or Ocaml 5.0 new events handler system may help get ideas that help you achieve your goal here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: