-
Notifications
You must be signed in to change notification settings - Fork 10
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
Translate producer-consumer from Golang to Python #95
Conversation
Translated python files for aws.go and util.go.
Really good start! Please:
|
Regarding your question:
This is happening because GlobalRandomPayload is initialized in |
|
||
def AppendTimestampToChain(timestampChain): | ||
return timestampChain.append(time.utcnow()) | ||
|
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.
Please also copy the function comments, same for StringArrayToArrayOfString
etc.
E.g., //StringArrayToArrayOfString will process, e.g., "[14 35 8]" into []string{14, 35, 8}
return reply["body"]["TimeStampChain"] | ||
|
||
def AppendTimestampToChain(timestampChain): | ||
return timestampChain.append(time.utcnow()) |
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.
We'll have to check if strconv.FormatInt(time.Now().UnixNano()/(int64(time.Millisecond)/int64(time.Nanosecond)), 10)
is the same as time.utcnow()
using unit tests later on
closing as it's not going to be finished |
This PR focuses on translating the producer-consumer image from Golang to Python. The reason for the translation is that Golang is not natively supported by Azure Functions (they only have a work-around where you write a custom handler HTTP server that gets queried by the Azure Function). This wouldn't be a problem in itself if the serverless.com tool supported Golang deployments, but it doesn't either...
Files to be translated include:
producer-consumer/aws/main.go
producer-consumer/vhive/main.go
producer-consumer/common/aws.go
producer-consumer/common/grpc.go
producer-consumer/common/main.go
producer-consumer/common/object-storage.go
producer-consumer/common/util.go
producer-consumer/common/util-test.go