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

Release 2.0.0 #78

Merged
merged 78 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a412b78
Merge pull request #11 from IntelLabs/master
luisremis Mar 21, 2018
4c35f94
Add control for blob on RSCommand
luisremis Jan 25, 2018
d2f1453
Add control for blobs count
luisremis Feb 27, 2018
43afd7d
AddEntity shouldn't cache by default unless link is used.
Apr 9, 2018
9e37069
Remove the requirement to provide class in FindEntity
Apr 9, 2018
bffd14b
Add reader writer lock implementation.
Apr 14, 2018
8c6e943
Change mutex in PMGDQueryHandler to reader writer lock.
Apr 14, 2018
9f385f8
Return "missing property" when getting results as list
Apr 26, 2018
bb5a437
Merge pull request #23 from IntelLabs/bug-fixes
vishakha041 Apr 27, 2018
5e243ea
Merge pull request #22 from IntelLabs/rwlock
vishakha041 Apr 27, 2018
1feb19d
Add blobs to Entities
luisremis Apr 27, 2018
f54da2c
Update and Add testing
luisremis Apr 27, 2018
b623cd2
Fix predefined tags/properties
luisremis Mar 21, 2018
24a1d5a
Merge pull request #24 from IntelLabs/feature_blobOnEntities
luisremis Apr 27, 2018
5f53f99
Merge pull request #25 from IntelLabs/fix_vdms_defines
luisremis Apr 27, 2018
f080eda
Updates function call to reflect VCL update
luisremis May 8, 2018
8db1198
Merge pull request #26 from IntelLabs/fix_vcl_uint64
luisremis May 8, 2018
9bdd15c
Destroy pointers in PMGDQueryHandler class and tests. Update server
May 17, 2018
f3ae132
Make number of attempts for RWLock configurable.
May 21, 2018
6b44419
Add missing reset for start iterator in case of neighbor node queries.
May 24, 2018
c191972
Fix loop counter in PMGD test cases.
May 24, 2018
422211d
Fix cpp client bug for blobs, fix indentation.
luisremis Jul 31, 2018
dcbc82e
Merge pull request #32 from IntelLabs/client_bug_fix-1
luisremis Jul 31, 2018
db9c92f
Merge pull request #30 from IntelLabs/fixes
luisremis Aug 2, 2018
0b7a5f1
Add update node support at PMGD layer.
Apr 6, 2018
0aa4ef2
Add UpdateEntity support and testing at JSON level.
Apr 6, 2018
6da7b4c
Change Connect to AddConnection for consistency.
Apr 27, 2018
43c0157
Split constraints and results out of QueryNode protobuf.
Apr 28, 2018
f909e00
Add support for query edge at PMGD handler level.
May 9, 2018
f3ca910
Add support for FindConnection at JSON layer.
May 9, 2018
b70ebbf
Add support for UpdateImage with unit test.
May 12, 2018
3de8c9b
Add support for updating edges at PMGD handler level.
May 22, 2018
21239b5
Add UpdateConnection support.
May 25, 2018
f75d8c4
Fix check_responses, Remove responses methods
luisremis Aug 10, 2018
fd301e4
Add template for reusable iter, fix logic on update for PMGDqueryhandler
luisremis Aug 13, 2018
304b647
Merge pull request #29 from IntelLabs/api-extension
luisremis Aug 13, 2018
bea03a3
Add OR for properties on PMGD
luisremis Jun 5, 2018
bb924b2
Add Descriptors and Classification
luisremis Feb 8, 2018
9dfd4a3
Merge pull request #34 from IntelLabs/feature_descriptors
luisremis Aug 29, 2018
270429b
Fix ImageCommand, Add Test
luisremis Sep 6, 2018
f07a3ca
Merge pull request #35 from IntelLabs/bug_fix_images_props
luisremis Sep 14, 2018
2c84cb3
Make Python3 compatible
luisremis Oct 11, 2018
a95ee98
Merge pull request #40 from IntelLabs/python3_compatible
luisremis Oct 16, 2018
34bb782
Add flip/rotate
luisremis Oct 15, 2018
4cccea5
Merge pull request #41 from IntelLabs/feature_flip_rotate
luisremis Oct 23, 2018
0fc2a75
Update INSTALL.md
luisremis Oct 26, 2018
f2365a5
Merge pull request #48 from IntelLabs/update_install
luisremis Oct 26, 2018
7277fa3
Fix bug for DescriptorsCommand (wrongly sharing a pointer)
luisremis Nov 5, 2018
ca6523f
Add concurrent testing
luisremis Nov 5, 2018
cd0e306
Fix for freeing internal structures when using tbb
luisremis Nov 5, 2018
cb2aa1f
Remove RWlock in PMGDQueryHandler
luisremis Nov 6, 2018
efdd05e
Merge pull request #47 from IntelLabs/fix_bug_descriptors_pmgdqh
luisremis Nov 6, 2018
f079b92
Update README.md
luisremis Nov 26, 2018
453a6fa
Merge pull request #54 from IntelLabs/update-readme
luisremis Nov 27, 2018
e45b371
Add sorting order
luisremis Nov 29, 2018
1a36838
Add tests for sorting
luisremis Nov 29, 2018
34efac9
Merge pull request #53 from IntelLabs/feature_sort_descending
luisremis Nov 29, 2018
1983062
Merge pull request #50 from IntelLabs/remove_rwlock
luisremis Dec 21, 2018
e916fe8
Add support for Bounding Boxes
crstrong Dec 18, 2018
340207a
Add unit tests for bounding boxes
crstrong Dec 18, 2018
fa6d85b
Merge pull request #55 from IntelLabs/feature_boundingbox
luisremis Jan 1, 2019
0be89f7
Fix directories handling
luisremis Jan 14, 2019
7ac412a
Merge pull request #71 from IntelLabs/fix_default_paths
luisremis Jan 15, 2019
d3cc10a
Add PMGD num_allocators to config file
luisremis Jan 15, 2019
017722a
Merge pull request #72 from IntelLabs/feature_pmgd_alloc_params
luisremis Jan 16, 2019
8b2a0c7
Update Enum for Image format, update test
luisremis Jan 29, 2019
11cb356
Fix indentation and minor details on utils scons file
luisremis Jan 29, 2019
ddcb659
Add Basic Video Support
luisremis Jan 29, 2019
2d2432d
Add tests for videos
luisremis Jan 29, 2019
3f31fe1
Update Dockerfile
luisremis Jan 29, 2019
f25b0d4
Update INSTALL file
luisremis Jan 29, 2019
f4c1810
Merge pull request #74 from IntelLabs/lr/feature_video
luisremis Jan 30, 2019
f70a9fb
Merge pull request #75 from IntelLabs/lr/update_readme_2.0
luisremis Jan 30, 2019
7135675
Remove old, outdated examples
luisremis Jan 30, 2019
977076b
Remove arch.h and rwlock.h files
luisremis Jan 30, 2019
38022b8
Merge pull request #76 from IntelLabs/update_dockerfile_2.0
luisremis Jan 30, 2019
3fc9140
Merge pull request #77 from IntelLabs/remove_old_files
luisremis Jan 31, 2019
65455fb
Update Dockerfile for Release
luisremis Jan 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,20 @@
* This is a headers-only library, no compilation/installation necessary

* Persistent Memory Graph Database (PMGD)
* Download version 1.0.0 from: https://github.com/IntelLabs/pmgd/releases
* Download version 2.0.0 from: https://github.com/IntelLabs/pmgd/releases
* Follow installation instructions

* Visual Compute Library
* Download version 0.1.0 from: https://github.com/IntelLabs/vcl/releases
* Download version 1.0.0 from: https://github.com/IntelLabs/vcl/releases
* Follow installation instructions

### Requirement for Python Client
### Python Client Module

sudo apt-get install python-pip
pip install protobuf (may need to run as sudo)
VDMS offers the Python Client Module through the pip package manager,
and it is compatible with Python 2.7+ and 3.3+.
pip (or pip2 and pip3) will automatically install dependencies (protobuf).

Add VDMS Python module to PYPATH:
export PYTHONPATH="${PYTHONPATH}:<path_to_vdms>/client/python/vdms"
# Example:
export PYTHONPATH="${PYTHONPATH}:/opt/intel/vdms/client/python/vdms"
pip install vdms

### Compilation

Expand All @@ -56,8 +54,8 @@

Flag | Explanation
------------ | -------------
--no-server | Compiles client libraries (C++/Python) only. (will not compile neither server not tests)
--timing | Compiles server with chronos for internal timing.
--no-server | Compiles client libraries (C++/Python) only. (will not compile neither server nor tests)
--timing | Compiles server with chronos for internal timing, experimental.
-jX | Compiles in parallel, using X cores
INTEL_PATH=path | Path to the root folder containing pmgd and vcl. Default is "./" which is pmgd and vcl inside vdms folder. Example: scons INTEL_PATH=/opt/intel/

