Questions about Remoting
Questions about Remoting
Questions about Remoting
Questions about Remoting
Questions about Remoting
Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting
Questions about Remoting Questions about Remoting
Questions about Remoting
Go Back  Xtreme Visual Basic Talk > > > Questions about Remoting


Reply
 
Thread Tools Display Modes
  #1  
Old 06-04-2009, 10:33 AM
ayman metwally ayman metwally is offline
Centurion
 
Join Date: Aug 2005
Location: Egypt - Cairo
Posts: 127
Default Questions about Remoting


Greetings to you all,

I'm focusing on Networking programming and I had found something that was very interesting to me in Remoting, which is the ability to have some how a "shared global variable accross applications" ... Here's a quick example of what I'm saying (which is stripped and modified from one found example on internet):


In the Remoting class:

Code:
Namespace remoteclass
	Public Class xx
        Inherits MarshalByRefObject

        Public Shared_Var As String 'This is our share variable

	End Class
End Namespace
In the Client code:

Code:
Namespace remoteclient
	Public Partial Class Form1
		Inherits Form

		Private obj As remoteclass.xx = New remoteclass.xx()

		Public Sub New()
            InitializeComponent()
            obj = CType(Activator.GetObject(GetType(remoteclass.xx), "tcp://127.0.0.1:8085/test"), remoteclass.xx)

        End Sub

         Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
            obj.Shared_Var= Me.TextBox4.Text ' This variable is updated whenever any client changes it
        End Sub
    
    End Class
End Namespace
I found that I can eaisly use this variable (Shared_Var) acrross all application clients without any extra line of code to update its value ... without using even what is called "singlecall" and "sigletron".

But I have concerns:

1) This is only applicable for simple types of variables (e.g. string and integer) but an array or DataTable for example are not updated! and I don't know why!!

2) Would that load the communication network (I mean the content of these shared variables (few KBs to 1MB) will always be communicated across machines all the time without any management) ... Actually I don't how this works from inside, Does it update on change or cyclic ...

3) And finally, can I found something like this in WCF?

Thanks and best regards
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Questions about Remoting
Questions about Remoting
Questions about Remoting Questions about Remoting
Questions about Remoting
Questions about Remoting
Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting Questions about Remoting
Questions about Remoting
Questions about Remoting
 
Questions about Remoting
Questions about Remoting
 
-->