FatFractal customer forums

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - jonnycools

Pages: [1]
NoServer Questions and Answers / Blob 404 Error
« on: April 04, 2014, 02:00:45 PM »
I;m geting a 404 error when trying to retrieve a blob via a client and as the system user in the data browser. I set the read permission on the collection to loggedin. Any idea what going on?

NoServer Questions and Answers / Delta Updates?
« on: March 22, 2014, 12:46:28 PM »
how does updating an object work?

There are three options for a key

Its there
Its not there

So if my extension attempts to update just one key, could I strip out all the other keys and whats not in the PUT request won't get written as NULL

For example I have this Comment Object


Say I have an extension

Code: [Select]

exports.somefunction = function()

var comment = ff.getObjectAUri("...");

var save = new Object();

save.guid = comment.guid;

save.other = comment.other + 1;



Here I'm specifically leaving out the message. The reason is I have certain fields on the object that are maintained by the server. I have concerns over race conditions. Say the client updates this object with an old version of other or the server updates the object with an old version of message.

I would understand the key with null says i removed it.

The key with a value means update

Would the absence of a key just do nothing. - So for clients on the do not serialize, these properties won't get overridden with old data.

Would this work with the REST API if a key just wasn't in the JSON?

Servlets/Ruby Questions and Answers / Java Servlet Vs. NoServer
« on: February 13, 2014, 08:12:35 PM »
Whats the main differences between the servlet and NoServer?

If I choose to use the servlet to augment my NoServer would I have to implement my own solutions for user authentication, permissions, native SDK, queries, grab bags, server code and such.

It looks like i'd be responsible for managing my own SQL databases? Would that mean I would have to forgo the Grabbag and BackReferences in favor of my own SQL.

Is it a modular approach where I can pick and choose which components I want to use. Like event handlers or client side deserializer?

Where could I find more documentation about this?

NoServer Questions and Answers / Retrieve Handler Issue
« on: January 31, 2014, 03:24:43 PM »
I'm using a retrieve event handler to load transient properties: Like and Subscription. Both have references to the event as object.

When I attempt to access the BackReferences grabbag is the retrieve handler being executed?

I've tried several things but I'm lost.

Code: [Select]

CREATE HANDLER EventRetrievePost POST ON /Event Retrieve AS javascript:require('scripts/event').eventRetrievePost();

Code: [Select]

exports.eventRetrievePost = function()

var user = ff.getActiveUser();

var event = ff.getEventHandlerData();

event.like = ff.getObjFromUri(event.ffUrl + "/BackReferences.Like.object/(createdBy eq '"  + user.guid + "')");

event.subscription = ff.getObjFromUri(event.ffUrl + "/BackReferences.Subscription.object(createdBy eq '" + user.guid + "')");


I'm getting this error whenever i make most CRUD operations to the database, that aren't even related to /Event. I was trying to delete an FFUserGroup and I got three of these errors.


FatFractal.getArrayFromUri 500, {"result":null,"statusMessage":"Recursive event handler guard - count for CREATE on /Event has reached 4"}

Error 500: {"result":null,"statusMessage":"Recursive event handler guard - count for CREATE on /Event has reached 4"}

xmlHTTP : {"readyState":4,"timeout":0,"onloadend":null,"withCredentials":false,"status":500,"upload":{},"responseType":"","response":"{\"result\":null,\"statusMessage\":\"Recursive event handler guard - count for CREATE on /Event has reached 4\"}","statusText":"Internal Server Error","responseText":"{\"result\":null,\"statusMessage\":\"Recursive event handler guard - count for CREATE on /Event has reached 4\"}"}

The console logs are littered with entries like this


15:07:28 at org.mozilla.javascript.gen._Event_RETRIEVE_EventRetrievePost_16.call(/Event.RETRIEVE.EventRetrievePost)
15:07:28 at org.mozilla.javascript.gen._Event_RETRIEVE_EventRetrievePost_16.exec(/Event.RETRIEVE.EventRetrievePost)

I've made no attempt to make any CRUD operations with the /Events collection. I should not that I get that error for all Collections that I defined retrieve handlers for. All of the handlers are similar.

NoServer Questions and Answers / Quick permissions question
« on: January 30, 2014, 03:38:56 PM »
Code: [Select]

