473,387 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Suitability of custom formatting for interoperability

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 1526
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
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 #5

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

Similar topics

1
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...
3
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...
1
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...
4
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");...
4
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...
6
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...
2
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...
4
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.