Thread View: comp.object.corba
7 messages
7 total messages
Started by Paula DiTallo
Wed, 28 Jun 2000 00:00
extensible structs/interoperability
Author: Paula DiTallo
Date: Wed, 28 Jun 2000 00:00
Date: Wed, 28 Jun 2000 00:00
29 lines
1929 bytes
1929 bytes
Hello Techies! I've just finished drafting a 3-Tier Visibroker/Oracle/Java web installation using VB's caffeine. The operational version works well, however, using vendor-specific extensions like 'extensible structs' strangles the concept of implementation independance. I would like to expose the data in order for other enterprise-wide apps-- some running other ORBs-- without conflict. The complex datatypes such as Vectors and Hashtables have me concerned. I realize that I will need to write IDL wrappers for the java classes in question -- but I am not sure where to start. For example, if I eliminate returning the captured result-sets from ORACLE passed as Vectors in these java classes-- (this should eliminate extensible structures such as AbstractList, etc.) by creating a serializable object -- am I still left with the problem of storing data as an indirect object class that will be unavailable to other implementations? Any suggestions that you have will be very well received!;-} Warm regards, Paula DiTallo ditallop@sprynet.com plditallo@metro-design-dev.com Metropolitan Design and Development, Inc. www.metro-design-dev.com
Re: extensible structs/interoperability
Author: Martin v.Loewis
Date: Wed, 28 Jun 2000 00:00
Date: Wed, 28 Jun 2000 00:00
35 lines
1913 bytes
1913 bytes
In article <8jc0ms$nqt$1@slb6.atl.mindspring.net>,
Paula DiTallo <ditallop@sprynet.com> wrote:
>Any suggestions that you have will be very well received!;-}
I believe there are about three ways to define "variable" data, like
hashtables, in IDL:
1. Use sequences:
struct item{
string key, value; // value may need to be of type any
};
typedef sequence<item> hash;
2. Use an interface:
interface Hash{
string get(in string key);
void set(in string key,string value);
};
3. Use a value type:
valuetype item{
public string key;
public ValueBase value;
};
valuetype hash{
private sequence<item> items;
public ValueBase get(in string key);
public void set(in string key, in ValueBase value);
};
They all differ in the amount of data sent during initial retrieval,
the communication involved during access, and the convenience to the
client when accessing them.
Regards,
Martin
Re: extensible structs/interoperability
Author: Philip Lijnzaad
Date: Wed, 28 Jun 2000 00:00
Date: Wed, 28 Jun 2000 00:00
49 lines
2819 bytes
2819 bytes
On 28 Jun 2000 07:17:18 GMT,
"Martin" == Martin v Loewis <loewis@cs.tu-berlin.de> writes:
Martin> In article <8jc0ms$nqt$1@slb6.atl.mindspring.net>,
Martin> Paula DiTallo <ditallop@sprynet.com> wrote:
>> Any suggestions that you have will be very well received!;-}
Martin> I believe there are about three ways to define "variable" data, like
Martin> hashtables, in IDL:
Martin> 1. Use sequences:
Martin> struct item{
Martin> string key, value; // value may need to be of type any
Martin> };
Martin> typedef sequence<item> hash;
Martin> 2. Use an interface:
Martin> interface Hash{
Martin> string get(in string key);
Martin> void set(in string key,string value);
Martin> };
Martin> 3. Use a value type:
Martin> valuetype item{
Martin> public string key;
Martin> public ValueBase value;
( ^ why not 'any' ?)
Martin> };
this is essentially the same as your struct ...
Martin> valuetype hash{
Martin> private sequence<item> items;
Martin> public ValueBase get(in string key);
Martin> public void set(in string key, in ValueBase value);
Martin> };
... and this is essentially the same as your interface, with the added
inconvenience that the client will have to implement get and set, and that
transmitting all the items maybe impossible due to bandwidth ...
Philip
--
Ban GM foods! Long live the Mesolithicum, pesticides and starvation
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad@ebi.ac.uk \ European Bioinformatics Institute,rm A2-24
+44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53
Re: extensible structs/interoperability
Author: Philip Lijnzaad
Date: Wed, 28 Jun 2000 00:00
Date: Wed, 28 Jun 2000 00:00
37 lines
2386 bytes
2386 bytes
Paula> Hello Techies!
Paula> I've just finished drafting a 3-Tier Visibroker/Oracle/Java web
Paula> installation using VB's caffeine. The operational version works well,
Paula> however, using vendor-specific extensions like 'extensible structs'
Paula> strangles the concept of implementation independance.
The thing to go for, then, is to either
- use anys all over the place
- use some XML convention for passing around data
- use valuetypes, but only as follows:
valuetype foo {
public string stuff;
public long more_stuff;
}
valuetype bar: truncatable foo {
public Object yet_more_stuff;
}
This is mostly implementation independent (in the sense of ORB independent);
the only thing you have to do for the receivers of the valuetype is to
instantiate a separate ValueFactory for foo and each of its sub-type; this is
not done by default by the IDL compilers I know.
For discussion of Vectors and Hashtables, see other posting.
Philip
--
Ban GM foods! Long live the Mesolithicum, pesticides and starvation
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad@ebi.ac.uk \ European Bioinformatics Institute,rm A2-24
+44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53
Re: extensible structs/interoperability
Author: Martin v.Loewis
Date: Wed, 28 Jun 2000 00:00
Date: Wed, 28 Jun 2000 00:00
26 lines
2079 bytes
2079 bytes
In article <u71z1icf9a.fsf@o2-3.ebi.ac.uk>,
Philip Lijnzaad <lijnzaad@ebi.ac.uk> wrote:
>this is essentially the same as your struct ...
No. The essential difference is that you can access a valuetype
on the language level in a polymorphic way, whereas you have to
unpack an any in a much more complicated procedure. Please note
that the subject is "extensible structs" - valuetypes are the
interoperable version of that, not the any type.
>Martin> valuetype hash{
>Martin> private sequence<item> items;
>Martin> public ValueBase get(in string key);
>Martin> public void set(in string key, in ValueBase value);
>Martin> };
>
>... and this is essentially the same as your interface, with the added
>inconvenience that the client will have to implement get and set, and that
>transmitting all the items maybe impossible due to bandwidth ...
No. The essential difference is that all invocations will be local,
as opposed to being remote - which is an essential difference if
you have a large number of items.
Regards,
Martin
Re: extensible structs/interoperability
Author: Philip Lijnzaad
Date: Thu, 29 Jun 2000 00:00
Date: Thu, 29 Jun 2000 00:00
61 lines
3450 bytes
3450 bytes
Martin> In article <u71z1icf9a.fsf@o2-3.ebi.ac.uk>,
Martin> Philip Lijnzaad <lijnzaad@ebi.ac.uk> wrote:
>> this is essentially the same as your struct ...
Martin> No. The essential difference is that you can access a valuetype
Martin> on the language level in a polymorphic way, whereas you have to
Martin> unpack an any in a much more complicated procedure. Please note
Martin> that the subject is "extensible structs" - valuetypes are the
Martin> interoperable version of that, not the any type.
exactly: I am not talking about anys here; you were suggesting to have
valuetype item{
public string key;
public ValueBase value;
}
how does this differ from
struct item{
string key;
any value;
}
apart from the fact that you can extend the valuetype?
Let's not confuse 'extendible structs' (for want of a better term) with hash
tables, even though Perl equates the two (since you can always add something to
your hash^H^H^H^HPerl object by $obj->{more} = q(I'm an extension of $obj)
Martin> valuetype hash{
Martin> private sequence<item> items;
Martin> public ValueBase get(in string key);
Martin> public void set(in string key, in ValueBase value);
Martin> };
>>
>> ... and this is essentially the same as your interface, with the added
>> inconvenience that the client will have to implement get and set, and that
>> transmitting all the items maybe impossible due to bandwidth ...
Martin> No. The essential difference is that all invocations will be local,
Martin> as opposed to being remote - which is an essential difference if
Martin> you have a large number of items.
exactly: transmitting the hashes, if they're big, may not be the right thing
to do.
I guess I'm confused as to what the original poster wanted: extendability
(offered by vendors-specific stuff such as extendible structs, or by using
valuetype inheritence, or hacks such as XML or anys), OR hash tables.
Philip
--
Ban GM foods! Long live the Mesolithicum, pesticides and starvation
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad@ebi.ac.uk \ European Bioinformatics Institute,rm A2-24
+44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53
Re: extensible structs/interoperability
Author: Martin v.Loewis
Date: Thu, 29 Jun 2000 00:00
Date: Thu, 29 Jun 2000 00:00
22 lines
1756 bytes
1756 bytes
In article <u7pup1bdoq.fsf@o2-3.ebi.ac.uk>,
Philip Lijnzaad <lijnzaad@ebi.ac.uk> wrote:
>exactly: I am not talking about anys here; you were suggesting to have
[...]
>struct item{
> string key;
> any value;
^^^
>}
Well, *I* was talking about anys... Extracting the value is much easier
if it is a valuetype, as opposed to being an any.
>Let's not confuse 'extendible structs' (for want of a better term) with hash
>tables, even though Perl equates the two
I'm not sure what the original poster had in mind. In his posting, he
specifically mentioned to use "extensible structs" to transfer some of
the advanced Java container types, and specifically mentioned hash tables.
Regards,
Martin
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads