Ventuz Technology Group Forum  

Ventuz Forums » Ventuz » Feature Request... » Re: Suggestion for SetProperties (Ventuz .Net Remoting)

Re: Suggestion for SetProperties (Ventuz .Net Remoting)
Started by Desired Username at 06-05-2009 10:54. Topic has 5 replies.

Print Search « Previous Thread Next Thread »
  06-05-2009, 10:54
Desired Username is not online. Last active: 12.06.2009 12:18:26 Desired Username



Top 25 Posts
Joined on 02-06-2007
Germany
Posts 55
Suggestion for SetProperties (Ventuz .Net Remoting)
Hi,
currently SetProperties and similar methods require two arrays which must kept in sync:
Public Sub SetProperties ( _
	names As String(), _
values As Object() _
)
This has always struck me as not very "pretty."

I would like to suggest that you add overloads using some form of list instead of the two arrays.

For example, something maybe like this (in VB.Net):
Public Sub SetProperties(ByRef TheData As Dictionary(Of String, Object))
Dim MaxIndex As Integer = TheData.Count - 1
  If MaxIndex > -1 Then
   Dim Entry As KeyValuePair(Of String, Object)
  Dim Names(MaxIndex) As String
    Dim Values(MaxIndex) As Object
    Dim Index As Integer = 0
    For Each Entry In TheData
      Names(Index) = Entry.Key
      Values(Index) = Entry.Value
      Index += 1
    Next
    Scene.SetProperties(Names, Values)
  End If
End Sub

Just an idea...


Greetings from a sunny Munich morning...





															
   Report 
  06-06-2009, 20:02
Ralf Stanke is not online. Last active: 31.08.2010 07:02:40 Ralf Stanke



Top 10 Posts
Joined on 05-15-2005
Hamburg, Germany
Posts 567
Re: Suggestion for SetProperties (Ventuz .Net Remoting)
Hi Desired Munich Name,

the reason why we chose to use two array is that the default .net serialisation used for transferring the argument via the network has a much higher overhead if complex classes (like a Dictionary) is serialized.
But you could "wrap" this call with anonother, more comfortable method which is executed locally to prepare the two arrays.

Ralf

   Report 
  06-12-2009, 15:28
Desired Username is not online. Last active: 12.06.2009 12:18:26 Desired Username



Top 25 Posts
Joined on 02-06-2007
Germany
Posts 55
Re: Suggestion for SetProperties (Ventuz .Net Remoting)
Ralf> the default .net serialisation used for transferring the
Ralf> argument via the network has a much higher overhead
Ralf> if complex classes (like a Dictionary) is serialized.

I understand, but I do not comprehend... Big Smile [:D]

I have written my own wrappers and thought it might be a good idea to include something like this as an overload in the Ventuz remoting .dll used by the control application. The actual communication would still be using two arrays.

It would, imho, make the remoting API a bit more comfortable.

   Report 
  06-12-2009, 15:55
Ralf Stanke is not online. Last active: 31.08.2010 07:02:40 Ralf Stanke



Top 10 Posts
Joined on 05-15-2005
Hamburg, Germany
Posts 567
Re: Suggestion for SetProperties (Ventuz .Net Remoting)
the entire Remoting part in Ventuz will be revised anyway! It will become some kind of SDK where you (ort 3rd parties) can implement their own protocols (eg Chyron's I³)
All commands will come along with a timecode when these command have to be execute for example.
And more...
exprect this within the next 3-4 months. The old version will be kept available for compatibility reasons.

Cheers

Ralf

   Report 
  06-12-2009, 15:59
Desired Username is not online. Last active: 12.06.2009 12:18:26 Desired Username



Top 25 Posts
Joined on 02-06-2007
Germany
Posts 55
Re: Suggestion for SetProperties (Ventuz .Net Remoting)
...interesting... ...veerrryyyy interesting...

I look forward to seeing the new interface.

   Report 
  06-12-2009, 22:04
Wykid is not online. Last active: 10.06.2009 13:01:10 Wykid

Top 500 Posts
Joined on 06-10-2009
Posts 2
Re: Suggestion for SetProperties (Ventuz .Net Remoting)
Excellent! My next feature request post was going to concern the inability to accurately time sequence a bulk of remote commands. Sounds like this might be what I'm looking for! Looking forward to checking it out.
   Report