-
Notifications
You must be signed in to change notification settings - Fork 19
Blob binary transmission #127
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
Draft
jonnyz32
wants to merge
57
commits into
main
Choose a base branch
from
blob-binary-transmission
base: main
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.
Draft
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
91b16de
Add debug code
jonnyz32 953eed7
add support for all types
jonnyz32 8b6dc04
fix bug in getcolumntype
jonnyz32 b5de3bb
send data diretly as raw bytes
jonnyz32 7a3ffef
dont throw error if column types not exist
jonnyz32 31cc3f8
fix null ptr
jonnyz32 3aa7445
Increase max ws message size
jonnyz32 4da583e
Try to put blob in prepared stmt
jonnyz32 e98d9cc
add debug symbols
jonnyz32 287be45
Add logging in onwebsocketbinary
jonnyz32 eadeb0c
Upgrade jetty version
jonnyz32 5e2ce8b
change maven compiler target
jonnyz32 16e2f4c
change copy bytes
jonnyz32 a250d3f
fix some bugs
jonnyz32 d1cfb5e
fix some bugs
jonnyz32 24718ee
Increase max binary message size
jonnyz32 55f9e58
Use byte array input stream instead
jonnyz32 8990f2b
dont copy payload around
jonnyz32 509d982
fix bug
jonnyz32 78ebb85
use bloboffset
jonnyz32 4861c2e
use proper length
jonnyz32 e837264
dont convert blob to string
jonnyz32 36ffc12
Send response back as blob
jonnyz32 93a9b92
comment out some errors with binary sender
jonnyz32 6ee37d1
Check if instance of blob
jonnyz32 313ba36
get remote in method
jonnyz32 6e70c90
fix bug
jonnyz32 22cc52b
send data id back
jonnyz32 6fbaec6
id is actually a string
jonnyz32 062f05c
add id length as first byte
jonnyz32 e1dd33f
Got blob test kinda working
jonnyz32 4d3d0e7
Add test single blob
jonnyz32 f53069d
Add test multiple blobs in one row
jonnyz32 bcae6c2
Add more tests
jonnyz32 1bb4e5e
change blob length to 4 bytes
jonnyz32 f26ca51
Made row id 4 bytes
jonnyz32 a066ec0
test second buf of long blob
jonnyz32 8934795
dont use is.isavailable
jonnyz32 9ac009c
store blob locator
jonnyz32 7c9a5f4
Upgrade jt400
jonnyz32 6b22a0b
send blobs individually
jonnyz32 491d4ac
Bump buffer size to 4mb
jonnyz32 70e65e0
Move blobs needed out of rows
jonnyz32 6eaff73
change logic for inserting blobs
jonnyz32 57921ce
add other params as well
jonnyz32 5842b4c
Change preparesql logic
jonnyz32 22978b5
Move blobs needed count out of rows
jonnyz32 2f71e1e
send response data in seperate thread
jonnyz32 cf18f9a
put binary sender in seperate thread
jonnyz32 f70a0f9
use async sender
jonnyz32 3b9fb26
use async sender
jonnyz32 b3b60d5
wait until async send complete
jonnyz32 ba7882b
Make byte buffer larger
jonnyz32 f8dcda6
change back to 4mb
jonnyz32 27145e2
fix tests
jonnyz32 37f8543
cleanup
jonnyz32 69e75b1
cleanup
jonnyz32 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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/github/ibm/mapepire/BlobRequestData.java
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,26 @@ | ||
| package com.github.ibm.mapepire; | ||
|
|
||
| public class BlobRequestData { | ||
|
|
||
| private int replacementIndex; | ||
| private int length; | ||
| private int offset; | ||
|
|
||
| public BlobRequestData(int replacementIndex, int length, int offset){ | ||
| this.replacementIndex = replacementIndex; | ||
| this.length = length; | ||
| this.offset = offset; | ||
| } | ||
|
|
||
| public int getLength() { | ||
| return length; | ||
| } | ||
|
|
||
| public int getReplacementIndex() { | ||
| return replacementIndex; | ||
| } | ||
|
|
||
| public int getOffset() { | ||
| return offset; | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
src/main/java/com/github/ibm/mapepire/BlobResponseData.java
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,34 @@ | ||
| package com.github.ibm.mapepire; | ||
|
|
||
| import java.io.InputStream; | ||
| import java.sql.Blob; | ||
|
|
||
| public class BlobResponseData { | ||
| final Blob blob; | ||
| final String columnName; | ||
| final int rowId; | ||
| final int length; | ||
|
|
||
| public BlobResponseData(Blob is, String columnName, int rowId, int length){ | ||
| this.blob = is; | ||
| this.columnName = columnName; | ||
| this.rowId = rowId; | ||
| this.length = length; | ||
| } | ||
|
|
||
| public Blob getBlob() { | ||
| return blob; | ||
| } | ||
|
|
||
| public String getColumnName(){ | ||
| return columnName; | ||
| } | ||
|
|
||
| public int getRowId(){ | ||
| return rowId; | ||
| } | ||
|
|
||
| public int getLength(){ | ||
| return length; | ||
| } | ||
| } |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Need to figure out what to do here since the binarySender is relying on having a websocket.