News for hackers. Stuff that matters.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by patrickmn on Sunday April 09, 2017 @01:32PM (#14073354)
> Automatic & Free SSL/TLS

A couple of years ago, I wouldn't have believed we would be seeing essentially zeroconf TLS/PKI in software anytime soon. Letsencrypt, the "encrypt everything" movement, and people like Steve, Ponzu's author, have improved internet security tremendously at a time when it is critically needed.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @08:38PM (#14075154)
Thank you, but all credit is due to the Let's Encrypt team. It is an amazing thing they have done.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by srcmap on Monday April 10, 2017 @02:37PM (#14081295)
Steve,

Quick question, must the server use "Let's Encrypt" be public on internet to use it?

Like: Can I use private ip (10.1.1.x) behind the NAT and still use "Let's Encrypt" + your CMS/server?

Thanks

Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Monday April 10, 2017 @04:19PM (#14082170)
Sort of. If you're OK with manually updating the certificates after initially fetching them from L.E., then you can use them. However L.E. must be able to communicate directly with the server via HTTP to prove authority and send you the certificate.

There are other tests that the ACME protocol can do to determine authority over a domain name, but Ponzu's implementation doesn't handle them.

Sorry if that doesn't fully answer your question.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @08:37PM (#14075145)
Hi all - Ponzu's author here. I was pleasantly surprised to see this post today. I'm reading through comments and will be releasing some video content as an overview of the CMS and server shortly - hoping to address any questions I see here.

If you get a chance to try it out and have questions or issues, I'm in the #ponzu channel in the Gopher's slack org: https://invite.slack.golangbridge.org/ feel free to ping me there or open an issue on Github.

Steve

Re:Ponzu – An open-source HTTP server framework and CMS in Go by bketelsen on Sunday April 09, 2017 @08:52PM (#14075224)
Nice to see Ponzu getting some attention. I used Ponzu to create the GopherCon 2017 site this year (gophercon.com) and really enjoyed how easy it was to put content up quickly. I created Go helpers -- only useful if your website is in Go: github.com/bketelsen/ponzi && github.com/bketelsen/ponzigen

Overall A+ to Ponzu. I'm on my 6th ponzu site now, still love it.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by wyc on Sunday April 09, 2017 @06:01PM (#14074571)
Looks spiffy. I like the approach of keeping even the database as part of the application. I think it makes projects a lot more like appliances, which can really be more plug-and-play. I see a lot of databases moving towards the application layer (CouchDB, Firebase), but it's interesting to see applications going the other way.

Lastly, here's to the hope of an exploit named "Pwnzu" never getting released! It's simply too good of a name.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by tyingq on Sunday April 09, 2017 @01:51PM (#14073455)
Does look pretty slick, but I imagine the flat nature of the content items will be limiting. In the example, song has an artist. But artist is a string vs a related content item.

I can't tell if that's an MVP type decision and will change later, or a design decision that won't change in the future.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @08:45PM (#14075179)
Hi - you can make a relationship using the built in addon package, github.com/bosssauce/reference

The reference is stored as a string (or []string if you opt for a reference.SelectRepeater input func), but the value stored as a reference is actually a URL path to the content as it would be accessed via the Content API. This becomes very powerful when you enable HTTP/2 Server Push, and declare the referenced content to be pushed when it's parent content is requested.

The underlying data looks like this:

Song

id: 1

title: "Take Me Home, Country Roads"

artist: "/api/content?type=Artist&id=2"

If you enable H2 Server Push by implementing the Pushable interface (add a Push method that returns a []string of the JSON field names to push), the server will know to make a response for the referenced Artist field and push it down to the client when the parent Song is requested.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by tyingq on Sunday April 09, 2017 @08:50PM (#14075205)
Ahh, okay. That seems straightforward. Might be good to reference that in the main documentation.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @08:59PM (#14075249)
Definitely will -- thank you for taking the time to read through.. it's hard for me to know where the docs are too light sometimes. (besides generally everywhere)
Re:Ponzu – An open-source HTTP server framework and CMS in Go by benatkin on Sunday April 09, 2017 @03:04PM (#14073801)
Is it flat like wikipedia or flat like S3?
Re:Ponzu – An open-source HTTP server framework and CMS in Go by tyingq on Sunday April 09, 2017 @04:26PM (#14074194)
Not sure. I don't see any support for item relationships. It could just be a lack of documentation though.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by jordanlev on Sunday April 09, 2017 @03:58PM (#14074071)
Kudos to the creators for getting the CMS field definitions right by allowing arbitrary amounts and types of fields!

It's so annoying to me that so many CMS's and static site generators start out with the assumption of 1 big rich text / markdown "body" for content and treat everything else on the page as miscellaneous stuff (meta-fields, yaml front-matter, etc).

Re:Ponzu – An open-source HTTP server framework and CMS in Go by devmunchies on Sunday April 09, 2017 @05:15PM (#14074415)
Sorry, I've never used a CMS or managed a blog... but I'm curious about the use case and benefits of having arbitrary fields.

Is it for meta information about a post? Are those fields injected into a post somehow? How are those fields used? (I'm ignorant of CMSs)

Re:Ponzu – An open-source HTTP server framework and CMS in Go by chickenfries on Sunday April 09, 2017 @05:28PM (#14074461)
Imagine the case of a generic news article: the body of the post can contain text, photos, pull quotes, videos, a slideshow, audio content, etc. The CMS needs to enable users to add all of that content and expose via the API to multiple clients (web, mobile, feeds, etc).
Re:Ponzu – An open-source HTTP server framework and CMS in Go by justincormack on Sunday April 09, 2017 @06:04PM (#14074584)
I always thought that fields are generally poor for that - html is pretty good and has ways to structure all those things, and they can be extracted and styled for different clients.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by tyingq on Sunday April 09, 2017 @06:41PM (#14074721)
You can still do that with most field oriented CMS packages. The field interface is generally admin facing only.

The user facing html templates have variables that map back to those fields. So, all the expression of HTML, but with the actual data in fields.

Handy for things like addresses. You can render a map or just text, or both. The fact that it's structured data would allow for proximity searching. Where each "post" is say, a restaurant location.

Similar for things like tags, so that you have built in taxonomy. Separate spaces for tags too, so that you could have a topic taxonomy as well as a completely separate taxonomy that doesn't pollute that space. Like an author taxonomy or similar.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by justincormack on Sunday April 09, 2017 @07:14PM (#14074837)
It generally limits you though, eg one video per article etc.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by tyingq on Sunday April 09, 2017 @07:32PM (#14074908)
Depends on the CMS. Many have repeating fields that you reference in an array style notation from templates, or via loops.

Others allow content relationships, where videos are their own object, set not to be published alone, but embeddable into, say posts.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by CognitiveLens on Sunday April 09, 2017 @06:21PM (#14074645)
HTML as a data entry format is error prone, and HTML as a cross-platform data source requires a lot of tooling and unreliability compared with a properly-structured field-driven JSON API
Re:Ponzu – An open-source HTTP server framework and CMS in Go by rapind on Sunday April 09, 2017 @06:48PM (#14074741)
If you have the luxury of convincing your users to learn markdown instead of structured fields you'll have a far simpler and extendable solution.

Obviously rarely the case, but worth having the conversation.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by justincormack on Sunday April 09, 2017 @07:15PM (#14074838)
Any decent CMS would add tooling there (yes, they don't they just treat the HTML is WYSIWYG, but that is where the tooling should be)
Re:Ponzu – An open-source HTTP server framework and CMS in Go by chickenfries on Sunday April 09, 2017 @01:29PM (#14073330)
Looks interesting, it would be nice if the ”Why?“ section contained comparisons to other CMSs.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by epynonymous on Sunday April 09, 2017 @08:44PM (#14075175)
havent looked at the reqdme or rtfa, but ponsu, if i'm not mistaken, is a sauce in japan used for dipping, it consists of soy sauce and citrus/lemon/lime flavoring, great with raw, grated daikon radish.

in terms of this project, excellent, i actually wrote a lot of web apps using golang and found the main deficiency to be the templates, tried amber, ace, and even the default mustache/handlebars, but still think jade and haml beat those hands down. i did see a few ports of jade, but wqsnt certain about the stability or completeness of it.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by ppodsfkk on Monday April 10, 2017 @03:02AM (#14076605)
I spoke to a Japanese programmer friend on his opinion on projects named after Japanese words. His personal take was that many were at cringe level. Not just him, his group of friends regularly chat about the "cringiness" in their line group.

I promptly shared my project based on a Japanese name and provided entertainment for a few mins.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by tomcam on Monday April 10, 2017 @11:19AM (#14079234)
Go visit Japan and check out English usage on their T shirts
Re:Ponzu – An open-source HTTP server framework and CMS in Go by tenken on Sunday April 09, 2017 @02:36PM (#14073671)
Boltdb sounds neat, but I swear no off-the-shelf tooling supports it.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by jaytaylor on Sunday April 09, 2017 @07:07PM (#14074815)
I was apprehensive about BoltDB too, at first, but after giving it a shot I've really taken to it and come to appreciate the reliability and flexibility it offers. It's not well-suited for all cases, just those where dropping in high-performance transactional persistence into an app meets your needs.

As it keeps gaining traction and popularity, more and better tooling will inevitably be created to scratch itches :)

Re:Ponzu – An open-source HTTP server framework and CMS in Go by dozeone on Monday April 10, 2017 @06:57AM (#14077403)
Re:Ponzu – An open-source HTTP server framework and CMS in Go by whizzkid on Sunday April 09, 2017 @03:10PM (#14073834)
Couldn't see any authentication system in Readme, Is there any auth mechanism that can be used for API usage?
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Sunday April 09, 2017 @09:03PM (#14075267)
Auth for API usage is up to the user to implement, but you could borrow code from the internal system/admin/user package to do password based auth & check JWTs. All of the API interactions w/ the system have hooks (see here: https://github.com/ponzu-cms/ponzu/blob/master/system/item/i...) so you can do auth verification, data validation, etc all within the req/res lifecycle.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by daenney on Sunday April 09, 2017 @05:24PM (#14074445)
According to the README it depends on golang.org/x/crypto/bcrypt and github.com/nilslice/jwt so it seems likely to have authentication on board and a way of using JWT tokens for API access.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by tshawkins on Sunday April 09, 2017 @09:42PM (#14075418)
How hard do you think it would be to add SAML/OAUTH2 authentication?
Re:Ponzu – An open-source HTTP server framework and CMS in Go by sAbakumoff on Sunday April 09, 2017 @10:13PM (#14075528)
Indexing - why don't u use bleve?
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Monday April 10, 2017 @12:46AM (#14076102)
It's actually almost ready! Check out the ponzu-dev branch or look at the compare between it and master for the implementation.

I would love to get some feedback as a first time Bleve user.

Re:Ponzu – An open-source HTTP server framework and CMS in Go by sAbakumoff on Monday April 10, 2017 @01:15AM (#14076226)
Well, I am not affiliated with bleve, but actively use it in my project where the data are in BoltDb but index is stored separately in bleve. It's really awesome package.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Monday April 10, 2017 @02:38AM (#14076516)
I agree :) sorry I wasn't more clear, but I have indexing already added with Bleve - it's in the ponzu-dev branch of the repo now. If you get a chance to browse the code lmk if you spot anything I have done incorrectly!
Re:Ponzu – An open-source HTTP server framework and CMS in Go by delblues on Monday April 10, 2017 @01:05PM (#14080358)
as a web server, can I use this with an Ruby on Rails application?
Re:Ponzu – An open-source HTTP server framework and CMS in Go by nilslice on Monday April 10, 2017 @04:07PM (#14082074)
Sure! Just think of Ponzu as a JSON web service and fetch/put data from your controllers or models.
Re:Ponzu – An open-source HTTP server framework and CMS in Go by vlgk on Sunday April 09, 2017 @03:02PM (#14073787)
looks interesting