question history:
question 
90 views

ECS & Server CLI and Communication

Hello,

Just wanted to ensure I have a correct understanding on how the ECS and KVServers will work together.

(1) Do both the ECS and KVServer have separate CLIs?
(2) When creating the first server (and subsequent servers), do we first create it using the KVServer CLI and then it send a message to the ECS to trigger its initialization? Does it also do the same when it gets disconnected (send a message to ECS to handle removal)? Or does the ECS create, initialize, and disconnect the KVServers (i.e. we don't use the KVServer CLI)?

Also, the document mentions: "The ECS uses the command line parameters defined in the previous milestone together with the ones added here. " However, we did not use the ECS in the previous milestone, so what other CLI parameters is it referring to?



Thanks

 1
Updated by Anonymous Gear

the students' answer,

where students collectively construct a single answer

I think the prof mentioned that "neither the KVServer nor the ECS server requires CLI. But you are free to implement them if you wish."

We can create KVServer by initiating the "java -jar m2-server.jar xxxxx" command in the system terminal. When KVServer starts, it sends a message to ECS to trigger initialization. It does the same thing when disconnecting using the shutdown hook.

ECS does not create/disconnect the KVServers.

You can see the args that the ECS need to support under "External configuration service (ECS)" section in the M2 doc:

"The ECS is started first at a specified IP and port (e.g., -a 192.168.1.24 -p 5144). "

I remember the online tester also requires your ECS to support -ll logLevel argument too. (You can run the online tester to see the details of how it calls your ECS.)

 1
Updated by Luke
followup discussionsfor lingering questions and comments
Anonymous Gear 

Thanks, that's helpful!

Just had a follow-up on this - if the KVServer is started on its own, why does the interface for the ECSClient contain functions like this:

addNode(String cacheStrategy, int cacheSize)

Wouldn't the cache strategy and size be specified when the KVServer is created? Also when we add a node, wouldn't we want to take in the host and port and just calculate the hash range? Why does the ECS need the cache strategy?

 0
Luke

I do not know. I didnt use them in my implementation.

IMHO, that was something leftover from previous years.

I could imagine that back then it used zookeeper/docker/k8s and the ECS would call these services to spawn/init new server instances.

 1