Notifiers in a mobile scenario

10 views
Skip to first unread message

Michael Perry

unread,
Feb 7, 2012, 1:31:26 PM2/7/12
to The Object Network
I can see how a mobile device could download objects for use while
offline. But when the user makes a change, thus creating a new object
that notifies the original, do they have to be connected? Or can a
client queue that notifier up for later?

On a related note, can an object animate while it is cached on a
client? If the user makes a change while disconnected, will they be
able to see the effect of that change in the cached observers? Or does
all animation take place on the server?

Duncan Cragg

unread,
Feb 7, 2012, 7:11:33 PM2/7/12
to The Object Network
Hi Michael! Excellent questions...

> I can see how a mobile device could download objects for use while
> offline. But when the user makes a change, thus creating a new object
> that notifies the original, do they have to be connected? Or can a
> client queue that notifier up for later?
>
We'd obviously prefer the latter! You keep telling the other end what
your change was, and if the network goes down, you wait for it to come
back up, then keep on trying.

It amounts to a retry-able POST. Yes, in the Object Network, POST is
idempotent! And if doing POST for 'update' is also freaking you out:
it's all explained in the FOREST work ( http://forest-roa.org ) .. the
'advanced material'. I'm currently just focusing energy on the simple,
read-only, GET-able stuff 'cos it's easier to explain, and more fun in
a way.

In short - we don't do simple REST-as-a-database, read/write of data
here (I can't bring myself to say 'CRUD', it sounds grubby :-). So we
don't use the AtomPub-style, four-verb, data-update idiom.

We work at the 'domain level', not the 'raw data level', in the Object
Network - more semantics than syntax, perhaps. Like you said, you
'own' your new version of the remote object, and notify it of your
intent. I can elaborate more, but any examples you had in mind would
help, since it /is/ about the domain, not about any kind of generic
data-versioning, transactional system.

> On a related note, can an object animate while it is cached on a
> client? If the user makes a change while disconnected, will they be
> able to see the effect of that change in the cached observers? Or does
> all animation take place on the server?

All animation is driven by the object's (single) owner. That animation
can be copied out to caches, by polling or (again, FOREST stuff)
pushing. You don't get an object being animated both by code on the
server and some kind of local mirror code on the client, if that's
what you mean. You /can/ have objects that are actually owned on a
'client', that get pushed out to 'servers' (reversal of roles). This
happens in NetMash for the user object, that can push to a home server
when the GPS updates, for example. Maybe I should start a FOREST/
NetMash list.. I also imagine objects interacting off-line driven by
Fjord rewrite rules - i.e., downloaded Fjord code objects...

I don't want anyone to get confused by all this, though. For now, you
can join the Object Network with just (conditional) GET (and polling)
of public objects. Which still allows nice patterns where object A's
latest state is dependent on object B's latest state, via domain-level
or business logic. And that logic can be coded in Java, not in Fjord!


Cheers!

Duncan
Reply all
Reply to author
Forward
0 new messages