Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Variable Syncing Problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andy Luong  
View profile  
 More options Apr 22 2012, 11:06 am
From: Andy Luong <aluon...@gmail.com>
Date: Sun, 22 Apr 2012 08:06:20 -0700 (PDT)
Local: Sun, Apr 22 2012 11:06 am
Subject: Variable Syncing Problem
I am trying to change the value of a variable from the server side. It
seems like when I print the value of the client's variable on the
server, the value is changing. However, the client doesn't get the
change. Creating new variables seems to sync fine, but overwriting
existing data doesn't seem to sync to the client.

Here is a link to my two pieces of a code: server.js and index.html

http://www.notey.it/n/ZHc

I found a work around of making a function on the client to change the
value, but it seems to defeat variable syncing if I do that.

-Andy


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nate Morse  
View profile  
 More options Apr 23 2012, 1:50 pm
From: Nate Morse <morse.n...@gmail.com>
Date: Mon, 23 Apr 2012 13:50:59 -0400
Local: Mon, Apr 23 2012 1:50 pm
Subject: Re: [NowJS] Variable Syncing Problem
Actually I have noticed that, the very first server-side assignment to
now.test does synchronize out to the client, but then after that, a
second (3rd, ...) assignment does *not* sync.
I have also worked around this with function calls etc.

On Sun, Apr 22, 2012 at 11:06 AM, Andy Luong <aluon...@gmail.com> wrote:
> I am trying to change the value of a variable from the server side. It
> seems like when I print the value of the client's variable on the
> server, the value is changing. However, the client doesn't get the
> change. Creating new variables seems to sync fine, but overwriting
> existing data doesn't seem to sync to the client.

> Here is a link to my two pieces of a code: server.js and index.html

> http://www.notey.it/n/ZHc

> I found a work around of making a function on the client to change the
> value, but it seems to defeat variable syncing if I do that.

> -Andy

--
--Nate

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
N. Morse  
View profile  
 More options Apr 23 2012, 1:56 pm
From: "N. Morse" <nmo...@academiccatalog.com>
Date: Mon, 23 Apr 2012 13:56:53 -0400
Local: Mon, Apr 23 2012 1:56 pm
Subject: Re: [NowJS] Variable Syncing Problem
BTW, I am running... node v0.6.2 and ...
├─┬ n...@0.7.6
│ ├── node-pr...@0.5.2
│ └─┬ socket...@0.9.6


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Filipe Deschamps  
View profile  
 More options Apr 23 2012, 8:41 pm
From: Filipe Deschamps <fili...@gmail.com>
Date: Mon, 23 Apr 2012 17:41:46 -0700 (PDT)
Local: Mon, Apr 23 2012 8:41 pm
Subject: Re: Variable Syncing Problem
"Sync values using remote function calls rather than using synced
variables. As described above, some amount of traversal is required to
synchronize variables in the now namespace. If you need to rapidly set
a value on one client and then immediately use that value on the other
clients, consider broadcasting this using function calls. Function
calls are much faster than using variable syncing."

http://nowjs.com/bestpractices

On Apr 23, 2:50 pm, Nate Morse <morse.n...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy Luong  
View profile  
 More options Apr 23 2012, 9:09 pm
From: Andy Luong <aluon...@gmail.com>
Date: Mon, 23 Apr 2012 18:09:21 -0700 (PDT)
Local: Mon, Apr 23 2012 9:09 pm
Subject: Re: Variable Syncing Problem
I agree that makes sense. However, I don't think the values are ever
getting overwritten. I tried waiting 5 seconds, and it seems to not be
synced.

On Apr 23, 7:41 pm, Filipe Deschamps <fili...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
N. Morse  
View profile  
 More options Apr 24 2012, 9:11 am
From: "N. Morse" <nmo...@academiccatalog.com>
Date: Tue, 24 Apr 2012 09:11:05 -0400
Local: Tues, Apr 24 2012 9:11 am
Subject: Re: [NowJS] Re: Variable Syncing Problem
I also agree that functions are more useful, and that the whole
syncing of data with no events associated with updates is a bad idea.
Syncing should be either augmented to include update notification
events or the whole feature should be removed.
Meanwhile there is definitely a bug.

--
Nate Morse
Programmer
SmartCatalog
217 Commercial Street, Suite 406
Portland, ME 04101
800 770-8425
207 774-4769
207 780-0129 fax
www.academiccatalog.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »