Git Product home page Git Product logo

athena's People

Contributors

kushalp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sbaychev

athena's Issues

Unit testing

Out of curiosity, how do you want to implement unit testing going forwards? I figured that I would make that my first bit of code for the project, after you set up your pom.xml for Maven how you'd like it.

Support deleting and modifying values

Currently tag->value pairs can only be added to the Store, they cannot be deleted, or modified.

Deleting should be easy enough, we just set this position in the Store.values ArrayList to null, and ensure that the StoreIterator knows to skip null values. The challenge is that over time the ArrayList will fill up with gaps - so we may need some kind of periodic "compaction" process to get rid of them.

The difficulty with modifying values is that, let's say we modify the tags on a value somewhere in the middle of the store. Now, we may have several shortcuts skipping over this value, even though after modification the value's tags might match one of those queries. The result will be that Store.find() fails to return this value when it should.

One option is, rather than modifying a value's tags, we just delete it, and then add it again using the new tags. It will be added to the end of Store.values.

Of course this assumes that we have a way to delete values.

Thoughts?

Make Athena concurrent

Athena should support concurrent finds, adds, and (eventually) modifications, and deletions.

Right now Athena uses non-concurrent datastructures internally, which is likely to cause intermittent ConcurrentModificaitonExceptions if a Store is accessed from multiple threads.

Obviously making Athena concurrent is about more than just using ConcurrentHashMaps instead of HashMaps - we need to think about how we can ensure Athena supports concurrent operations.

Do some testing to determine the impact of varying the maxShortcuts parameter of the Store constructor

Upon creation a Store is passed an integer, maxShortcuts, which limits the number of shortcuts permitted for each Value in the the store.

We need to determine how this parameter impacts Athena's efficiency. The lower the value the less memory Athena will use, but the more tests it must do to respond to any given query.

We should create something that creates a store with lots of randomly tagged values.

We should then create a bunch of random queries, and hit the store with these, monitoring the counter() to determine how many tests Athena had to do to retrieve the items it retrieved.

We then watch how this varies as we vary maxShortcuts.

Investigate whether Query.falseIfFalse and Query.trueIfTrue be improved

The method Query.trueIfTrue() returns a non-exhaustive set of other queries that must match if this query matches a given set of tags.

Similarly, Query.falseIfFalse() returns a non-exhaustive set of other queries that will not match if this query doesn't match a given set of tags.

Right now we come up with these lists of queries in a rather simple naive way (see the constructors of the various query types). Can it be improved?

Use a proper logging framework

Right now the only logging is through a primitive and ugly static final boolean StoreIterator.verbose. We should use proper logging (provided it doesn't slow anything down).

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.