Gothic Alpha: Difference between revisions
Adamcolton (talk | contribs) No edit summary |
Adamcolton (talk | contribs) No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
The goal here is to get something that works, but maybe not everything I want. | The goal here is to get something that works, but maybe not everything I want. | ||
https://github.com/boltdb/bolt | https://github.com/boltdb/bolt via https://www.specto.io/replacing-redis-with-boltdb-a-pure-go-keyvalue-store/ | ||
https://github.com/mitchellh/mapstructure | |||
I'll use [http://www.gorillatoolkit.org/ Gorilla] for most of the web stuff. | |||
== Thought Experiment == | |||
From a dev-dashboard, a user should be able to define a simple schema. This will include fields, types and validation rules. This schema will then be implemented as an Entity. This will produce: | |||
* Go Struct | |||
* Lapiz Class | |||
* REST CRUD API | |||
* Views | |||
** form partial | |||
** edit wrapper | |||
** create wrapper | |||
** view many | |||
** view one | |||
== Objects == | == Objects == | ||
| Line 14: | Line 31: | ||
=== Indexing === | === Indexing === | ||
One of the big challenges is indexing. I think the right approach is not do it right away, but see what comes up. | One of the big challenges is indexing. I think the right approach is not do it right away, but see what comes up. | ||
=== Derive from Go === | |||
I could derive anything I need form the Go structs. Using reflect, I could get the fields and types. From there I could generate a schema. I'd need a way to modify it for the db and for JS. But for a basic object graph with simple validation, it could be very easy. | |||
== JS == | == JS == | ||
Latest revision as of 19:36, 1 February 2016
Laying the ground work for Gothic.
The goal here is to get something that works, but maybe not everything I want.
https://github.com/boltdb/bolt via https://www.specto.io/replacing-redis-with-boltdb-a-pure-go-keyvalue-store/
https://github.com/mitchellh/mapstructure
I'll use Gorilla for most of the web stuff.
Thought Experiment
From a dev-dashboard, a user should be able to define a simple schema. This will include fields, types and validation rules. This schema will then be implemented as an Entity. This will produce:
- Go Struct
- Lapiz Class
- REST CRUD API
- Views
- form partial
- edit wrapper
- create wrapper
- view many
- view one
Objects
This is the core of the whole thing. I want a simple way to have objects on the server be stored or sent to the client.
I think for this, I will start with Capn Proto. Pair that with and Entity system. The Entity interface just needs to return an ID.
The other option would be protocol buffers. On the server, I can extend them by embedding.
Indexing
One of the big challenges is indexing. I think the right approach is not do it right away, but see what comes up.
Derive from Go
I could derive anything I need form the Go structs. Using reflect, I could get the fields and types. From there I could generate a schema. I'd need a way to modify it for the db and for JS. But for a basic object graph with simple validation, it could be very easy.
JS
I need to support as much JS integration as possible. Objects should be automatically exported, so that the only JS work is adding front-end features.
I'll probably use some Lapiz here too - the event system work well with websockets.
I may also pull in GopherJS, but that needs a little further exploration.