[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue gnue-common/doc/GCommSpecifications.txt gn...
From: |
Jason Cater |
Subject: |
gnue gnue-common/doc/GCommSpecifications.txt gn... |
Date: |
Fri, 26 Oct 2001 01:40:46 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/10/26 01:40:45
Modified files:
gnue-common/doc: GCommSpecifications.txt
gnue-common/src/commdrivers: GCommBase.py
gnue-common/src/commdrivers/_corba: CommDriver.py
gnue-common/src/commdrivers/_helpers: AsyncHTTPServer.py
gnue-common/src/commdrivers/orbit: CommDriver.py
gnue-common/src/commdrivers/pyro: CommDriver.py
gnue-common/src/commdrivers/xmlrpc: CommDriver.py
reports/doc : services.txt
reports/src : GRServices.py
Log message:
work in gcomm; synching machines
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/doc/GCommSpecifications.txt.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/GCommBase.py.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/_corba/CommDriver.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/_helpers/AsyncHTTPServer.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/orbit/CommDriver.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/pyro/CommDriver.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/doc/services.txt.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRServices.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/gnue-common/doc/GCommSpecifications.txt
diff -u gnue/gnue-common/doc/GCommSpecifications.txt:1.4
gnue/gnue-common/doc/GCommSpecifications.txt:1.5
--- gnue/gnue-common/doc/GCommSpecifications.txt:1.4 Wed Oct 24 18:23:45 2001
+++ gnue/gnue-common/doc/GCommSpecifications.txt Fri Oct 26 01:40:45 2001
@@ -37,8 +37,8 @@
Provider/Server
.-------------. .-------------.
| | --> XML-RPC <-- | |
-MyFunction1() --> | GComm | --> SOAP <-- | GComm |
- | | --> Sockets <-- | | <-- Client
+MyFunction1() --> | GComm | --> SOAP <-- | GComm |
+ | | --> Sockets <-- | | <-- Client
MyFunction2() --> | Abstraction | --> CORBA <-- | Abstraction | Requests
| | --> Other <-- | |
`-------------' `-------------'
@@ -47,7 +47,7 @@
========
This design only exposes services. It does not try to emulate Object
-management for transports that do not support Object management natively.
+management for transports that do not support Object management natively.
Such a design is far too complicated of a task for GNUe to embark upon.
@@ -95,13 +95,20 @@
Mac specific if necessary.)
+Features
+========
+ * Exceptions
+ Python server handlers can use standard Python exceptions to
+ signal errors. The GComm adapters will translate these to
+ whatever error mechanism that adapter provides. Should the
+ adapter provide named exceptions, then
-Mappings
-========
+
+
OpenOffice
Corba Pyro Java RMI XML-RPC SOAP UNO
- -------- -------- -------- -------- -------- --------
+ -------- -------- -------- -------- -------- --------
Distributed Objects X X X X
Exceptions X X X ?? ?? X
@@ -111,11 +118,11 @@
Pass userdef types X X X ?? ?? X
Return simple types X X X ?? ?? X
-Return aggregate types X X X ?? ?? X
+Return aggregate types X X X ?? ?? X
Return userdef types X X X ?? ?? X
-
-Python Native X ?? X X
-Python Bindings X X ?? X X
+
+Python Native X ?? X X
+Python Bindings X X ?? X X
Index: gnue/gnue-common/src/commdrivers/GCommBase.py
diff -u gnue/gnue-common/src/commdrivers/GCommBase.py:1.2
gnue/gnue-common/src/commdrivers/GCommBase.py:1.3
--- gnue/gnue-common/src/commdrivers/GCommBase.py:1.2 Thu Oct 25 19:00:19 2001
+++ gnue/gnue-common/src/commdrivers/GCommBase.py Fri Oct 26 01:40:45 2001
@@ -27,16 +27,16 @@
# NOTES:
#
-class BaseClientDriver:
+class Client:
pass
-class BaseServerDriver:
+class Server:
def raiseException(self, exception, message)
raise exception, message
-class GCommException (StandardError):
+class GCommException (StandardError):
pass
Index: gnue/gnue-common/src/commdrivers/_corba/CommDriver.py
diff -u gnue/gnue-common/src/commdrivers/_corba/CommDriver.py:1.1
gnue/gnue-common/src/commdrivers/_corba/CommDriver.py:1.2
--- gnue/gnue-common/src/commdrivers/_corba/CommDriver.py:1.1 Thu Oct 25
19:00:19 2001
+++ gnue/gnue-common/src/commdrivers/_corba/CommDriver.py Fri Oct 26
01:40:45 2001
@@ -1,9 +1,9 @@
#
# This file is part of GNU Enterprise.
#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
# GNU Enterprise is distributed in the hope that it will be
@@ -22,9 +22,15 @@
# CommDriver.py
#
# DESCRIPTION:
-# Class that provides a basis for GNUe Comm Drivers.
+# Class that provides a basis for CORBA-based GNUe Comm Drivers.
#
# NOTES:
#
-pass
+from gnue.common.commdrivers import GBaseApp
+
+class CorbaClient(GBaseApp.Client):
+ pass
+
+class CorbaServer(GBaseApp.Server):
+ pass
\ No newline at end of file
Index: gnue/gnue-common/src/commdrivers/_helpers/AsyncHTTPServer.py
diff -u gnue/gnue-common/src/commdrivers/_helpers/AsyncHTTPServer.py:1.1
gnue/gnue-common/src/commdrivers/_helpers/AsyncHTTPServer.py:1.2
--- gnue/gnue-common/src/commdrivers/_helpers/AsyncHTTPServer.py:1.1 Thu Oct
25 19:00:19 2001
+++ gnue/gnue-common/src/commdrivers/_helpers/AsyncHTTPServer.py Fri Oct
26 01:40:45 2001
@@ -26,6 +26,8 @@
#
# NOTES:
+from gnue.common.commdrivers import GCommBase
-class AsyncHTTPServer:
+class AsyncHTTPServer(GCommBase.Server):
pass
+
Index: gnue/gnue-common/src/commdrivers/orbit/CommDriver.py
diff -u gnue/gnue-common/src/commdrivers/orbit/CommDriver.py:1.1
gnue/gnue-common/src/commdrivers/orbit/CommDriver.py:1.2
--- gnue/gnue-common/src/commdrivers/orbit/CommDriver.py:1.1 Thu Oct 25
19:00:19 2001
+++ gnue/gnue-common/src/commdrivers/orbit/CommDriver.py Fri Oct 26
01:40:45 2001
@@ -19,12 +19,27 @@
# Copyright 2001 Free Software Foundation
#
# FILE:
-# CommDriver.py
+# corba/CommDriver.py
#
# DESCRIPTION:
-# Class that provides a basis for GNUe Comm Drivers.
+# Class that implements the ORBit CORBA driver for GNUe Comm.
#
# NOTES:
+# http://
+
+
#
+# We provide both a client and a server driver
+#
+CLIENT = 1 # ClientDriver
+SERVER = 1 # ServerDriver
+
+
+from gnue.common.commdrivers._corba.CommDriver import CorbaServer, CorbaClient
+
+class ClientAdapter(CorbaClient):
+ pass
+
+class ServerAdapter(CorbaServer):
+ pass
-pass
Index: gnue/gnue-common/src/commdrivers/pyro/CommDriver.py
diff -u gnue/gnue-common/src/commdrivers/pyro/CommDriver.py:1.1
gnue/gnue-common/src/commdrivers/pyro/CommDriver.py:1.2
--- gnue/gnue-common/src/commdrivers/pyro/CommDriver.py:1.1 Thu Oct 25
19:00:19 2001
+++ gnue/gnue-common/src/commdrivers/pyro/CommDriver.py Fri Oct 26 01:40:45 2001
@@ -1,9 +1,9 @@
#
# This file is part of GNU Enterprise.
#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
# GNU Enterprise is distributed in the hope that it will be
@@ -19,12 +19,39 @@
# Copyright 2001 Free Software Foundation
#
# FILE:
-# CommDriver.py
+# pyro/CommDriver.py
#
# DESCRIPTION:
-# Class that provides a basis for GNUe Comm Drivers.
+# Class that implements the PYRO driver for GNUe Comm.
#
# NOTES:
+# http://pyro.sourceforge.net/
+
+
+#
+# We provide both a client and a server driver
#
+CLIENT = 1 # ClientDriver
+SERVER = 1 # ServerDriver
+
+from gnue.common.commdrivers import GCommBase
+
+try:
+ import pyro
+except ImportError:
+ print "\nUnable to load pyro. To use the PYRO interface, \n"
+ "please install Pyro from:\n"
+ " http://pyro.sourceforge.net/\n"
+ sys.exit()
+
+
+
+class ClientAdapter(GCommBase.Client):
+ pass
+
+
+class ServerAdapter(GCommBase.Server):
+
+ def raiseException(self, exception, message)
+ raise exception, message
-pass
Index: gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py
diff -u gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py:1.1
gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py:1.2
--- gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py:1.1 Thu Oct 25
19:00:19 2001
+++ gnue/gnue-common/src/commdrivers/xmlrpc/CommDriver.py Fri Oct 26
01:40:45 2001
@@ -2,7 +2,7 @@
# This file is part of GNU Enterprise.
#
# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
+# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
@@ -31,32 +31,50 @@
#
# We provide both a client and a server driver
#
-CLIENT = 1 # ClientDriver
-SERVER = 1 # ServerDriver
+CLIENT = 1 # ClientAdapter
+SERVER = 1 # ServerAdapter
-
+from gnue.common.commdrivers._helpers.AsyncHTTPServer import AsyncHTTPServer
from gnue.common.commdrivers import GCommBase
+import string
-try:
+try:
import xmlrpclib, xmlrpcserver
-except ImportError:
+except ImportError:
print "\nUnable to load xmlrpclib. To use the XML-RPC interface, \n"
"please install xmlrpc from:\n"
" http://www.pythonware.com/products/xmlrpc/\n"
sys.exit()
-
-
-class ClientDriver(GCommBase.BaseClientDriver):
- pass
-
-class ServerDriver(GCommBase.BaseServerDriver):
+#
+#
+#
+class ClientAdapter(GCommBase.Client):
-
+#
+#
+#
+class ServerAdapter(AsyncHTTPServer):
- def raiseException(self, exception, message)
+ def raiseException(self, exception, message, event=None)
raise exception, message
+#
+#
+#
+class ProxyObject(GCommBase.ProxyObject):
+ # Server raised an exception...
+ # Translate the exception into a local python
+ # exception and raise it...
+ def _raiseException(self, data)
+ if data.isGNUeGenerated():
+ name, text = string.split(data.message,': ',1)
+ # TODO: _lookup???
+ exception = _lookup[name]
+ raise exception, text
+ else:
+ # TODO:
+ raise StandardError, data.message
Index: gnue/reports/doc/services.txt
diff -u gnue/reports/doc/services.txt:1.2 gnue/reports/doc/services.txt:1.3
--- gnue/reports/doc/services.txt:1.2 Thu Oct 25 19:00:19 2001
+++ gnue/reports/doc/services.txt Fri Oct 26 01:40:45 2001
@@ -23,5 +23,3 @@
-
-
Index: gnue/reports/src/GRServices.py
diff -u gnue/reports/src/GRServices.py:1.1 gnue/reports/src/GRServices.py:1.2
--- gnue/reports/src/GRServices.py:1.1 Thu Oct 25 01:00:18 2001
+++ gnue/reports/src/GRServices.py Fri Oct 26 01:40:45 2001
@@ -27,3 +27,29 @@
# NOTES:
#
+
+
+ExportedServices = (
+ { 'Module': 'Reports',
+ 'Modules': (,),
+ 'Methods': {
+ 'getReportDefinition': {
+ 'Parameters': (
+ 'location': {
+ 'Description': 'The location of the report',
+ 'Typecast': GTypecast.text } ),
+ 'Returns': GTypecast.text,
+ 'Description' : 'Returns the report definition (in XML format).' },
+ 'getReportHeader': {
+ 'Parameters': (
+ 'location': {
+ 'Description': 'The location of the report',
+ 'Typecast': GTypecast.text } ),
+ 'Typecast': GTypecast.text,
+ 'Description' : 'Returns the report definition (in XML format).' },
+ }
+ 'Exceptions': {
+ 'ReportNotFound' : {
+ 'Description': ''}
+ }
+ } )