Parse.MemoryMeasurement serialization across processes

Hello, i am using Visual Studio 2015 to create few Eve online bots of my own, using your memory reading service.

I created separate process (separate project and exe file in same solution) to serve as reader service for main application. I start this “EveReaderServer.exe” manually and connect to it from my main process trough Named Pipes.

Whenever I start one of my eve account (and i have quite a few miner accounts) my server process creates new thread which contains its own SimpleInterfaceServerDispatcher and spins up sensor interface and establishes new Named Pipe so my main bot application can query Parse.MemoryMeasurement from server process when needed,

This is, unfortunately, not working as intended because i cannot serialize Parse.MemoryMeasurement to send new reading back to bot trough stream pipe because it is interface and not a data structure. I tried with delegates, pointers, BinaryFormatter serialization (including some low level unsafe/unmanaged stuff) etc. but nothing i do enables me to simply pass MemoryMeasurement from one process/thread to another.

My main point is: i want to avoid waiting for several MemoryMeasurement interfaces to become ready after each build… is there a way to make something like this work (like trivial pointer passing in C++)?

The sanderling repository contains functions used for serializing and deserializing. You can call them using the type Sanderling.Interface.FromInterfaceResponse in theSanderling.Interface Assembly.

The methods are named SerializeToString and DeserializeFromString. In the demo app, they are used with the raw memory measurement before parsing, but the parsed version should work as well. (Actually the serializer used here is a general graph serializer which also supports incremental serialization for reduced space requirements for sequences of similar CLR Object graphs, but that is another story…)

This serializing code is also used to store measurements to files to enable replay to reduce cost for (automated) testing.

1 Like

thanks for fast response mate, this works like a charm now