Comments (11)
Apparently an object is not serializable: how does Ignite serialize?
from alchemist.
As far I underdand, it uses it's Binary Marshaller
from alchemist.
Can you deepen the reason why it does refuse to serialize? It looks like it's failing at serializing Kotlin's lambda expressions - maybe we can program it?
from alchemist.
Ok, I'll try to debug
from alchemist.
Most of the serialization exceptions seem to origin from classes whose fields in some ways end up dealing with org.danilopianini.jirf.FunctionEdge
. I guess the problem may be that it does not implement Serializable.
Other classes with similar issue are:
org.danilopianini.jirf.FactoryImpl
it.unibo.alchemist.loader.m2m.Context
org.jgrapht.graph.DefaultDirectedGraph
(although this one extends a class who does implement Serializable)it.unibo.alchemist.loader.m2m.SimulationModel$fromMap$3
And then there's another kind of exception regarding which I could not find so many information.
java.lang.UnsupportedOperationException: can't get field offset on a hidden class: private final kotlin.jvm.functions.Function1 it.unibo.alchemist.loader.m2m.ObjectFactory$$Lambda$145/0x0000000801176228.arg$1
from alchemist.
Okay, we must change the way we serialize, then, it's too much stuff to make Serializable
. Also, it may be the case that Ignite internally does not use the Java serialization (and would be right in doing so).
We should send away only the environment, and the environment should not bring a Java Implicit Reflective Factory within, nor the YAML-to-Alchemist model-to-model stuff.
I think that the "strange thing" you see is a Kotlin default argument value.
from alchemist.
I tried to avoid sending away the Loader
by making the field in which it is stored transient
and store in each RemoteSimulation
an InitializedEnvironment
. Most of the previous exceptions are gone, but now there's a problem with the serialization of classes with companion objects. Here's the error log.
from alchemist.
Can we replace the serializer of ignite with something else?
from alchemist.
Yes, there's a method to set a (i believe custom) Marshaller
but, it is deprecated:
Deprecated. Since 2.1. Some Ignite features will not work if non-null marshaller is set (IgniteCache.withKeepBinary(), .NET, CPP, ODBC)
Sets marshaller to use within grid.
from alchemist.
Okay, we must change the way we serialize, then, it's too much stuff to make
Serializable
. Also, it may be the case that Ignite internally does not use the Java serialization (and would be right in doing so). We should send away only the environment, and the environment should not bring a Java Implicit Reflective Factory within, nor the YAML-to-Alchemist model-to-model stuff.
@DanySK I'm working on the distribution of simulations, still having issues with serialization. I'm avoiding using the default Java serialization by using protocol buffers. The doubt that I now have is: to be able to serialize any Environment
and/or Exporter
(contained in an InitializedEnvironment
) using protobuf, or any other framework, I should define a custom serializer for every specific implementation, right? (It seems to me like it would take a lot of effort, I want to be sure I'm not taking the wrong path).
from alchemist.
I think that you should have your custom exporter and throw errors if any other is being used
from alchemist.
Related Issues (20)
- Alchemist log level should not be INFO HOT 1
- Update hugo automatically HOT 1
- Deployment shapes should actually be arbitrary filters
- Double precision should be configurable in exported data HOT 4
- refactor: ProtelisDevice should embed both AlchemistNetworkManager and AlchemistExecutionContext
- Possible bug in the priority check of a reaction HOT 8
- feat(loading): automatic conversion between YAML's kebab-case and kotlin's camelCase HOT 1
- docs(website): documentation on how to launch batch simulations is missing HOT 2
- feat(web-render): switch to the Java Desktop API to open the default browser HOT 2
- docs(website): "click to show code" is broken HOT 1
- `goToTime` should work multiple times HOT 1
- `removeChildTasks` has been deprecated HOT 2
- Fail to build `variables` if they are not declared using `formula` HOT 2
- Unable to select custom launcher with the new CLI HOT 8
- Not possible to reproduce GPS trace code from the web site HOT 6
- CameraSee ignore nodes in its field of view HOT 1
- Problem with project migration to new API HOT 1
- The Incarnation should not support nullable nodes HOT 1
- Unresolved reference: any class inside `graphql` module HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alchemist.