PERMIT read:<reference><reference><grabbag of FFUserGroups><FFUserGroup Name> write: ON /<collection name>

Is it currently possible to create a permit statement by looking at a grabbag of FFUserGroups and then the name of the group. Or would I have to create a reference to each grabbag on the parent object?

NoServer Questions and Answers / Query Functions
« on: January 23, 2014, 10:11:42 PM »
Is it possible to declare custom function similar to date and distance to be used in the queries. Some attributes of an object must be calculated at runtime as the result is unique to each user and cannot be calculated statically. The result of the operation should be used when evaluating a query.

Is it possible to do this using a post retrieval handler?

NoServer Questions and Answers / Custom Code and Additional Parameters
« on: January 23, 2014, 08:38:27 PM »
Not sure if this is possible right now.

I'd like to be able to associate an arbitrary dictionary or string with all requests to the server. My reason for this is in event handlers say a post handler on a retrieve, i'd like to be able to customize the object based on the value in that arbitrary string or dictionary.

This string may identify whether the request is coming from iOS or android. Or if I have multiple apps sharing a common FF backend it could identify the which app is the request coming from. I could provide this upon initialization of the FF instance or maybe as parameters in a query or extension. So on the server side I would retrieve the parameters in the event handler or extension.

Currently upon retrieval I store transient properties in an object, but I share the backend with three apps and the properties returned are unique to each.

For example

/Collection/(query)?app="identifier", latitude=0.23,longitude=0.45

I could do this but I am not sure if there is a function to retrieve the http parameters in event handlers

NoServer Questions and Answers / Blobs and event handlers
« on: January 22, 2014, 06:23:45 PM »
I'm trying to create a thumbnail once an image is created. I have defined a handler to create the thumbnail but I cannot seem to get access to the blob i saved. I tried accessing it off the event handler data and the get blob. Should I be using an update handler instead?

NoServer Questions and Answers / Client side deserializer
« on: January 07, 2014, 10:34:06 PM »
From your documentation i gathered that the deserializer tries to maintain only one pointer to an object regardless of when or where it was queried, what I mean is if I fetch the object in one place but return it via an extension in another, both pointers are pointing to the same object.

What I'm trying to achieve is downloading from an extension a version of an object that includes a subset of the properties. Like the title and info, just enough to create an index. Later I will download all the information as the user requests it. I also plan to include transient properties from the extension that are not stored in the database but are return from the extension in the actual object.

Will the deserializer merge the data based on what values are different or just copy the new into the old. Will the transient properties be replaced completely if the second update does not contain them? Should I consider retiring the transient properties separately?   

NoServer Questions and Answers / Grabbag Count
« on: December 30, 2013, 10:07:38 AM »
How robust is the grabBagCountObjects method on ff in the cloud. I may be calling this several times a second as i retrieve objects and need to return the counters for the grabbag. Is it better to cache the count in the object via grabbag event handlers or just call this method upon retrieval?

NoServer Questions and Answers / Send Email
« on: December 28, 2013, 03:50:28 PM »
I'm having a bit f a problem with the sendEmail function. Its probably just my parameters are off. I've tried with both hotmail and iCloud. I used the ports they gave me.

I have this function to create an email.

function Email()
   this.host = "smtp.mail.me.com";
   this.port = 587;
   this.auth = true;
   this.authPort = 587;
   this.username = "****@me.com";
   this.password = "******";
   this.from = "******@me.com";
   this.to = null;
   this.cc = null;
   this.bcc = null;
   this.subject = null;
   this.text = null;
   this.html = null;

Then i fill in the content and to fields

var email = new Email();
email.to = user.email;
email.subject = "Blah";
email.text = "blah";

Here's the iCloud article losing the ports:


They mention using TLS over SSL, not sure if this is an issue or not.

I'm getting this from the extension - Status message from backend is Could not connect to SMTP host: smtp.mail.me.com, port: 587

NoServer Questions and Answers / Alias question
« on: December 17, 2013, 08:23:16 AM »
Is this a valid Alias?


CREATE ALIAS ON OBJECTTYPE FFUser GRABBAG BackReferences.Subcription.createdBy AS subscriptions

Right now it isn't returning anything when I use it in a query like this:

"/FFUser/" + guid + "/subscriptions"

MaintainCreatedUpdatedBackReferences is set to false.

Pages: [1]
Copyright © FatFractal customer forums