-
Notifications
You must be signed in to change notification settings - Fork 13
Dbws firstcut #60
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
Open
ghost
wants to merge
3
commits into
NSLS-II:master
Choose a base branch
from
unknown repository
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dbws firstcut #60
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
================================= | ||
Data Broker Service Layer Design | ||
================================= | ||
|
||
Motivation | ||
========== | ||
|
||
Databroker has been actively developed and widely used over the past 2 years. | ||
It has become more powerful and stable thanks to Dan Allan's efforts over the | ||
past year. Its stability and wide acceptance as the de facto way access data | ||
acquired in our beamlines. A new wave of requirements are reported as a result | ||
of our community outreach. One of these requirements is a set of databroker | ||
server implementations that will allow remote access to experimental data over | ||
network. The service layer will also eliminate any issues that may occur as a | ||
result of providing direct/library-level access to databases, allowing | ||
us to implement data access policies. | ||
|
||
Challenges | ||
=========== | ||
|
||
NSLS-II and other facilities have a wide variety of experimental setups that | ||
generate data at different rates and structure. This poses a major challenge | ||
for a single-backend implementation. Another challenge is the lack of sys admin | ||
and dev-ops support. Making performant and reliable asynchronous servers with | ||
low-latency is that are maintainable in the long term that are easy to deploy | ||
is especially difficult with the amount of resources at hand. | ||
|
||
|
||
Roadmap | ||
=========== | ||
|
||
- Identify the data rates required to be transferred in NSLS-II databases. This | ||
does not require a major effort, a simple investigation of existing metadatastore | ||
and filestore will suffice | ||
|
||
- Identify the technologies to be used for transmitting ND arrays over the wire: | ||
msgpack, protobuffe, h5serv, etc. This includes performance measurements | ||
|
||
- Have a first cut on existing databroker using .. _ujson: http://artem.krylysov.com/blog/2015/09/29/benchmark-python-json-libraries/ | ||
|
||
- Prioritize the backends to be implemented, define timelines, and implement. | ||
|
||
- Add an authentication layer | ||
|
||
|
||
Technology | ||
============= | ||
|
||
Given there are plans for central storage and data management, the implementation | ||
of the server layer must be scalable. This means a micro-service oriented | ||
infrastructure that can eventually be placed behind load balancers is a good | ||
intuitive choice. A fully RESTful approach is achiveable yet limiting given the | ||
flexibility provided by the stack. This layer needs some discussion. We could | ||
definitely adopt a RESTful approach (ugh, dreaded approach word) could be | ||
adopted rather than handler per document type sort of approach of metadataservice | ||
and amostra. | ||
|
||
Server Side Design | ||
=================== | ||
|
||
HeaderHandler | ||
------------ | ||
|
||
**get:** Decode jsonified query and return a serialize a list of dicts | ||
If invalid request, return appropriate http error code. | ||
|
||
|
||
EventSourceHandler | ||
------------------ | ||
|
||
**get:** Using the uid of the descriptor(s), obtains an event generator. | ||
By paginating on this generator, returns the payload to the client side. | ||
In the future, this bit will sort out the source of the data fill source | ||
and redirect to the appropriate handler. In this context, handler refers to | ||
the eventsource provided specific choice of technology given the data structure | ||
and rate. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aww. ❤️