Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a gateway #1

Merged
merged 2 commits into from
Jul 20, 2013
Merged

Add a gateway #1

merged 2 commits into from
Jul 20, 2013

Conversation

dkubb
Copy link
Owner

@dkubb dkubb commented Jul 2, 2013

This branch will add a gateway to the memory adapter. It will also produce a prototype interface for #update on the adapter.

@@ -1,22 +1,23 @@
# encoding: utf-8

group :development do
gem 'rake', '~> 10.0.4'
gem 'rake', '~> 10.1.0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkubb @mbj @snusnu I don't think we need to be that specific with rake version :)

* Update schema to use a thread safe Hash.
* Add #[] and #[]= methods to the adapter api to allow getting and
  setting the named relations.
* Add initial #update method to the relation/gateway api. Will need
  to add Axiom::Relation::Operation::Update as well as base #update
  method to Axiom relations matching this api.
@dkubb
Copy link
Owner Author

dkubb commented Jul 18, 2013

@solnic sorry for the force pushes. Just working on getting the interface right and some of the commit history ended up being garbage. fwiw I usually force force on feature branches, and not master.

@dkubb
Copy link
Owner Author

dkubb commented Jul 18, 2013

@solnic @mbj @snusu any comments before I merge this in?

@mbj I wanted you to check out the addition of the #[] and #[]= methods to the adapter interface and make sure they make sense to you. The point is that they return a gateway associated with the adapter wrapping a relation. I would want to use this convention in all the adapters if possible.

I realize the adapter is really only communicating with the gateway, so in some ways the interface can vary on an adapter by adapter basis, but I've been trying to find an interface that will work in the general case. From there I can begin to make an abstract adapter as well as an abstract gateway; eventually having one gateway for all adapters. The less code a new adapter author has to write the better; I'll leave it open for them to customize one, but we should have good defaults.

@dkubb
Copy link
Owner Author

dkubb commented Jul 20, 2013

Even though @solnic and I discussed this approach and would like to change the interface to use mutable materialized relations, I'm happy enough that this is moving in a good direction so I'm going to merge this now.

I'll begin work on updating Axiom::Relation::Materialized to be mutable and for #insert and #delete to propagate the write down to the materialized relation.

dkubb added a commit that referenced this pull request Jul 20, 2013
@dkubb dkubb merged commit 53a355a into master Jul 20, 2013
@dkubb dkubb deleted the gateway branch July 20, 2013 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants