Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

M/Wire question

58 views
Skip to first unread message

Valeriu Gontia

unread,
Sep 9, 2011, 2:11:51 AM9/9/11
to
Hello.

M/Wire question.
I made M/Wire its two functions and try to work with them.
On a Windows client application in VB using the socket.

The code for the server side:
; ***************
cmdLocalSet(input)
; m.LocalSet "localvar", "This is a test for locall set ..."
n $zt s $zt="zgoto "_$zl_":trap^%mwire"
s gtmbuild("Variable")=$p(input,$c(0),1)
s gtmbuild("Value")=$p(input,$c(0),2)
s @gtmbuild("Variable")=gtmbuild("Value")
; s response="+OK"_endseparator
; w response
k gtmbuild("Variable"),gtmbuild("Value")
q
;***************
cmdLocalGet(input)
; Dim Var as String
; Var=m.LocalGet "localvar"
; MsgBox Var
n $zt s $zt="zgoto "_$zl_":trap^%mwire"
s gtmbuild("Variable")=input
s gtmbuild("Value")=@gtmbuild("Variable")
w gtmbuild("Value")_endseparator
q
;
;****************


Client-side code:
'***************
Private Sub Command2_Click()
m.LocalSet "localvar", "This test by locall set ..."
End Sub
'**************
Private Sub Command3_Click()
Dim Ret As String
For i = 1 To 20
Ret = Ret & m.LocalGet("localvar") & vbCrLf
Next i
MsgBox Ret
End Sub
'**************
All is well for a single treatment, but with multiple velocity is very
small. I receive this code within 5 seconds.
And such a small velocity is obtained by repeated trips to the server
in all cases.
Why is this happening?

Thanks

Valeriu Gontia

unread,
Oct 15, 2011, 1:30:26 AM10/15/11
to
I have not received an answer to this question.
I also tried this code to run on the Cache,
but the cycle of 5,000 calls.
The result surprised me! 2 seconds ...
'------------------------------------
Private Sub Command3_Click()
Dim Var As String
Var = ""
For i = 1 To 5000
Var = Var & m.LocalGet("localvar") & vbCrLf
Next i
MsgBox Var
End Sub
'------------------------------------------

So it's not the fault of M / Wire!
This work socket (xnetd) can not get the speed
When called in a loop.
This is observed when using the native (internal)
socket GT.M

When a call is no question, everything works fine large volume of
data in a fraction of seconds. But with many challenges - the
trouble ...

Maybe it cost to fix the developers.
I really wanted to get the same results as in Cache ...

Thank you.

Valeriu Gontia

unread,
Oct 15, 2011, 1:49:29 AM10/15/11
to
On 15 окт, 08:30, Valeriu Gontia <gontia...@gmail.com> wrote:
> On 9 ÓÅÎ, 09:11, Valeriu Gontia <gontia...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Hello.
>
> > M/Wire question.
> > I made M/Wire its two functions and try to work with them.
> > On a Windows client application in VB using the socket.
>
> > The code for the server side:
> > ; ***************
> > cmdLocalSet(input)
> > š; m.LocalSet "localvar", "This is a test for locall set ..."
> > šn $zt s $zt="zgoto "_$zl_":trap^%mwire"
> > šs gtmbuild("Variable")=$p(input,$c(0),1)
> > šs gtmbuild("Value")=$p(input,$c(0),2)
> > šs @gtmbuild("Variable")=gtmbuild("Value")
> > š; s response="+OK"_endseparator
> > š; w response
> > šk gtmbuild("Variable"),gtmbuild("Value")
> > šq
> > š;***************
> > cmdLocalGet(input)
> > š; Dim Var as String
> > š; Var=m.LocalGet "localvar"
> > š; MsgBox Var
> > šn $zt s $zt="zgoto "_$zl_":trap^%mwire"
> > šs gtmbuild("Variable")=input
> > šs gtmbuild("Value")=@gtmbuild("Variable")
> > šw gtmbuild("Value")_endseparator
> > šq
> > š;
I forgot to clarify.
This last code I had on my old
the laptop. A good result for Cache Socket! : (
I am very sorry for GT.M. I have great respect and love this database.
What can I do? Maybe my approach is not true test?
I am very hopeful for a positive outcome in the future. ;)

Thank you.

Valeriu Gontia

unread,
Oct 18, 2011, 2:29:21 AM10/18/11
to
Apparently the answer to my question i do not get ...
The question at the expense of the sockets in GT.M worried me earlier.
I understand that there is a contrast to other M-Systems (Cache, M21,
MSM) and even
raised the question in this forum

http://groups.google.com/group/comp.lang.mumps/browse_thread/thread/3177934609449087/3df5abcd5e975abf?lnk=gst&q=#3df5abcd5e975abf

I was advised to use xned.
But the question remains, what i said above at the expense of speed
(braking) with repeated calls.

thank you
0 new messages