- 0
How to pass not basic types using .NET remoting?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By James W. · Posted
Chinese? It sounds extremely dangerous. I’ll reconsider buying a Meta Quest 3. -
By sssplus · Posted
- What's your salary? Is it more than $100k a year? - Nah, it's $100 mil a year. -
By Slugsie · Posted
Compared to my ear buds which are the size of a matchbox, cover a much broader frequency range, and work everywhere without setup? Yeah, still not buying this as a replacement. -
By Hamid Ganji · Posted
Meta's Superintelligence team staffed by 50% Chinese talent, 40% ex-OpenAI by Hamid Ganji Mark Zuckerberg's latest big bet at Meta involves building a team of the best AI superstars in the market to lead the so-called Superintelligence Labs. The goal of this team is to develop AI models that will ultimately lead to Artificial General Intelligence (AGI). AGI refers to an AI model with capabilities comparable to, or even beyond, those of the human brain. Achieving human-level cognitive abilities with an AI model requires substantial investments, as well as hiring the best talent to build such a system. That's why Meta is throwing hundreds of millions of dollars at AI researchers from OpenAI, Apple, and other companies to recruit them for its Superintelligence team. A user on X has now shared a spreadsheet that provides us with some unique insights into Meta's Superintelligence team and the origins of its 44 employees. The leaker claims this information comes from an anonymous Meta employee. The listing claims that 50 percent of the staff at the Superintelligence team are from China, which demonstrates the significant role of Chinese or Chinese-origin researchers in Met's AI efforts. Additionally, 75 percent of these staff hold PhDs, and 70 percent of them work as researchers. Interestingly, 40 percent of the staff are ex-OpenAI employees whom Mark Zuckerberg poached from the maker of ChatGPT. Additionally, 20 percent of Meta's Superintelligence team members come from Google DeepMind, and another 15 percent come from Scale AI, a startup that Meta recently acquired in a $15 billion deal. Another interesting point is that 75 percent of the Superintelligence team are first-generation immigrants. The leaker claims that each of these employees is now earning between $10 million and $100 million per year, although Meta still needs to confirm these substantial figures. However, it has already been reported that Meta is offering up to $100 million in signup bonuses to poach the best AI talent from OpenAI and other rivals. The revelation that half of Meta's Superintelligence team consists of Chinese nationals could trigger concerns within the Trump administration and Congress. -
By dustojnikhummer · Posted
From a quick Google it seems 6GHz is optional on 802.11be. Ubiquiti has one, Unifi U7 Lite.
-
-
Recent Achievements
-
nobody9 earned a badge
First Post
-
Ricky Chan earned a badge
One Month Later
-
leoniDAM earned a badge
First Post
-
Ian_ earned a badge
Reacting Well
-
Ian_ earned a badge
One Month Later
-
-
Popular Contributors
-
Tell a friend
Question
nigor
Consider this simple server-client implemintation:
Server:
---------
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
namespace Server
{
class Program
{
static void Main(string[] args)
{
TcpChannel tcpChannel = new TcpChannel(1024);
ChannelServices.RegisterChannel(tcpChannel, false);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(ServerInterface.ServerInterface),
"Server", WellKnownObjectMode.SingleCall);
}
}
}
Server interface library:
----------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace ServerInterface
{
public class ServerInterface: MarshalByRefObject
{
public void ShowFileInfo(string filename)
{
MessageBox.Show(filename);
}
public void ShowFileInfo(FileInfo fileInfo)
{
MessageBox.Show(fileInfo.Name);
}
}
}
Client:
--------
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.IO;
namespace Client
{
class Program
{
static void Main(string[] args)
{
TcpChannel tcpChannel = new TcpChannel();
ChannelServices.RegisterChannel(tcpChannel, false);
RemotingConfiguration.RegisterWellKnownClientType(
typeof(ServerInterface.ServerInterface),
"tcp://www.server-ip.com/Server");
ServerInterface.ServerInterface server = new ServerInterface.ServerInterface();
server.ShowFileInfo("C:\\test.txt"); // works
server.ShowFileInfo(new FileInfo("C:\\test.txt")); // hangs
}
}
}
-------------------------------------------------------------------
In my experimenting with .Net remoting, it seems that I can only pass simpe types from server to client, ie. strings, ints, enums, and my own types. Every single tutorial I read involves simple types, even the C# book I have which has quite a lot on .NET remoting. In the above example, ShowFileInfo for a FileInfo type would fail. And from what I read on the internet, it will happen because FileInfo, when passed from client to server, would have no meaning on the server, because its a pointer that points to a memory location on the client machine. But FileInfo derives from FileSystemInfo that derives from MarshalByRefObject. So the server, when receiving such an ojbect, would realize that its a pointer, yes, but a pointer that only has a meaning on the client machine, so in order to use it the server must communicate with the client, isnt that the whole idea of .net remoting?
If you run the above programs on the same machine, using "tcp://localhost/Server" in the call to RegisterWellKnownClientType, you will see that both calls to ShowFileInfo would work. If you move the server to a different machine, only the call to ShowFileInfo that accepts the string type parameter would work, the other one would hang for 30 secs and then you would get an exception saying "the client failed to respond within a reasonable time" or something.
Please help. Attached is a VS2005 source.
remoting_test.zipFetching info...
Link to comment
https://www.neowin.net/forum/topic/482710-how-to-pass-not-basic-types-using-net-remoting/Share on other sites
1 answer to this question
Recommended Posts