Abandoning the sandbox approach

16 views
Skip to first unread message

Jeremy Kahn

unread,
Aug 30, 2012, 12:42:13 AM8/30/12
to pine-d...@googlegroups.com
For context: https://groups.google.com/d/msg/pine-discuss/5hcMOM__mmA/ElOuaqFFp1wJ

At this point, I think the sanest approach is to forgo sandboxing and make each game its own webpage.  While we can run games in an iframe, the performance takes too much of a hit to be considered workable.  I considered doing some weird workaround with managing Chromium's tabs programmatically, but ultimately we still won't get the results we want because we can't hijack the input from a game running in its own tab (short of doing something at the OS level).

Well... I suppose we can achieve this by doing some hacky things with Chromium extensions, but I imagine that such an approach would be time consuming and flakey.  It might make sense to pursue this, but I don't think it's necessary to get working for a first version.

In any case, I think the best thing to do for now is to just treat games like regular webpages.  We're already requiring developers to use our API, and I've already added functionality for exiting back into the Pine app.  I suggest taking the "trust the developer" approach until it proves to be a real problem.  By then we can come up with a hack to enforce game exit functionality.

This change lives in the unsandbox branch, but I'd like to wait to see what everyone else thinks about dropping the sandbox before I merge this to master.

Jeremy Kahn

unread,
Aug 30, 2012, 1:34:24 AM8/30/12
to pine-d...@googlegroups.com
Thinking about it more, it shouldn't be that hard to write a system daemon that listens for a specific gamepad input.  That could just trigger a script that forces the (only) Chrome tab to redirect to the Pine app.  That's something that a Pine game developer would not be able to circumvent.

Writing daemons is something I've never done, but this will be a good excuse to get my feet wet.

--
You received this message because you are subscribed to the Google Groups "Pine" group.
To post to this group, send email to pine-d...@googlegroups.com.
To unsubscribe from this group, send email to pine-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/pine-discuss/-/xib-8u9G-0oJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeremy Kahn

Alex Wilson

unread,
Aug 30, 2012, 6:09:46 PM8/30/12
to pine-d...@googlegroups.com
I think that's probably a good way to solve it for now. Chrome extensions could solve the problem, and I could look into it. If we can solve it simply through the OS, chrome extensions can definitely wait.

Jeremy Kahn

unread,
Aug 31, 2012, 12:14:49 AM8/31/12
to pine-d...@googlegroups.com
Ok, I just merged the unsandbox branch to master.  The feature is gone.  I also updated the wiki to reflect this.  We should definitely be taking advantage of our end-to-end control of the Pine environment, so I will work to come up with some OS hack to ensure that users can return to the Pine app.  Time research writing Linux daemons...

On Thu, Aug 30, 2012 at 3:09 PM, Alex Wilson <arex...@gmail.com> wrote:
I think that's probably a good way to solve it for now. Chrome extensions could solve the problem, and I could look into it. If we can solve it simply through the OS, chrome extensions can definitely wait.

--
You received this message because you are subscribed to the Google Groups "Pine" group.
To post to this group, send email to pine-d...@googlegroups.com.
To unsubscribe from this group, send email to pine-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/pine-discuss/-/cvjlkErgDq8J.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeremy Kahn

unread,
Aug 31, 2012, 12:56:06 AM8/31/12
to pine-d...@googlegroups.com
And of course, there's a Node package for that: https://github.com/indexzero/daemon.node

Jeremy Kahn

unread,
Sep 1, 2012, 7:54:26 PM9/1/12
to pine-d...@googlegroups.com
I'm playing around with Node daemons.  I can get a basic daemon running, but I can't seem to get it to listen to global system input.  The good news is that I just stumbled upon a Github project that is an "input event handling daemon for linux:" https://github.com/gandro/input-event-daemon

I'll see if I can get a Hello World out of this.
Reply all
Reply to author
Forward
0 new messages