Hacker Newsnew | past | comments | ask | show | jobs | submit | ctcliff's commentslogin

I maintain a small open source library for managing payments websites that uses this architecture [1]. My Lambda costs have been about $0.04 per transaction.

Also you can provision AWS from the browser using a CloudFormation template and a Launch Stack URL [2].

[1]: https://github.com/christophercliff/flatmarket. [2]: https://github.com/christophercliff/flatmarket#automated-dep...


I developed a static site generator for e-commerce called Flatmarket: https://github.com/christophercliff/flatmarket

It lacks some of the features you'd get with a dedicated backend service but it's truly static and costs about $0.004/transaction on AWS Lambda (not including Stripe's take).


I love the artwork for your demo site. Where did you get it?

https://christophercliff.com/flatmarket/


An old stock art CD-ROM by Redouté.


I haven't, but even at this size the rendering is quite a bit slower than the calculation. For example, the delay on reload is almost entirely from rendering the shortest path tree.


The geographic rendering APIs tend to be incompatible with the graphing algorithms and data structures. It's better to optimize your data on the server for algorithmic simplicity and convert to a render-friendly format at render time.

Also, immutability is great when you're juggling 1000s of lon/lat arrays.


Yeah, that was an unpleasant surprise when I started plugging in the street map data :D

I'm experimenting with other algorithms and will post some (hopefully) more interesting results soon.


A plug for one of my co-workers who recently finished his PhD on alternative route finding:

http://algo2.iti.kit.edu/documents/Dissertation_Kobitzsch_Mo...

Choice quote from page 50:

k-Shortest Path. A, at the first glance reasonable, approach to alternative routes is the k-shortest path problem [Yen71]. The basic notion behind the problem, which has been studied quite extensively (e.g. [Shi79, Epp94, Epp98, Rup97]), is that next to the shortest path itself, slightly suboptimal paths will offer good alternatives. While this idea seems valid for specific networks2, it has been described as less effective [BDGS11] in the context of alternative routes in road networks. It is rather unlikely to find a good alternative route among the first few hundred paths. Jumping off the highway at a ramp and directly returning back onto it does not take much time compared to the full journey. Doing this at every possible combination of ramps might already contribute a large number of possible paths that are only slightly worse than the original shortest path. This directly implies that we might need a very large value for k before we can report a reasonable alternative route.


you may want to look at: Alternative Routes in Road Networks Ittai Abraham, Daniel Delling, Andrew V. Goldberg, and Renato F. Werneck https://www.microsoft.com/en-us/research/wp-content/uploads/...


You can also change the definition of "shortest" by weighting roads by speed limit. I don't know if the data for that is easy to come by, but you can always use some arbitrary weights to get roughly the same effect.


> will post some (hopefully) more interesting results soon.

Your blog could use an RSS feed or some other way to get notified of updates then ;)


This setup assumes manual order fulfillment. If someone manipulates a charge, don't deliver the goods.

If you're doing 100s of transactions per day or automating fulfillment, it would be more appropriate to invest in a full-featured back end.


Loads of examples at http://highlandjs.org/.


I wrote an npm module to automate this workflow. You can read about it at http://caisson.co/.

Simplifies the process to a couple commands:

  $ caisson init yoursite.com
  $ caisson push


This is so awesome! You've taken a 15 minute process and condensed it to 15 seconds.


It's just a convention for writing jQuery chains. The code is easier to debug because each method is kept on a separate line.

Of course this is trivial if there's only one method in the chain...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: