Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
D
distributed-calculator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tammam.alsoleman
distributed-calculator
Commits
d25b3dbb
Commit
d25b3dbb
authored
Nov 11, 2025
by
tammam.alsoleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final edition
parent
892af0ac
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
8 deletions
+41
-8
calculator.pb.go
addition-service/generated/calculator.pb.go
+1
-2
calculator_grpc.pb.go
addition-service/generated/calculator_grpc.pb.go
+0
-0
go.mod
addition-service/go.mod
+11
-4
go.sum
addition-service/go.sum
+14
-0
operation_log.txt
addition-service/operation_log.txt
+3
-0
client_gateway.py
client-gateway/client_gateway.py
+7
-0
calculator_pb2.cpython-311.pyc
...eway/generated/__pycache__/calculator_pb2.cpython-311.pyc
+0
-0
calculator_pb2_grpc.cpython-311.pyc
...generated/__pycache__/calculator_pb2_grpc.cpython-311.pyc
+0
-0
calculator_pb2.py
client-gateway/generated/calculator_pb2.py
+2
-2
operation_log.txt
multiplication-service/operation_log.txt
+3
-0
No files found.
addition-service/generated/
generated/
calculator.pb.go
→
addition-service/generated/calculator.pb.go
View file @
d25b3dbb
...
@@ -317,8 +317,7 @@ const file_calculator_proto_rawDesc = "" +
...
@@ -317,8 +317,7 @@ const file_calculator_proto_rawDesc = "" +
"Calculator
\x12
.
\n
"
+
"Calculator
\x12
.
\n
"
+
"
\x03
Add
\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12
3
\n
"
+
"
\x03
Add
\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12
3
\n
"
+
"
\b
Multiply
\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12
H
\n
"
+
"
\b
Multiply
\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12
H
\n
"
+
"
\x13
GetOperationHistory
\x12\x11
.calculator.Empty
\x1a\x1c
.calculator.OperationHistory0
\x01
B8
\n
"
+
"
\x13
GetOperationHistory
\x12\x11
.calculator.Empty
\x1a\x1c
.calculator.OperationHistory0
\x01
B
\r
Z
\v
./generatedb
\x06
proto3"
"'com.calculator.multiplication.generatedP
\x01
Z
\v
./generatedb
\x06
proto3"
var
(
var
(
file_calculator_proto_rawDescOnce
sync
.
Once
file_calculator_proto_rawDescOnce
sync
.
Once
...
...
addition-service/generated/
generated/
calculator_grpc.pb.go
→
addition-service/generated/calculator_grpc.pb.go
View file @
d25b3dbb
File moved
addition-service/go.mod
View file @
d25b3dbb
module addition-service
module addition-service
go 1.21
go 1.21
.3
require (
require (
google.golang.org/grpc v1.59.0
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.31.0
google.golang.org/protobuf v1.35.1
)
require (
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
)
)
addition-service/go.sum
0 → 100644
View file @
d25b3dbb
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
addition-service/operation_log.txt
0 → 100644
View file @
d25b3dbb
[2025-11-12 00:52:05] ADDITION: 9 + 5 = 14
[2025-11-12 00:52:24] ADDITION: 5 + 4 = 9
[2025-11-12 00:52:34] ADDITION: -10 + 5 = -5
client-gateway/client_gateway.py
View file @
d25b3dbb
import
sys
import
os
# إضافة مسار المجلد generated إلى Python path
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'generated'
))
import
grpc
import
grpc
import
generated.calculator_pb2
as
calculator_pb2
import
generated.calculator_pb2
as
calculator_pb2
import
generated.calculator_pb2_grpc
as
calculator_pb2_grpc
import
generated.calculator_pb2_grpc
as
calculator_pb2_grpc
...
...
client-gateway/generated/__pycache__/calculator_pb2.cpython-311.pyc
0 → 100644
View file @
d25b3dbb
File added
client-gateway/generated/__pycache__/calculator_pb2_grpc.cpython-311.pyc
0 → 100644
View file @
d25b3dbb
File added
client-gateway/generated/calculator_pb2.py
View file @
d25b3dbb
...
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
...
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x10\x63\x61
lculator.proto
\x12\n
calculator
\"\x1f\n\x07
Numbers
\x12\t\n\x01\x61\x18\x01
\x01
(
\x05\x12\t\n\x01\x62\x18\x02
\x01
(
\x05\"
*
\n\x06
Result
\x12\r\n\x05
value
\x18\x01
\x01
(
\x05\x12\x11\n\t
operation
\x18\x02
\x01
(
\t\"
S
\n\x10
OperationHistory
\x12\x14\n\x0c
service_name
\x18\x01
\x01
(
\t\x12
)
\n\n
operations
\x18\x02
\x03
(
\x0b\x32\x15
.calculator.Operation
\"
R
\n\t
Operation
\x12\x0c\n\x04
type
\x18\x01
\x01
(
\t\x12\t\n\x01\x61\x18\x02
\x01
(
\x05\x12\t\n\x01\x62\x18\x03
\x01
(
\x05\x12\x0e\n\x06
result
\x18\x04
\x01
(
\x05\x12\x11\n\t
timestamp
\x18\x05
\x01
(
\t\"\x07\n\x05\x45
mpty2
\xbb\x01\n\n
Calculator
\x12
.
\n\x03\x41\x64\x64\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12\x33\n\x08
Multiply
\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12
H
\n\x13
GetOperationHistory
\x12\x11
.calculator.Empty
\x1a\x1c
.calculator.OperationHistory0
\x01\x42
+
\n\'
com.calculator.multiplication.generatedP
\x01\x62
\x06
proto3'
)
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x10\x63\x61
lculator.proto
\x12\n
calculator
\"\x1f\n\x07
Numbers
\x12\t\n\x01\x61\x18\x01
\x01
(
\x05\x12\t\n\x01\x62\x18\x02
\x01
(
\x05\"
*
\n\x06
Result
\x12\r\n\x05
value
\x18\x01
\x01
(
\x05\x12\x11\n\t
operation
\x18\x02
\x01
(
\t\"
S
\n\x10
OperationHistory
\x12\x14\n\x0c
service_name
\x18\x01
\x01
(
\t\x12
)
\n\n
operations
\x18\x02
\x03
(
\x0b\x32\x15
.calculator.Operation
\"
R
\n\t
Operation
\x12\x0c\n\x04
type
\x18\x01
\x01
(
\t\x12\t\n\x01\x61\x18\x02
\x01
(
\x05\x12\t\n\x01\x62\x18\x03
\x01
(
\x05\x12\x0e\n\x06
result
\x18\x04
\x01
(
\x05\x12\x11\n\t
timestamp
\x18\x05
\x01
(
\t\"\x07\n\x05\x45
mpty2
\xbb\x01\n\n
Calculator
\x12
.
\n\x03\x41\x64\x64\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12\x33\n\x08
Multiply
\x12\x13
.calculator.Numbers
\x1a\x12
.calculator.Result
\x12
H
\n\x13
GetOperationHistory
\x12\x11
.calculator.Empty
\x1a\x1c
.calculator.OperationHistory0
\x01\x42
\r
Z
\x0b
./generatedb
\x06
proto3'
)
_globals
=
globals
()
_globals
=
globals
()
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
_globals
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
_globals
)
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'calculator_pb2'
,
_globals
)
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'calculator_pb2'
,
_globals
)
if
not
_descriptor
.
_USE_C_DESCRIPTORS
:
if
not
_descriptor
.
_USE_C_DESCRIPTORS
:
_globals
[
'DESCRIPTOR'
]
.
_loaded_options
=
None
_globals
[
'DESCRIPTOR'
]
.
_loaded_options
=
None
_globals
[
'DESCRIPTOR'
]
.
_serialized_options
=
b
'
\n\'
com.calculator.multiplication.generatedP
\001
'
_globals
[
'DESCRIPTOR'
]
.
_serialized_options
=
b
'
Z
\013
./generated
'
_globals
[
'_NUMBERS'
]
.
_serialized_start
=
32
_globals
[
'_NUMBERS'
]
.
_serialized_start
=
32
_globals
[
'_NUMBERS'
]
.
_serialized_end
=
63
_globals
[
'_NUMBERS'
]
.
_serialized_end
=
63
_globals
[
'_RESULT'
]
.
_serialized_start
=
65
_globals
[
'_RESULT'
]
.
_serialized_start
=
65
...
...
multiplication-service/operation_log.txt
0 → 100644
View file @
d25b3dbb
[2025-11-11T21:52:06.101Z] MULTIPLICATION: 9 × 5 = 45
[2025-11-11T21:52:24.672Z] MULTIPLICATION: 5 × 4 = 20
[2025-11-11T21:52:34.994Z] MULTIPLICATION: -10 × 5 = -50
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment