473,549 Members | 5,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Suitability of custom formatting for interoperabilit y

Hi,

I'm developing an application server to which clients will connect over the
network. This server has a variety of entry points, and remoting seems well
suited for those clients written in .NET.

However there are two simple functions that will be accessed from unmanaged
C++, and possibly Java one day. For these I'm considering utilising a
straightforward custom binary protocol. The C++/Java client can open a
socket, send request bytes, then marshal the returned bytes into a local
structure.

I'm comfortable setting up the .NET-to-.NET portion, but am not sure how to
go about the interop bit. Do I create another remoting entry-point on a
TcpChannel that has it's own binary formatter? If so, what overhead does
remoting add to the underlying socket stream? I'm trying to establish
whether I can leverage the server support of IIS rather than write my own
asynchronous TcpListener server. If I can get remoting to work for simple
requests (that return simple structures, such as arrays of floats, strings,
etc, all of which are in an agreed upon structure and hence need not be self
describing or extensible) without adding many more bytes to the stream than
those I control with my FormatterSinks, then coding the equivalent formatter
in C++/Java should be easy.

Hope this makes sense and that someone can help me out of my confusion here.

Kind regards,

Drew Noakes.
Oct 14 '05 #1
4 1539
Hi,
I'm comfortable setting up the .NET-to-.NET portion, but am not sure how to
go about the interop bit. Do I create another remoting entry-point on a
TcpChannel that has it's own binary formatter? If so, what overhead does
remoting add to the underlying socket stream? I'm trying to establish
whether I can leverage the server support of IIS rather than write my own
asynchronous TcpListener server. If I can get remoting to work for simple
requests (that return simple structures, such as arrays of floats, strings,
etc, all of which are in an agreed upon structure and hence need not be self
describing or extensible) without adding many more bytes to the stream than
those I control with my FormatterSinks, then coding the equivalent formatter
in C++/Java should be easy.


..NET-Remoting is only suitable for .NET to .NET communications.
Everything else is a world of pain. You're wasting your time.

Use web services (if your non-.NET clients are able to
act as a web service client) or a simple socket server.

Rob
Oct 14 '05 #2
> I'm comfortable setting up the .NET-to-.NET portion, but am not sure how
to
go about the interop bit. Do I create another remoting entry-point on a
TcpChannel that has it's own binary formatter? If so, what overhead does uh?
you can't do remoting with C++ / Java. Remoting is .NET specific.
You haver to use a platform neutral communication protocol for that.
Some people choose home made binary format protocol (which would be entirely
up to you,
down to every single bit), most people choose an existing such protocol:
- WebServices
- XmlRpc
- Corba
- HTTP

WebService has an excellent support in .NET.
And a somewhat acceptable support in other languages.
remoting add to the underlying socket stream? I'm trying to establish
whether I can leverage the server support of IIS rather than write my own

you can leverage IIS for WebServices
Oct 14 '05 #3
Ok, I'll try out the custom binary format over a socket. We don't want to
use web services.

If I understand correctly, you're telling me that even if I write custom
message formatters (using the same binary format as a socket implementation)
the remoting framework adds sufficient extra bytes (header/footer) and/or
additional signaling/handshaking as to make calling these functions
prohibitiviely difficult. Bear in mind that I don't need any
CAO/MarshalByRef functionality -- just an entry point for RPC (singleton SAO).

Is this the case?

Thanks,

Drew.

"Robert Jordan" wrote:
Hi,
I'm comfortable setting up the .NET-to-.NET portion, but am not sure how to
go about the interop bit. Do I create another remoting entry-point on a
TcpChannel that has it's own binary formatter? If so, what overhead does
remoting add to the underlying socket stream? I'm trying to establish
whether I can leverage the server support of IIS rather than write my own
asynchronous TcpListener server. If I can get remoting to work for simple
requests (that return simple structures, such as arrays of floats, strings,
etc, all of which are in an agreed upon structure and hence need not be self
describing or extensible) without adding many more bytes to the stream than
those I control with my FormatterSinks, then coding the equivalent formatter
in C++/Java should be easy.


..NET-Remoting is only suitable for .NET to .NET communications.
Everything else is a world of pain. You're wasting your time.

Use web services (if your non-.NET clients are able to
act as a web service client) or a simple socket server.

Rob

