google-cloud

Google Cloud Platform: Clojure + {GAE, GCE, anything else on Google Platform}
qqq 2017-02-04T08:50:54.000912Z

does anyone have bindings that presents google datastore as a "persistent datascript" ?

qqq 2017-02-04T18:01:33.000913Z

with google app engine, what is the easiest way to take payment?

2017-02-04T19:56:39.000914Z

@qqq re: datascript, i assume you know datastore does not support joins?

2017-02-04T19:59:52.000915Z

i'm working on a clojure ds query interface. AND is easy: pass a map whose vals are predicate fns. for OR, pass a set of such maps.

2017-02-04T20:00:37.000916Z

join is a whole 'nother matter.

2017-02-04T20:02:34.000917Z

e.g. {:age #(> % 27)} returns all entities with age > 27.

2017-02-04T20:03:33.000918Z

still don't have a good syntax for projection queries, tho. thoughts?

2017-02-04T20:05:56.000919Z

e.g. #{{:age #(> % 27)} {:name "Smith"}} returns all entities with age > 27 OR name = "Smith". whaddya think?

qqq 2017-02-04T21:21:15.000925Z

@mobileink : that would expalin it! turns out, I don't think I need joins

qqq 2017-02-04T21:21:45.000926Z

@mobileink : so gae charges per read right?

qqq 2017-02-04T21:21:55.000927Z

given that's the case, I thikn maybe for loops would be better than a DSL

qqq 2017-02-04T21:22:05.000928Z

since I readlly want to know what indezes it's hitting and estimate the cost

2017-02-04T21:26:59.000929Z

hah ha! i'm a cheapskate freeloader! unfortunately (or not) i've never been in a position to worry about costs. my main (and only, so far) concern is readability, clojurishness, simplicity. i'm just assuming i can optimize, later.

qqq 2017-02-04T21:28:11.000930Z

well I'm building a startup, so it's either (1) my traffic is so damn low I'm not making money or (2) I have high traffic and I need to be able to estimate READ costs

2017-02-04T21:28:47.000931Z

gae ds indexing is a whole 'nother matter, i admit i've ignored it so far.

qqq 2017-02-04T21:29:07.000932Z

if you're not using indezes, yo're linear searching, and that is edpensive

2017-02-04T21:30:19.000934Z

memory hazy, but doesn't gae automagically create at least some indices?

2017-02-04T21:32:20.000935Z

you just need to be careful when you're doing more complex queries. the gae docs give some optimization examples.

2017-02-04T21:33:59.000936Z

the gae costing model is dauntingly complex. you almost need to hire another person just to deal with it.

2017-02-04T21:36:32.000937Z

you kinda get good and bad. good: gae manages everything. bad: you need an mba with a minor in rocket science to figure out your costing model.

qqq 2017-02-04T21:39:06.000939Z

no

qqq 2017-02-04T21:39:09.000940Z

you just count operations

2017-02-04T21:39:34.000941Z

whatever "costing model" means. i just made that up, cause it sounds kinda sorta professional.

qqq 2017-02-04T21:40:26.000942Z

https://cloud.google.com/datastore/pricing is pretty clear

qqq 2017-02-04T21:40:30.000943Z

as long as we can estiamte our # of reads

qqq 2017-02-04T21:40:37.000944Z

which is what makes indexes so nice as opposed to linear scanning

qqq 2017-02-04T21:40:55.000945Z

AWS pricing on the other hand, makes IRS forms look simple

2017-02-04T21:43:03.000946Z

:simple_smile: never looked at aws pricing. gae pricing, ok, they do break it down nicely.

2017-02-04T21:44:38.000948Z

but like i said that's both good and bad

2017-02-04T21:46:13.000949Z

still, i guess it beats trying to cost out what it would take to run your own infrastructure.

2017-02-04T21:52:35.000950Z

re: reads, there's also memcache, which has it's own cost model. if your reads fit the profile, mc is very nice

2017-02-04T21:58:24.000951Z

er, apparently the memcache cost model is no-cost. :simple_smile: