Calling Haskell from Java with C in between

前端 未结 2 692
梦毁少年i
梦毁少年i 2021-02-07 04:06

This probably sounds like a nightmare, but I\'d really like to get this working. I am using this example for the most part: Calling C from Haskell and am trying to get this work

2条回答
  •  有刺的猬
    2021-02-07 04:56

    If your goal is to actually get something done (as opposed to just playing around with JNI) I suggest tackling this as a garden variety RPC problem and utilizing one of the many framework/protocols for it:

    Protocol Buffers from Google

    Thrift from Facebook

    Avro (well this is mostly a wire protocol)

    From what you are trying to do, Thrift might be your best bet since it describes a full client/server RPC stack but I'm pretty sure any of them would pretty much work over a simple socket.

提交回复
热议问题