Oct 14 '05 #4
Hi,
Ok, I'll try out the custom binary format over a socket. We don't want to
use web services.

If I understand correctly, you're telling me that even if I write custom
message formatters (using the same binary format as a socket implementation)
the remoting framework adds sufficient extra bytes (header/footer) and/or
additional signaling/handshaking as to make calling these functions
prohibitiviely difficult. Bear in mind that I don't need any
CAO/MarshalByRef functionality -- just an entry point for RPC (singleton SAO).
Writing a custom formatter won't solve your problem. You'd also need
something like a TcpChannel on the other side, which must be
ideally interoperable with MSFT's TcpChannel, of course.

SAO/CAO are not the problem here, because they share the infrastructure.

If your really want to pull out your hairs in the next months,
you may try this:

- implement a custom formatter for .NET,
- implement a custom TCP channel for .NET
- implement the couterparts for Java
- implement the couterparts for C++, if you still have some hairs ;-)

Rob

Is this the case?

Thanks,

Drew.

"Robert Jordan" wrote:

Hi,

I'm comfortable setting up the .NET-to-.NET portion, but am not sure how to
go about the interop bit. Do I create another remoting entry-point on a
TcpChannel that has it's own binary formatter? If so, what overhead does
remoting add to the underlying socket stream? I'm trying to establish
whether I can leverage the server support of IIS rather than write my own
asynchrono us TcpListener server. If I can get remoting to work for simple
requests (that return simple structures, such as arrays of floats, strings,
etc, all of which are in an agreed upon structure and hence need not be self
describing or extensible) without adding many more bytes to the stream than
those I control with my FormatterSinks, then coding the equivalent formatter
in C++/Java should be easy.


..NET-Remoting is only suitable for .NET to .NET communications.
Everything else is a world of pain. You're wasting your time.

Use web services (if your non-.NET clients are able to
act as a web service client) or a simple socket server.

Rob

Oct 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6725
by: E J | last post by:
Does anyone know of a way to wrap custom tags around selected text using execCommand or otherwise? I am developing a rich text editor for use in a web site and while there are a few decent ones already floating around I need to implement a few extra bits of functionality. Specifically tool tips. Idealy I'd like to wrap custom tags around...
3
3295
by: Wiktor Zychla | last post by:
I would like to be able to convert enums to their string representation but I would like to be able to apply a custom formatting, so that I could write for example: enum E { a, b, c }; string s1 = E.a.ToString( "d" ); // returns for example 'a' string s2 = E.a.ToString( "f" ); // returns for example 'this is an enum value a'
1
1641
by: glenn | last post by:
I have written as a test a customer class that has all the necessary field handling and formatting routines in it that I need. I have dataaccess class that controls reading and writing the class into the database. However, I am now getting to the user interface layer and a little confused as to where to head next. What I would like to do...
4
1744
by: ChrisB | last post by:
Hello: I was wondering if there might be a more efficient way to handle number formatting over a range of values: switch(DecimalPlaces) { case 1: formattedResult = result.ToString(".0"); break;
4
269
by: drewnoakes | last post by:
Hi, I'm developing an application server to which clients will connect over the network. This server has a variety of entry points, and remoting seems well suited for those clients written in .NET. However there are two simple functions that will be accessed from unmanaged C++, and possibly Java one day. For these I'm considering...
6
2316
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without having to do a httpwebreqeust call.
2
1461
by: rickholt | last post by:
Many years ago at IBM we had a text formatting language (DCF) which let you specify all sorts of microcommands to a page formatter. Not particularly exciting, but it was also a primitive programming language and you could write your own GML tags (commands). In fact, you could create a form or specification or any standard format by defining...
4
6440
by: Val | last post by:
I have a complex object that I need to serialize. Rather than rely on a standard routine, which is called during the serialization/deserialization, I would like to be able to use my own functions that would convert this object into a string and would then write that string to a file. Upon deserialization, I need to be able to call another...
2
11887
Pittaman
by: Pittaman | last post by:
Hello I am creating some crystal reports (for visual studio 2005) based on the content of certain .NET objects. I'm doing this in .NET 2.0. For one of them I'm using a Cross-table to summarize the information of a bunch of objects. The actual data is numeric. Since these reports are meant to be flexible number formatting must be configured...
0
7526
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7455
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7723
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7962
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7814
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5373
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5092
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.