Problem setting DefaultQoS with Notification Service

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Jani Launonen-3
Hello everyone,

I've quite new to Erlang and haven't had the time to learn it properly as
I'm in bit haste to set up OTP's Notification Service in place of JacORB's
Event Service. So no Erlang is yet involved in our code.

There's an example use of Notification Service at page
http://www.erlang.org/doc/r7b/lib/cosNotification-1.0.2/doc/html/ch_example.html#7.1
which has this code:

        %% Create a new event channel.
        Ch = 'CosNotifyChannelAdmin_EventChannelFactory':
         create_channel(ChFac, DefaultQoS, DefaultAdmin),

The question is, whether there is these DefaultQoS and DefaultAdmin
defined somewhere or are these just put as an place holders here? Or is
there a way to create channel with default QoS/Admin values by some other
function? Page
http://www.erlang.org/doc/r7b/lib/cosNotification-1.0.2/doc/html/ch_QoS.html#6
does say, what the default values are, so these must be hidden somewhere in
the source. I've tried to find out this DefaultQoS (DefaultAdmin) (or
similar) in the source, but failed so far. Could someone help me with this
one as I'm bit confused with the record syntax in Erlang (and especially
those Corba mappings) and haven't succeeded creating default values by myself.

As a bonus question, I'm interested if the Notification Service is
automatically load balanced across Erlang nodes. Can Orber domain used
somehow to distribute load across nodes and machines. You know, I'd smile
like idiot if I could make it run with bunch of Sun E450:s :-). We have
some friendly competition with our VTT (Natinal Research Centre) researchers in
scalability.

Thank you.

-+-+-+-
Jani Launonen             Home: (08) 8802 180/Work: +358 8 553 2810
jabba          Paalikatu 14 A 410
                          90520 OULU
Student. . . . . . . . . .University of Oulu, Dept. of EE
Assistant Researcher . . .Genie of the Net Project



Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Jani Launonen-3
Hello everyone,

previously I had problems setting QoS-parametres - that is now passed.
After trying to circumvent the problem by using java to call
EventChannelFactory:create_channel (which didn't succeed by some weird
problem with JacORB's idl-compiler), I used cut & paste -method from the
sources and after reading little bit manuals and tutorials I could
construct a kind of working record which was accepted by
EventChannelFactory:create_channel. Jesh! There only seems to be problem
with JacORB's understanding of IORs with "wstring inside Anys" - even after
a patch to recent JacORB 1.3.21. This is off topic but just to tell the
status that no one is going to bother with the previous problem.

>[cut introduction]
>
>There's an example use of Notification Service at page
>http://www.erlang.org/doc/r7b/lib/cosNotification-1.0.2/doc/html/ch_example.html#7.1
>which has this code:
>
> %% Create a new event channel.
> Ch = 'CosNotifyChannelAdmin_EventChannelFactory':
>          create_channel(ChFac, DefaultQoS, DefaultAdmin),
>
>The question is, whether there is these DefaultQoS and DefaultAdmin
>defined somewhere or are these just put as an place holders here? Or is
>there a way to create channel with default QoS/Admin values by some other
>function? Page
>http://www.erlang.org/doc/r7b/lib/cosNotification-1.0.2/doc/html/ch_QoS.html#6
>does say, what the default values are, so these must be hidden somewhere in
>the source. I've tried to find out this DefaultQoS (DefaultAdmin) (or
>similar) in the source, but failed so far. Could someone help me with this
>one as I'm bit confused with the record syntax in Erlang (and especially
>those Corba mappings) and haven't succeeded creating default values by myself.
>
>[cut bonus question]

Cheers,

-+-+-+-
Jani Launonen             Home: (08) 8802 180/Work: +358 8 553 2810
jabba          Paalikatu 14 A 410
                          90520 OULU
Student. . . . . . . . . .University of Oulu, Dept. of EE
Assistant Researcher . . .Genie of the Net Project



Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Niclas Eklund-2
On Mon, 30 Apr 2001, Jani Launonen wrote:

> Hello everyone,
> previously I had problems setting QoS-parametres - that is now passed.
> After trying to circumvent the problem by using java to call
> EventChannelFactory:create_channel (which didn't succeed by some weird
> problem with JacORB's idl-compiler), I used cut & paste -method from the
> sources and after reading little bit manuals and tutorials I could
> construct a kind of working record which was accepted by
> EventChannelFactory:create_channel. Jesh! There only seems to be problem
> with JacORB's understanding of IORs with "wstring inside Anys" - even after
> a patch to recent JacORB 1.3.21. This is off topic but just to tell the
> status that no one is going to bother with the previous problem.
>
> >[cut introduction]
> >
> >There's an example use of Notification Service at page
> >http://www.erlang.org/doc/r7b/lib/cosNotification-1.0.2/doc/html/ch_example.html#7.1
> >which has this code:
> >
> > %% Create a new event channel.
> > Ch = 'CosNotifyChannelAdmin_EventChannelFactory':
> >          create_channel(ChFac, DefaultQoS, DefaultAdmin),
> >
> >The question is, whether there is these DefaultQoS and DefaultAdmin
> >defined somewhere or are these just put as an place holders here? Or is
> >there a way to create channel with default QoS/Admin values by some other
> >function? Page
> >http://www.erlang.org/doc/r7b/lib/cosNotification-1.0.2/doc/html/ch_QoS.html#6
> >does say, what the default values are, so these must be hidden somewhere in
> >the source. I've tried to find out this DefaultQoS (DefaultAdmin) (or
> >similar) in the source, but failed so far. Could someone help me with this
> >one as I'm bit confused with the record syntax in Erlang (and especially
> >those Corba mappings) and haven't succeeded creating default values by myself.


Hello!

In the User's Guide (6.1.1) you find a listing of the default QoS-service
settings and the range of each key. If you do not include a certain key
when creating a new channel these will be used and inherited by its
children and grand-children (i.e. Admin's and Proxies).

To be able to help you with your problem regarding the wstrings I need to
know which Orber-version you're using. I've tested sending wchar/wstring
encapsulated within an any-datatype using VisiBroker. Orber have also been
tested using JacORB (I do not know if wchar/wstrings have been included
in these tests). FYI, sending a wstring is more expensive than string's
since each wchar is encoded/decoded as ushort due to that Orber only
support Java Unicode for wchars; CORBA wchar can range from 1 to 4 bytes.

Regards / Nick

_____________________________________________________________
Niclas Eklund, Ericsson Network Core Products, +46-8-72 75765






Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Jani Launonen-3
On Wed, 2 May 2001, Niclas Eklund wrote:

>On Mon, 30 Apr 2001, Jani Launonen wrote:
>> [cut description of ior problem with JacORB]
>> [cut description of original problem]
>
>Hello!
>
>In the User's Guide (6.1.1) you find a listing of the default QoS-service
>settings and the range of each key. If you do not include a certain key
>when creating a new channel these will be used and inherited by its
>children and grand-children (i.e. Admin's and Proxies).

Cripes!? So the default values can be used by calling create_channel with
empty lists as arguments to QoS-settings?! And I thought that I had tried
that out already. Apparently not. Maybe this should be spelled out
somewhere in the Guide for novices like me :-). Well, on the positive side,
I should have learned the records syntax anyway in the near future.

>To be able to help you with your problem regarding the wstrings I need to
>know which Orber-version you're using. I've tested sending wchar/wstring
>encapsulated within an any-datatype using VisiBroker. Orber have also been
>tested using JacORB (I do not know if wchar/wstrings have been included
>in these tests). FYI, sending a wstring is more expensive than string's
>since each wchar is encoded/decoded as ushort due to that Orber only
>support Java Unicode for wchars; CORBA wchar can range from 1 to 4 bytes.

Orber version is 3.2.2. Frankly, I don't know for sure, that the wstrings
are to blame, but Mr. Bj?rn Wingman have encountered the same problem (
http://lists.spline.inf.fu-berlin.de/mailman/htdig/jacorb-developer/2001-February/001539.html
). Before I applied the fix for JacORB 1.3.21 fix for TypeCode (
http://jacorb.inf.fu-berlin.de/problemscontents.html ) the symptoms were
the same as Bj?rn had. After the patch, dior (dump ior) reports little bit
different problem. Here's what the dior has to say about channel's ior:

        JacORB V 1.3.21, www.jacorb.org
        (C) Gerald Brose, FU Berlin, 28 March 2001
------IOR components-----
TypeId  :       IDL:omg.org/CosNotifyChannelAdmin/EventChannel:1.0
TAG_INTERNET_IOP Profiles:
        Profile Id   :          IIOP Version :  1.1
        Host    :       130.231.48.51
        Port    :       4001
        Object key (hex):    0x4F 52 42 45 52 83 68 06 6D 00 00 00 32 49 44
4C 3A 6F 6D 67 2E 6F 72 67 2F 43 6F 73 4E 6F 74 69 66 79 43 68 61 6E 6E 65
6C 41 64 6D 69 6E 2F 45 76 65 6E 74 43 68 61 6E 6E 65 6C 3A 31 2E 30 64 00
03 6B 65 79 6D 00 00 00 25 83 68 02 68 03 62 00 00 03 DC 62 00 0C A2 89 62
00 01 02 BA 64 00 0E 61 40 74 6B 31 31 2E 6F 75 6C 75 2E 66 69 6D 00 00 00
0D 83 64 00 09 75 6E 64 65 66 69 6E 65 64 6D 00 00 00 0D 83 64 00 09 75 6E
64 65 66 69 6E 65 64 6D 00 00 00 0D 83 64 00 09 75 6E 64 65 66 69 6E 65 64
TAG_MULTIPLE_COMPONENTS Profiles:
        CodeSet Component Info:
                ForChar native code set Id: ISO8859_1
                Char Conversion Code Sets:              ForWChar native
code set Id: Unknown TCS: 3e8
                WChar Conversion Code Sets:

So it seems that something is still wrong with the wstrings? I haven't had
chance to try decode this ior with anything else besides JacORB's dior.
Could there still be problem with JacORB or is the ior corrupted by Orber?
Here's the ior just for sure, if you want to try it for yourself:

IOR:000303030000003349444c3a6f6d672e6f72672f436f734e6f746966794368616e6e656c41646d696e2f4576656e744368616e6e656c3a312e3000010000000200000000000000c8000101010000000e3133302e3233312e34382e3531000fa1000000a54f524245528368066d0000003249444c3a6f6d672e6f72672f436f734e6f746966794368616e6e656c41646d696e2f4576656e744368616e6e656c3a312e306400036b65796d00000025836802680362000003dc62000ca28962000102ba64000e6140746b31312e6f756c752e66696d0000000d83640009756e646566696e65646d0000000d83640009756e646566696e65646d0000000d83640009756e646566696e656403030300000000000000010000002400030303000000010000000100000014000303030001000100000000000003e800000000

>Regards / Nick
>
>_____________________________________________________________
>Niclas Eklund, Ericsson Network Core Products, +46-8-72 75765

Cheers,

-+-+-+-
Jani Launonen             Home: (08) 8802 180/Work: +358 8 553 2810
jabba          Paalikatu 14 A 410
                          90520 OULU
Student. . . . . . . . . .University of Oulu, Dept. of EE
Assistant Researcher . . .Genie of the Net Project



Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Niclas Eklund-2
On Wed, 2 May 2001, Jani Launonen wrote:
> [cut plenty]
> Orber version is 3.2.2. Frankly, I don't know for sure, that the wstrings
> are to blame, but Mr. Bj?rn Wingman have encountered the same problem (
> http://lists.spline.inf.fu-berlin.de/mailman/htdig/jacorb-developer/2001-February/001539.html
> ). Before I applied the fix for JacORB 1.3.21 fix for TypeCode (
> http://jacorb.inf.fu-berlin.de/problemscontents.html ) the symptoms were
> the same as Bj?rn had. After the patch, dior (dump ior) reports little bit
> different problem. Here's what the dior has to say about channel's ior:

I assume the result is a INV_OBJREF exception?!
The Code Set Id have been changed (Orber-3.2.3). Update to:

orber_iiop.hrl: -define(ISO_10646_UCS_2_ID, 16#00010100).

Now it should work.

Regards / Nick


>         JacORB V 1.3.21, www.jacorb.org
>         (C) Gerald Brose, FU Berlin, 28 March 2001
> ------IOR components-----
> TypeId  :       IDL:omg.org/CosNotifyChannelAdmin/EventChannel:1.0
> TAG_INTERNET_IOP Profiles:
>         Profile Id   :          IIOP Version :  1.1
>         Host    :       130.231.48.51
>         Port    :       4001
>         Object key (hex):    0x4F 52 42 45 52 83 68 06 6D 00 00 00 32 49 44
> 4C 3A 6F 6D 67 2E 6F 72 67 2F 43 6F 73 4E 6F 74 69 66 79 43 68 61 6E 6E 65
> 6C 41 64 6D 69 6E 2F 45 76 65 6E 74 43 68 61 6E 6E 65 6C 3A 31 2E 30 64 00
> 03 6B 65 79 6D 00 00 00 25 83 68 02 68 03 62 00 00 03 DC 62 00 0C A2 89 62
> 00 01 02 BA 64 00 0E 61 40 74 6B 31 31 2E 6F 75 6C 75 2E 66 69 6D 00 00 00
> 0D 83 64 00 09 75 6E 64 65 66 69 6E 65 64 6D 00 00 00 0D 83 64 00 09 75 6E
> 64 65 66 69 6E 65 64 6D 00 00 00 0D 83 64 00 09 75 6E 64 65 66 69 6E 65 64
> TAG_MULTIPLE_COMPONENTS Profiles:
>         CodeSet Component Info:
>                 ForChar native code set Id: ISO8859_1
>                 Char Conversion Code Sets:              ForWChar native
> code set Id: Unknown TCS: 3e8
>                 WChar Conversion Code Sets:
>
> So it seems that something is still wrong with the wstrings? I haven't had
> chance to try decode this ior with anything else besides JacORB's dior.
> Could there still be problem with JacORB or is the ior corrupted by Orber?
> Here's the ior just for sure, if you want to try it for yourself:


_____________________________________________________________
Niclas Eklund, Ericsson Network Core Products, +46-8-72 75765




Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Jani Launonen-3
On Thu, 3 May 2001, Niclas Eklund wrote:

>> [cut cut cut]
>
>I assume the result is a INV_OBJREF exception?!
>The Code Set Id have been changed (Orber-3.2.3). Update to:
>orber_iiop.hrl: -define(ISO_10646_UCS_2_ID, 16#00010100).

You're absolutely right. Any JacORB client trying to make contact with the
event channel, throws org.omg.CORBA.UNKNOWN: NV_OBJREF. Unfortynately the
fix didn't do the trick - I compiled the whole otp R7B-2 with this update
to orber_iiop.hrl, but the problem persists. Only this time the dior
reports bit differently:
"... ForChar native code set Id: ISO8859_1
                Char Conversion Code Sets:              ForWChar native
code set Id: Unknown TCS: 10100
                WChar Conversion Code Sets:
"

instead of
"...
>                 ForChar native code set Id: ISO8859_1
>                 Char Conversion Code Sets:              ForWChar native
> code set Id: Unknown TCS: 3e8
>                 WChar Conversion Code Sets:
"

Maybe the whole orber should be replaced with newer one?

>Niclas Eklund, Ericsson Network Core Products, +46-8-72 75765
>
>

-+-+-+-
Jani Launonen             Home: (08) 8802 180/Work: +358 8 553 2810
jabba          Paalikatu 14 A 410
                          90520 OULU
Student. . . . . . . . . .University of Oulu, Dept. of EE
Assistant Researcher . . .Genie of the Net Project



Reply | Threaded
Open this post in threaded view
|

Problem setting DefaultQoS with Notification Service

Niclas Eklund-2
On Thu, 3 May 2001, Jani Launonen wrote:
> On Thu, 3 May 2001, Niclas Eklund wrote:
>
> [cut cut cut]
> >
> You're absolutely right. Any JacORB client trying to make contact with the
> event channel, throws org.omg.CORBA.UNKNOWN: NV_OBJREF. Unfortynately the
> fix didn't do the trick - I compiled the whole otp R7B-2 with this update
> to orber_iiop.hrl, but the problem persists.
The Id should be 16#00010109 (I missed the '9' in the end. Sorry).

There are however two 'known problem' regarding wchars; you cannot use
IIOP-1.2 and the CodeSet struct is missplaced (the OMG updated the spec
and clearfied its location) in the IOR. The former "problem" on purpose.
This wasn't a specific Orber problem since other ORB-vendors interpreted
the initial spec in the same way. However, the spec states that if no
CodeSet is found 16#00010109 should be used as fallback.

> Maybe the whole orber should be replaced with newer one?
Yes, it should be, especially since later versions comes with:

* improved/faster Inter-ORB communication (IIOP)
* less IFR register/unregister overhead (oe_register/oe_unregister)
* a few fixes for IIOP-1.2
* all systems exceptions added to the documentation.
* a new config variable orber_debug_level which makes it a lot easier to
  check what fails.

Regards / Nick

> -+-+-+-
> Jani Launonen             Home: (08) 8802 180/Work: +358 8 553 2810
> jabba          Paalikatu 14 A 410
>                           90520 OULU
> Student. . . . . . . . . .University of Oulu, Dept. of EE
> Assistant Researcher . . .Genie of the Net Project


_____________________________________________________________
Niclas Eklund, Ericsson Network Core Products, +46-8-72 75765