Expand All @@ -68,8 +66,6 @@ Some of the parameters include the TCP port that will be use for incoming
connections, maximun number of simultaneous clients, and paths to the
folders where data/metadata will be stored.

**Note:** The folders must already exists in the filesystem.

We provide a script (run_server.sh) that will create some default directories,
corresponding the default values in the config-vdms.json.

Expand Down
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ propose a storage architecture designed for efficient visual data access
that exploits next generation hardware and give preliminary results showing
how it enables efficient vision analytics.

Here is our [ATC HotStorage '17 Position Paper](https://www.usenix.org/system/files/conference/hotstorage17/hotstorage17-paper-gupta-cledat.pdf).
Also, take a look at our [presentation](https://www.usenix.org/conference/hotstorage17/program/presentation/gupta-cledat).

## Get Started

To get started, take a look at the [INSTALL.md](INSTALL.md) file, where
Expand All @@ -41,16 +38,9 @@ Also, visit our [wiki](https://github.com/IntelLabs/vdms/wiki)
to learn more about the VDMS API, and take a look at some of
the examples/tutorials.

## Cite

Feel free to include our work into your research!
## Academic Papers

@inproceedings {203374,
author = {Vishakha Gupta-Cledat and Luis Remis and Christina R Strong},
title = {Addressing the Dark Side of Vision Research: Storage},
booktitle = {9th {USENIX} Workshop on Hot Topics in Storage and File Systems (HotStorage 17)},
year = {2017},
address = {Santa Clara, CA},
url = {https://www.usenix.org/conference/hotstorage17/program/presentation/gupta-cledat},
publisher = {{USENIX} Association},
}
Conference | Links, Cite | Description
------------ | ------------- | -------------
Learning Systems @ NIPS 2018 | [Paper](https://export.arxiv.org/abs/1810.11832), [Cite](https://dblp.uni-trier.de/rec/bibtex/journals/corr/abs-1810-11832) | Systems for Machine Learning [Workshop](http://learningsys.org/nips18/cfp.html) @ NIPS
HotStorage @ ATC 2017 | [Paper](https://www.usenix.org/conference/hotstorage17/program/presentation/gupta-cledat), [Presentation](https://www.usenix.org/conference/hotstorage17/program/presentation/gupta-cledat), [Cite](https://www.usenix.org/biblio/export/bibtex/203374)| Positioning Paper at USENIX ATC 2017 Workshop
22 changes: 13 additions & 9 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def buildServer(env):
os.path.join(env['INTEL_PATH'], 'vcl/src'),
],
LIBS = [ 'pmgd', 'pmgd-util',
'jsoncpp', 'protobuf',
'jsoncpp', 'protobuf', 'tbb',
'vdms-utils', 'vcl', 'pthread',
],
LIBPATH = ['/usr/local/lib/', 'utils/',
Expand All @@ -35,24 +35,28 @@ def buildServer(env):
'src/QueryHandler.cc',
'src/QueryMessage.cc',
'src/CommunicationManager.cc',
'src/ExceptionsCommand.cc',
'src/PMGDQuery.cc',
'src/SearchExpression.cc',
'src/PMGDIterators.cc',
'src/PMGDQueryHandler.cc',
'src/RSCommand.cc',
'src/ImageCommand.cc',
'src/ExceptionsCommand.cc',
'src/DescriptorsManager.cc',
'src/DescriptorsCommand.cc',
'src/BoundingBoxCommand.cc',
'src/VideoCommand.cc',
]

vdms = env.Program('vdms', vdms_server_files)
env.Program('vdms', vdms_server_files)

# Set INTEL_PATH. First check arguments, then enviroment, then default
if ARGUMENTS.get('INTEL_PATH', '') != '':
intel_path = ARGUMENTS.get("INTEL_PATH", '')
intel_path = ARGUMENTS.get("INTEL_PATH", '')
elif os.environ.get('INTEL_PATH', '') != '':
intel_path = os.environ.get('INTEL_PATH', '')
intel_path = os.environ.get('INTEL_PATH', '')
else:
intel_path = os.getcwd()
intel_path = os.getcwd()

# Enviroment use by all the builds
env = Environment(CXXFLAGS="-std=c++11 -O3")
Expand All @@ -63,6 +67,6 @@ SConscript(os.path.join('utils', 'SConscript'), exports=['env'])
SConscript(os.path.join('client/cpp','SConscript'), exports=['env'])

if GetOption('no-server'):
buildServer(env)
# Build tests only if server is built
SConscript(os.path.join('tests', 'SConscript'), exports=['env'])
buildServer(env)
# Build tests only if server is built
SConscript(os.path.join('tests', 'SConscript'), exports=['env'])
29 changes: 15 additions & 14 deletions client/cpp/VDMSClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ const string VDMSClient::query(const string &json)
protobufs::queryMessage cmd;
cmd.set_json(json);

std::basic_string<uint8_t> msg(cmd.ByteSize(),0);
cmd.SerializeToArray((void*)msg.data(), msg.length());
_conn.send_message(msg.data(), msg.length());
std::basic_string<uint8_t> msg(cmd.ByteSize(),0);
cmd.SerializeToArray((void*)msg.data(), msg.length());
_conn.send_message(msg.data(), msg.length());

// Wait now for response
// TODO: Perhaps add an asynchronous version too.
msg = _conn.recv_message();
protobufs::queryMessage resp;
resp.ParseFromArray((const void*)msg.data(), msg.length());
msg = _conn.recv_message();
protobufs::queryMessage resp;
resp.ParseFromArray((const void*)msg.data(), msg.length());

return resp.json();
}
Expand All @@ -56,19 +56,20 @@ const string VDMSClient::query(const string &json, const vector<string *> blobs)
protobufs::queryMessage cmd;
cmd.set_json(json);

for (auto it : blobs) {
for (auto& it : blobs) {
string *blob = cmd.add_blobs();
blob = it;
*blob = *it;
}
std::basic_string<uint8_t> msg(cmd.ByteSize(),0);
cmd.SerializeToArray((void*)msg.data(), msg.length());
_conn.send_message(msg.data(), msg.length());

std::basic_string<uint8_t> msg(cmd.ByteSize(),0);
cmd.SerializeToArray((void*)msg.data(), msg.length());
_conn.send_message(msg.data(), msg.length());

// Wait now for response
// TODO: Perhaps add an asynchronous version too.
msg = _conn.recv_message();
protobufs::queryMessage resp;
resp.ParseFromArray((const void*)msg.data(), msg.length());
msg = _conn.recv_message();
protobufs::queryMessage resp;
resp.ParseFromArray((const void*)msg.data(), msg.length());

return resp.json();
}
4 changes: 4 additions & 0 deletions client/python/vdms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "vdms"

from .vdms import *

28 changes: 14 additions & 14 deletions client/python/vdms/vdms.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@
import json

# VDMS Protobuf import (autogenerated)
import queryMessage_pb2
from . import queryMessage_pb2

class VDMS(object):
class vdms(object):

def __init__(self):
self.dataNotUsed = []
self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.connected = False
self.last_response = ''

def __del__(self):
self.conn.close()

def connect(self, host='localhost', port=55555):
self.conn.connect((host, port))
Expand Down Expand Up @@ -81,12 +85,10 @@ def query(self, query, img_array = []):
# end = time.time()
# print "ATcomm[ms]:" + str((end - start)*1000)

# time.sleep(1)

# Recieve response
recv_len = self.conn.recv(4)
recv_len = struct.unpack('@I', recv_len)[0]
response = ''
response = b''
while len(response) < recv_len:
packet = self.conn.recv(recv_len - len(response))
if not packet:
Expand All @@ -100,14 +102,12 @@ def query(self, query, img_array = []):
for b in querRes.blobs:
img_array.append(b)

return (querRes.json, img_array)
self.last_response = json.loads(querRes.json)

return (self.last_response, img_array)

# Aux functions for printing JSON queries/responses
def aux_print_json(data):
# Check the query type
if isinstance(data, str): # assumes string
json_obj = json.loads(data)
else:
json_obj = data
def get_last_response(self):
return self.last_response

print json.dumps(json_obj, indent=4, sort_keys=False)
def get_last_response_str(self):
return json.dumps(self.last_response, indent=4, sort_keys=False)
12 changes: 4 additions & 8 deletions config-vdms.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
// Sets database paths and other parameters
{
// Network
"port": 55555, // Default is 55555
"max_simultaneous_clients": 20, // Default is 500
"port": 55555,
"max_simultaneous_clients": 100,

// Database paths
"pmgd_path": "db/graph", // This will be an IP address in the future
"png_path": "db/images/pngs/",
"jpg_path": "db/images/jpgs/",
"tdb_path": "db/images/tiledb/tdb/",
"db_root_path": "db",

"support_info": "[email protected]",
"support_phone": "1-800-A-TEAM"
"more-info": "github.com/IntelLabs/vdms"
}
Loading