Code Monkey home page Code Monkey logo

seed's Introduction

Seed is a declarative distributed systems language.

Its main goals are to be analyzable and transformable such that a service can be specified in the language and then transformations can be applied to implement various things such as dealing with network interfaces and data replication.

This language is experimental! It is not finished yet!

Installation:

  1. Install go: http://golang.org/doc/install
  2. Install Seed
go get github.com/nathankerr/seed/seed

Examples

The examples directory contains example transformations and services.

kvs

The kvs directory contains a Key Value Store service.

time

The time directory contains a time service which calculates the current time for a given timezone.

add_network_interface.go

Adds a network interface to a service without one by changing input and output collections to channels and adding and handling the required network addresses through the service.

add_replicated_tables.go

Changes table collections such that their contents are replicated between several of the same services running in a replica group.

A note on types

Seed does not deal with types (this includes literals) because it couples the Service definition to a specific host environment and serialization mechanism. For example, to add a conditional like "table.column < 42" would require knowing what type table.column is, that it is comparable with whatever 42 is, and how to do the comparison. It might be fairly simple in this case, but soon becomes complicated with floating point, decimal, signed and unsigned numbers, etc. It gets worse with user defined types which then also need serialization code, etc.

The solution here is to leave typing to the host environment and out of Seed. If constants (such as the aforementioned 42) are needed, a table can be created to hold that single value and the actual value can be added at start up. The value can then be referenced as life_the_universe_and_everything.answer.

Ideas on handling boolean predicates

operations to handle:

  • =
  • <
  • <=
  • =

  • in (true if element in set)
  • not (boolean negation)

operations have equal precedence, grouping with ()

implementation idea

type CompareFn func(a Element, b Element) (int, error) returns < 0 if a < b returns 0 if a == b returns > 0 if a > b returns error if comparison not possible

register functions in a comparison map

comparisons map[string]map[string] CompareFn each string is a qualified column, order does not matter (i.e., will check a,b and b,a for a function)

during startup, check if needed comparisons are registered. If not, list the one which are missing

todo

  • boolean expressions for predicates
  • lattice types? How to do without type knowledge? Do the lattice types impose or imply some sort of type classing that would need to be matched or ensured by the host environement?
  • list and check for functions required by the host environment for a particular seed
  • finish cart implementation

seed's People

Contributors

nathankerr avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.