Romance object sharing

Lamy Jean-Baptiste jiba at tuxfamily.org
Tue Apr 2 06:21:32 EST 2002


Hi everyone !

I want to introduce Romance.

Romance is an heterogeneous vision of programming / hacking. It relies on
a light dynamic object sharing protocol for sharing between different
programmic languages and programs (such as desktop applications).

In the future Romance will be more than that. It may provide a full
library, including even a graphic toolkit !

Romance is a free (GPL'ed) alternative to .NET, CORBA / Bonobo or
XML-RPC. It allows to share objects between languages, but keeps the
each language's interpreter (contrary to .NET) and look-and-feel (you
code Python, not C#).

Romance currently support Python, Guile (Scheme) and C. Future versions
will support other scripts languages (Perl, Ruby, ...), Lisp / Scheme
(ELisp, ...) and other dynamic languages (Smalltalk, OCaml)...

Romance is available at :
http://oomadness.tuxfamily.org/romance/en/index.html
http://savannah.gnu.org/projects/romance


The use of Romance in Python is totally transparent. Here is an example
of a Romance server :

 # Step 1: import and init Romance !
import romance

# Step 2: create our stuff : the Person factory
class Person:
	def __init__(self, name, proof):
		self.name  = name
		self.proof = proof
    
	def get_description(self):
		return "%s is a %s." % (self.name, self.proof)
  
# Step 3: make it available to any Romance app as "romance.Person"
romance.Person = Person

# Step 4: wait for client !
romance.serve_forever()


And the corresponding client :

# Step 1: import and init Romance !
import romance

# Step 2: access to Romance lib and data (and modify them if you want !!!)
#         Here, create me as a person !
jiba = romance.Person("Jiba", "hacker")

print "My name is :", jiba.name
print "More precision :", jiba.get_description()
print
print "Server is in %s" % jiba.__lang__()

=> My name is : Jiba
=> More precision : Jiba is a hacker.
=>
=> Server is in python

The client is in Python too (because comp.lang.python !), but it can be Guile, or whatever "romantic"
language ;-)

Jiba







More information about the Python-list mailing list