I have the following setup:An object A running as a separate service with its own address (implemented via Pyro package in Python).An object B running as a separate service with its own address.Object C used as a vehicle to transport data between A and C.Use case:A creates C and sends it to B for processing.What annoys me:I need to import C class definition in both A and B.Main question:Is this normal? Do I really need to have C in some common library? Would that not be a problem if A is sitting on one server, B on another and the common library (with C) changes?Side question:I am going for some hybrid of object orientated and event driven system. Does this setup sound like it? I am not too familiar with the terminology for paradigms. Is this service based architecture?
How can I avoid both objects A and B using class C (or is it unavoidable)?
object oriented;python;networking;event programming
When I talk to you I have to import a concept called English.  It annoys me that you have to import English as well because there are all these interesting French women who refuse to import English.  I'd like to be able to talk to them but I refuse to import French as well.You need some common way to communicate.  You could send a string but even that requires a common way to communicate.  You'd just be using the fact that both have already imported string. Of course you'd still have to decide what the string will be (json, xml, ini, ...) and how it's structured (schema) so really you're right back where you started.Another design would be to create a C interface that only defined what needs to be common.  That way B doesn't care about C other then how to talk to it leaving A free to create as many different kinds of C implementations as it likes.Alternately you could use the UN model and create class D whose job it is to translate AC's into BC's and vise versa.  This is a lot of extra work so understand this is a work around that only makes sense because neither side totally won the Anglo-French Wars.